From 9fb4b18668b7f34e56ee8249ef494efa111c3d20 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 21 Jun 2020 16:06:48 +0100 Subject: Fix switch from GRUB2 to rEFInd when installed in \EFI\BOOT. --- perl-install/bootloader.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'perl-install/bootloader.pm') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 227c5604b..0c6a1292b 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -2451,6 +2451,10 @@ sub install_refind { $bootloader->{esp_device} or die "ESP device is unknown"; push @options, '--usedefault'; push @options, $bootloader->{esp_device}; + #- refind_install uses lower case file names. If a default bootloader was previously + #- created with an upper case file name, Linux won't overwrite it. + my $default_fn = "$::prefix/boot/EFI/EFI/BOOT/BOOT" . uc(uefi_type()) . ".EFI"; + unlink($default_fn) if -e $default_fn; } elsif ($bootloader->{install_mode} eq 'nvram_only') { push @options, '--nvramonly'; } -- cgit v1.2.1