From 8fca7cfca3baa1639e316c8307dd20479cbe8d1d Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 15 Jun 2020 11:01:25 +0100 Subject: 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. --- perl-install/bootloader.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perl-install/bootloader.pm') 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; } -- cgit v1.2.1