From 30883640d7db87ead35245050a2c836be567c541 Mon Sep 17 00:00:00 2001 From: Stew Benedict Date: Wed, 12 Dec 2001 21:06:00 +0000 Subject: mods to address new yaboot's lack of symlink ability, xfs initrd load --- perl-install/bootloader.pm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 533e507b2..6134b491d 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -147,11 +147,16 @@ sub add_entry($$) { sub add_kernel { my ($prefix, $lilo, $version, $ext, $root, $v) = @_; + #- new versions of yaboot don't handle symlinks + my $ppcext = $ext; + if (arch() =~ /ppc/) { + $ext = "-$version"; + } + log::l("adding vmlinuz$ext as vmlinuz-$version"); -e "$prefix/boot/vmlinuz-$version" or log::l("unable to find kernel image $prefix/boot/vmlinuz-$version"), return; my $image = "/boot/vmlinuz" . ($ext ne "-$version" && symlinkf("vmlinuz-$version", "$prefix/boot/vmlinuz$ext") ? $ext : "-$version"); - my $initrd = eval { mkinitrd($prefix, $version, "/boot/initrd-$version.img"); "/boot/initrd" . ($ext ne "-$version" && @@ -159,6 +164,11 @@ sub add_kernel { }; my $label = $ext =~ /-(default)/ ? $1 : "linux$ext"; + #- more yaboot concessions - PPC + if (arch() =~ /ppc/) { + $label = $ppcext =~ /-(default)/ ? $1 : "linux$ppcext"; + } + add2hash($v, { type => 'image', @@ -266,6 +276,8 @@ sub suggest { my $root = isLoopback($root_part) ? "loop7" : $root_part->{device}; my $boot = fsedit::get_root($fstab, 'boot')->{device}; my $partition = first($boot =~ /\D*(\d*)/); + #- PPC xfs module requires enlarged initrd + my $xfsroot = isThisFs("xfs", $root_part); require c; c::initSilo() if arch() =~ /sparc/; @@ -290,6 +302,7 @@ sub suggest { enableofboot => 1, enablecdboot => 1, useboot => $boot, + xfsroot => $xfsroot, } : { bootUnsafe => $unsafe, @@ -524,6 +537,8 @@ sub install_yaboot($$$) { } else { print F "\tinitrd=$of_dev,$_->{initrd}" if $_->{initrd}; } + #- xfs module on PPC requires larger initrd - say 6MB? + print F "\tinitrd-size=6144" if $lilo->{xfsroot}; print F "\tappend=\"$_->{append}\"" if $_->{append}; print F "\tread-write" if $_->{'read-write'}; print F "\tread-only" if !$_->{'read-write'}; -- cgit v1.2.1