summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-07-05 22:41:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-07-05 22:41:30 +0000
commit73255c8846aee1a5236dbf3d6609aea761abf030 (patch)
tree4413978e07097650070e6a28a109e9ad1963226a /perl-install/bootloader.pm
parent505353adf8da622c604a7818391d3fa0770f172f (diff)
downloaddrakx-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/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm41
1 files changed, 20 insertions, 21 deletions
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;