summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-06-21 16:06:48 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-06-21 20:02:17 +0100
commit9fb4b18668b7f34e56ee8249ef494efa111c3d20 (patch)
tree743415e827bbe5956f0f90810ae3212d631d97bf /perl-install
parentf19c03161a5a1a3030805b9b88323f40187f13b1 (diff)
downloaddrakx-9fb4b18668b7f34e56ee8249ef494efa111c3d20.tar
drakx-9fb4b18668b7f34e56ee8249ef494efa111c3d20.tar.gz
drakx-9fb4b18668b7f34e56ee8249ef494efa111c3d20.tar.bz2
drakx-9fb4b18668b7f34e56ee8249ef494efa111c3d20.tar.xz
drakx-9fb4b18668b7f34e56ee8249ef494efa111c3d20.zip
Fix switch from GRUB2 to rEFInd when installed in \EFI\BOOT.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm4
1 files changed, 4 insertions, 0 deletions
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';
}