From d2250e844a04efba559497c404e3b3ddbc9684f2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 1 Mar 2002 16:42:33 +0000 Subject: - do not indent "disk=... bios=..." - $lilo->{first_hd_device} can be used to tell which drive is the first one for the BIOS. Useful when the bootloader is installed on a partition and not on the MBR. --- perl-install/bootloader.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'perl-install/bootloader.pm') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index e8af2cc0b..ea83ebbd7 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -704,7 +704,7 @@ sub write_lilo_conf { } - my %bios2dev = map_index { $::i => $_ } dev2bios($hds, $lilo->{boot}); + my %bios2dev = map_index { $::i => $_ } dev2bios($hds, $lilo->{first_hd_device} || $lilo->{boot}); my %dev2bios = reverse %bios2dev; if (is_empty_hash_ref($lilo->{bios} ||= {})) { @@ -753,7 +753,7 @@ sub write_lilo_conf { print F "ignore-table" if grep { $_->{unsafe} && $_->{table} } @{$lilo->{entries}}; while (my ($dev, $bios) = each %{$lilo->{bios}}) { - print F "\tdisk=$dev bios=$bios"; + print F "disk=$dev bios=$bios"; } foreach (@{$lilo->{entries}}) { @@ -833,7 +833,7 @@ sub write_grub_config { my ($prefix, $lilo, $fstab, $hds) = @_; my %dev2bios = ( (map_index { $_ => "fd$::i" } detect_devices::floppies_dev()), - (map_index { $_ => "hd$::i" } dev2bios($hds, $lilo->{boot})), + (map_index { $_ => "hd$::i" } dev2bios($hds, $lilo->{first_hd_device} || $lilo->{boot})), ); { @@ -887,7 +887,7 @@ sub write_grub_config { if ($_->{kernel_or_dev} !~ /fd/) { #- boot off the second drive, so reverse the BIOS maps $_->{mapdrive} ||= { '0x80' => '0x81', '0x81' => '0x80' } - if $_->{table} && $lilo->{boot} !~ /$_->{table}/; + if $_->{table} && ($lilo->{first_hd_device} || $lilo->{boot}) !~ /$_->{table}/; map_each { print F "map ($::b) ($::a)" } %{$_->{mapdrive} || {}}; @@ -899,7 +899,7 @@ sub write_grub_config { } my $hd = fsedit::get_root($fstab, 'boot')->{rootDevice}; - my $dev = dev2grub($lilo->{boot}, \%dev2bios); + my $dev = dev2grub($lilo->{first_hd_device} || $lilo->{boot}, \%dev2bios); my ($s1, $s2, $m) = map { $file2grub->("/boot/grub/$_") } qw(stage1 stage2 menu.lst); my $f = "/boot/grub/install.sh"; output "$prefix$f", -- cgit v1.2.1