diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-04-09 10:33:34 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-04-09 10:33:34 +0000 |
commit | 8ab7c2b12580f5b0dcbce058119991d8778d69b0 (patch) | |
tree | 894c57681c681b0846e47833796664f0f783af8d /perl-install/bootloader.pm | |
parent | 6acd64aaebd7c4e513c1d14167d559cf74a3cba1 (diff) | |
download | drakx-backup-do-not-use-8ab7c2b12580f5b0dcbce058119991d8778d69b0.tar drakx-backup-do-not-use-8ab7c2b12580f5b0dcbce058119991d8778d69b0.tar.gz drakx-backup-do-not-use-8ab7c2b12580f5b0dcbce058119991d8778d69b0.tar.bz2 drakx-backup-do-not-use-8ab7c2b12580f5b0dcbce058119991d8778d69b0.tar.xz drakx-backup-do-not-use-8ab7c2b12580f5b0dcbce058119991d8778d69b0.zip |
(install_lilo): better handling of map-drive (there's not always only 2 disks!)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index cfa2dcc47..f152e4be1 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -642,10 +642,13 @@ sub install_lilo($$) { print F "\ttable=$_->{table}" if $_->{table}; print F "\tunsafe" if $_->{unsafe} && !$_->{table}; - #- boot off the second drive, so reverse the BIOS maps - $_->{mapdrive} ||= { '0x80' => '0x81', '0x81' => '0x80' } - if $_->{table} && $lilo->{boot} !~ /$_->{table}/; - + if (my ($dev) = $_->{table} =~ m|/dev/(.*)|) { + if ($dev2bios{$dev}) { + #- boot off the nth drive, so reverse the BIOS maps + my $nb = sprintf("0x%x", 0x80 + $dev2bios{$dev}); + $_->{mapdrive} ||= { '0x80' => $nb, $nb => '0x80' }; + } + } while (my ($from, $to) = each %{$_->{mapdrive} || {}}) { print F "\tmap-drive=$from"; print F "\t to=$to"; |