diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-02-03 17:19:28 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-02-03 17:19:28 +0000 |
commit | 4708ec4b74bd1e4f781cac47bd8248f4114ccf9f (patch) | |
tree | 3e377740ce71b2af83669035e794159ba81d673a | |
parent | 00ec87f6b854ada1b847875a76fb8e281b5c8088 (diff) | |
download | drakx-backup-do-not-use-4708ec4b74bd1e4f781cac47bd8248f4114ccf9f.tar drakx-backup-do-not-use-4708ec4b74bd1e4f781cac47bd8248f4114ccf9f.tar.gz drakx-backup-do-not-use-4708ec4b74bd1e4f781cac47bd8248f4114ccf9f.tar.bz2 drakx-backup-do-not-use-4708ec4b74bd1e4f781cac47bd8248f4114ccf9f.tar.xz drakx-backup-do-not-use-4708ec4b74bd1e4f781cac47bd8248f4114ccf9f.zip |
help lilo when there is hdd with no hdc drive (needs testing!)
-rw-r--r-- | perl-install/bootloader.pm | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index a688cd545..5e5d9741b 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -711,13 +711,23 @@ sub write_lilo_conf { print F "serial=", $1 if get_append($lilo, 'console') =~ /ttyS(.*)/; my $dev = $hds->[0]{device}; - my %dev2bios = map_index { $_ => $::i } dev2bios($hds, $lilo->{boot}); + my %bios2dev = map_index { $::i => $_ } dev2bios($hds, $lilo->{boot}); + my %dev2bios = reverse %bios2dev; + my %done; if ($dev2bios{$dev}) { - my %bios2dev = reverse %dev2bios; print F "disk=/dev/$bios2dev{0} bios=0x80"; printf F "disk=/dev/$dev bios=0x%x\n", 0x80 + $dev2bios{$dev}; - } elsif ($dev =~ /hd[bde]/) { - print F "disk=/dev/$dev bios=0x80"; + $done{0} = $done{$dev2bios{$dev}} = 1; + } + foreach (0 .. 3) { + my ($letter) = $bios2dev{$_} !~ /hd([^ac])/; #- at least hda and hdc are handled correctly :-/ + next if $done{$_} || !$letter; + next if + $_ > 0 #- always print if first disk is hdb, hdd, hde... + && $bios2dev{$_ - 1} eq "hd" . chr(ord($letter) - 1); + #- no need to help lilo with hdb (resp. hdd, hdf...) + $done{$_} = 1; + printf F "disk=/dev/$bios2dev{1} bios=0x%x\n", 0x80 + $_; } print F "message=/boot/message" if (arch() !~ /ia64/); |