summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-06-17 09:28:40 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-06-17 09:36:51 +0100
commita297a63cce4b8845b10f3f3a31be91ed9ed43378 (patch)
tree6daaada46c6734a14f41416d2839a1033c9122ec
parente363aecf87720ab29a3362432a4b1eb56e1748a4 (diff)
downloaddrakx-a297a63cce4b8845b10f3f3a31be91ed9ed43378.tar
drakx-a297a63cce4b8845b10f3f3a31be91ed9ed43378.tar.gz
drakx-a297a63cce4b8845b10f3f3a31be91ed9ed43378.tar.bz2
drakx-a297a63cce4b8845b10f3f3a31be91ed9ed43378.tar.xz
drakx-a297a63cce4b8845b10f3f3a31be91ed9ed43378.zip
Default to no os-prober when installing bootloader on a removable device.
-rw-r--r--perl-install/any.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 13d77d680..ed618dc1a 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -137,7 +137,7 @@ sub setupBootloaderBeforeStandalone {
}
sub setupBootloaderBefore {
- my ($_do_pkgs, $bootloader, $all_hds, $fstab, $keyboard, $allow_fb, $vga_fb, $splash, $quiet) = @_;
+ my ($do_pkgs, $bootloader, $all_hds, $fstab, $keyboard, $allow_fb, $vga_fb, $splash, $quiet) = @_;
require bootloader;
#- auto_install backward compatibility
@@ -213,7 +213,12 @@ sub setupBootloaderBefore {
if (my @esp = grep { $_->{mntpoint} eq '/boot/EFI' } @$fstab) {
$bootloader->{removable} = $esp[0]{is_removable};
}
+ } else {
+ if (my $root_part = fs::get::root($fstab)) {
+ $bootloader->{removable} = $root_part->{is_removable};
+ }
}
+ $do_pkgs->remove('os-prober') if $bootloader->{removable} && $do_pkgs->is_installed('os-prober', '/usr/bin/os-prober');
$bootloader->{keytable} ||= keyboard::keyboard2kmap($keyboard);
log::l("setupBootloaderBefore end");