diff options
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r-- | perl-install/install_steps.pm | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index c8bcc2a64..84c4918c5 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -613,7 +613,13 @@ sub readBootloaderConfigBeforeInstall { sub setupBootloaderBefore { my ($o) = @_; - if (arch() =~ /^sparc/) { + if (arch() =~ /alpha/) { + if (my $dev = fsedit::get_root($o->{fstab})) { + $o->{bootloader}{boot} ||= "/dev/$dev->{rootDevice}"; + $o->{bootloader}{root} ||= "/dev/$dev->{device}"; + $o->{bootloader}{part_nb} ||= first($dev->{device} =~ /(\d+)/); + } + } elsif (arch() =~ /^sparc/) { require silo; silo::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion()); } else { @@ -627,7 +633,18 @@ sub setupBootloader($) { my ($o) = @_; return if $::g_auto_install; - if (arch() =~ /^sparc/) { + if (arch() =~ /alpha/) { + return if $::testing; + my $b = $o->{bootloader}; + $b->{boot} or $o->ask_warn('', "Can't install aboot, not a bsd disklabel"), return; + + run_program::rooted($o->{prefix}, "swriteboot", $b->{boot}, "/boot/bootlx"); + run_program::rooted($o->{prefix}, "abootconf", $b->{boot}, $b->{part_nb}); + + output "$o->{prefix}/etc/aboot.conf", + map_index { "$::i:$b->{part_nb}$_ root=$b->{root} $b->{perImageAppend}\n" } + map { /$o->{prefix}(.*)/ } eval { glob_("$o->{prefix}/boot/vmlinux*") }; + } elsif (arch() =~ /^sparc/) { silo::install($o->{prefix}, $o->{bootloader}); } else { lilo::install($o->{prefix}, $o->{bootloader}); |