diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-07-05 22:41:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-07-05 22:41:30 +0000 |
commit | 73255c8846aee1a5236dbf3d6609aea761abf030 (patch) | |
tree | 4413978e07097650070e6a28a109e9ad1963226a /perl-install | |
parent | 505353adf8da622c604a7818391d3fa0770f172f (diff) | |
download | drakx-73255c8846aee1a5236dbf3d6609aea761abf030.tar drakx-73255c8846aee1a5236dbf3d6609aea761abf030.tar.gz drakx-73255c8846aee1a5236dbf3d6609aea761abf030.tar.bz2 drakx-73255c8846aee1a5236dbf3d6609aea761abf030.tar.xz drakx-73255c8846aee1a5236dbf3d6609aea761abf030.zip |
ia64 bootloader configuration adaptations
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 10 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 41 |
2 files changed, 25 insertions, 26 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index b429ac3e4..496a6651c 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -91,11 +91,11 @@ sub setupBootloader { my ($in, $b, $hds, $fstab, $security, $prefix, $more) = @_; $more++ if $b->{bootUnsafe}; - $more = 2 if arch() =~ /ppc/; #- no auto for PPC yet + $more = 2 if arch() =~ /ppc/; #- no auto for PPC yet if (!$::expert && $more < 1) { #- automatic - } elsif (!$::expert) { + } elsif (!$::expert && arch() !~ /ia64/) { my @l = (__("First sector of drive (MBR)"), __("First sector of boot partition")); $in->set_help('setupBootloaderBeginner') unless $::isStandalone; @@ -149,7 +149,7 @@ sub setupBootloader { { label => _("Bootloader to use"), val => \$bootloader, list => [ keys(%bootloaders) ], format => \&translate }, arch() =~ /sparc/ ? ( { label => _("Bootloader installation"), val => \$silo_install_lang, list => \@silo_install_lang }, -) : ( +) : if_(arch() !~ /ia64/, { label => _("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } (@$hds, grep { !isFat($_) } @$fstab)), detect_devices::floppies() ], not_edit => !$::expert }, { label => _("LBA (doesn't work on old BIOSes)"), val => \$b->{lba32}, type => "bool", text => "lba", advanced => 1 }, { label => _("Compact"), val => \$b->{compact}, type => "bool", text => _("compact"), advanced => 1 }, @@ -249,7 +249,7 @@ You can add some more or change the existing ones."), { label => _("Image"), val => \$e->{kernel_or_dev}, list => [ map { s/$prefix//; $_ } glob_("$prefix/boot/vmlinuz*") ], not_edit => 0 }, { label => _("Root"), val => \$e->{root}, list => [ map { "/dev/$_->{device}" } @$fstab ], not_edit => !$::expert }, { label => _("Append"), val => \$e->{append} }, -arch =~ /ppc/ ? () : ( + if_(arch !~ /ppc|ia64/, { label => _("Video mode"), val => \$e->{vga}, list => [ keys %bootloader::vga_modes ], not_edit => !$::expert }, ), { label => _("Initrd"), val => \$e->{initrd}, list => [ map { s/$prefix//; $_ } glob_("$prefix/boot/initrd*") ] }, @@ -259,7 +259,7 @@ arch =~ /ppc/ ? () : ( } else { @l = ( { label => _("Root"), val => \$e->{kernel_or_dev}, list => [ map { "/dev/$_->{device}" } @$fstab ], not_edit => !$::expert }, -if_(arch() !~ /sparc|ppc/, +if_(arch() !~ /sparc|ppc|ia64/, { label => _("Table"), val => \$e->{table}, list => [ '', map { "/dev/$_->{device}" } @$hds ], not_edit => !$::expert }, { label => _("Unsafe"), val => \$e->{unsafe}, type => 'bool' } ), diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 5e3258570..b30834df2 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -244,14 +244,16 @@ sub suggest { useboot => $boot, } : { - boot => "/dev/" . ($onmbr ? $hds->[0]{device} : fsedit::get_root($fstab, 'boot')->{device}), bootUnsafe => $unsafe, - map => "/boot/map", default => "linux", lba32 => 1, entries => [], timeout => $onmbr && 5, + if_(arch() =~ /ia64/, + boot => "/dev/" . ($onmbr ? $hds->[0]{device} : fsedit::get_root($fstab, 'boot')->{device}), + map => "/boot/map", install => "/boot/boot.b", + ), }); if (!$lilo->{message} || $lilo->{message} eq "1") { @@ -607,6 +609,17 @@ sub install_lilo ($$) { my ($prefix, $lilo, $fstab, $hds) = @_; $lilo->{prompt} = $lilo->{timeout}; + my $file2fullname = sub { + my ($file) = @_; + if (arch() =~ /ia64/) { + (my $part, $file) = fsedit::file2dev($prefix, $fstab, $file); + my %hds = map_index { $_ => "hd$::i" } sort map { $_->{device} } @$hds; + $dev2efi->{$part->{device}} . ":" . $file; + } else { + $file + } + }; + #- try to use a specific stage2 if defined and present. -e "$prefix/boot/$lilo->{methods}{lilo}" and symlinkf $lilo->{methods}{lilo}, "$prefix/boot/lilo"; log::l("stage2 of lilo used is " . readlink "$prefix/boot/lilo"); @@ -663,9 +676,9 @@ wait %d seconds for default boot. $label =~ s/\s/_/g; #- lilo doesn't like spaces print F "\tlabel=$label"; - if ($_->{type} eq "image") { - print F "\troot=$_->{root}"; - print F "\tinitrd=$_->{initrd}" if $_->{initrd}; + if ($_->{type} eq "image") { + print F "\troot=", $file2fullname->($_->{root}); + print F "\tinitrd=", $file2fullname->($_->{initrd}) if $_->{initrd}; print F "\tappend=\"$_->{append}\"" if $_->{append}; print F "\tvga=$_->{vga}" if $_->{vga}; print F "\tread-write" if $_->{'read-write'}; @@ -739,22 +752,8 @@ sub install_grub { } my $bootIsReiser = isReiserfs(fsedit::get_root($fstab, 'boot')); my $file2grub = sub { - my $file = expand_symlinks "$prefix$_[0]"; #- grub in reiserfs doesn't handle symlinks. - unless ($file =~ s/^$prefix//) { - my ($fs) = grep { loopback::carryRootLoopback($_) } @$fstab or die; - log::l("found $fs->{mntpoint}"); - $file =~ s|/initrd/loopfs|$fs->{mntpoint}|; - } - my ($fs); - foreach (@$fstab) { - my $m = $_->{mntpoint}; - $fs = $_ if - $file =~ /^$m/ && - (!$fs || length $fs->{mntpoint} < length $m); - } - $fs or die "file2grub not found $file"; - $file =~ s|$fs->{mntpoint}/?|/|; - dev2grub($fs->{device}, \%dev2bios) . $file; + my ($part, $file) = fsedit::file2dev($prefix, $fstab, $file); + dev2grub($part->{device}, \%dev2bios) . $file; }; { local *F; |