diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 7c8f5eb8d..df12c227a 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1048,13 +1048,13 @@ sub mixed_kind_of_disks { sub sort_hds_according_to_bios { my ($bootloader, $hds) = @_; - my $boot_hd = fs::device2part($bootloader->{first_hd_device} || $bootloader->{boot}, $hds) or die "sort_hds_according_to_bios: unknown hd"; #- if not on mbr - my $boot_kind = hd2bios_kind($boot_hd); + my $boot_hd = fs::device2part($bootloader->{first_hd_device} || $bootloader->{boot}, $hds); #- $boot_hd is undefined when installing on floppy + my $boot_kind = $boot_hd && hd2bios_kind($boot_hd); my $translate = sub { my ($hd) = @_; my $kind = hd2bios_kind($hd); - ($hd == $boot_hd ? 0 : $kind eq $boot_kind ? 1 : 2) . "_$kind"; + $boot_hd ? ($hd == $boot_hd ? 0 : $kind eq $boot_kind ? 1 : 2) . "_$kind" : $kind; }; sort { $translate->($a) cmp $translate->($b) } @$hds; } |