summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-06-15 11:01:25 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-06-16 17:01:10 +0100
commit8fca7cfca3baa1639e316c8307dd20479cbe8d1d (patch)
tree9150ee13f37c47c6acc177d812d9ccbccbe954ea /perl-install/bootloader.pm
parenteec464addb2fc99de508dbe990aa4cd899d6419b (diff)
downloaddrakx-8fca7cfca3baa1639e316c8307dd20479cbe8d1d.tar
drakx-8fca7cfca3baa1639e316c8307dd20479cbe8d1d.tar.gz
drakx-8fca7cfca3baa1639e316c8307dd20479cbe8d1d.tar.bz2
drakx-8fca7cfca3baa1639e316c8307dd20479cbe8d1d.tar.xz
drakx-8fca7cfca3baa1639e316c8307dd20479cbe8d1d.zip
Add option to install GRUB2 as EFI default/fallback bootloader.
i.e. in \EFI\BOOT instead of in \EFI\mageia. This should be used if installing on a removable device, and provides a workaround for buggy BIOSs that don't respect the EFI NVRAM settings.
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index fe69db7af..2d2b9c540 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -417,6 +417,7 @@ sub read_grub2_install_sh() {
$h{boot} = $1;
}
$h{no_esp_or_mbr} = $s =~ m!--grub-setup=/bin/true!;
+ $h{removable} = $s =~ m!--removable!;
%h;
}
@@ -2125,7 +2126,11 @@ sub write_grub2_install_sh {
my $boot = $bootloader->{boot};
my @options;
if (is_uefi()) {
- push @options, qw(--bootloader-id=tmp --no-nvram) if $bootloader->{no_esp_or_mbr};
+ if ($bootloader->{no_esp_or_mbr}) {
+ push @options, qw(--bootloader-id=tmp --no-nvram);
+ } elsif ($bootloader->{removable}) {
+ push @options, '--removable';
+ }
} else {
@options = $bootloader->{no_esp_or_mbr} ? ('--grub-setup=/bin/true', $boot) : $boot;
}