summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/bootloader.pm20
1 files changed, 10 insertions, 10 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 2d2b9c540..4e8fba097 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -296,8 +296,17 @@ sub read {
@devs = split(',', $bootloader->{'raid-extra-boot'});
}
+ #- if $bootloader->{boot} is undefined, @devs contains a single undef element
my ($type) = map {
- if (m!/fd\d+$!) {
+ if (is_uefi()) {
+ if (-e "$::prefix/boot/refind_linux.conf") {
+ 'refind';
+ } elsif (-f "$::prefix/boot/EFI/EFI/mageia/grub" . uefi_type() . ".efi") {
+ 'grub2';
+ } else {
+ ()
+ }
+ } elsif (m!/fd\d+$!) {
warn "not checking the method on floppy, assuming $main_method is right\n";
$main_method;
} elsif (member($main_method, qw(cromwell uboot))) {
@@ -306,8 +315,6 @@ sub read {
} elsif (my $type = partition_table::raw::typeOfMBR($_)) {
warn "typeOfMBR $type on $_ for method $main_method\n" if $ENV{DEBUG};
$type;
- } elsif (-e "$::prefix/boot/refind_linux.conf") {
- 'refind';
} else { () }
} @devs;
@@ -315,13 +322,6 @@ sub read {
return $bootloader if read_($bootloader);
}
}
- # still no boot loader found? let's check for ESP if using UEFI:
- if (is_uefi()) {
- if (-f "/boot/EFI/EFI/mageia/grubx64.efi" || -f "/boot/EFI/EFI/mageia/grubia32.efi" || -f "/boot/efi/EFI/mageia/grubaa64.efi") {
- my $bootloader = bootloader::read_grub2();
- return $bootloader if read_($bootloader);
- }
- }
}
sub read_ {