From ebd2f1d9e9566bca546e3af1528fe5ee3b393b99 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 31 Mar 2003 17:32:51 +0000 Subject: copy kernel and stage1 in order to avoid remapping /mnt/hd on the fly during install for bootloader installation to complete correctly. --- perl-install/bootloader.pm | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index f82dcc3c2..9a110ebfa 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -501,14 +501,20 @@ wait %d seconds for default boot. if (my $hd_install_path = any::hdInstallPath()) { if (-e "/tmp/image/boot/vmlinuz" && -e "/tmp/image/boot/all.rdz" and my ($cmdline) = cat_("/tmp/image/boot/grub/menu.lst") =~ /kernel \S+\/boot\/vmlinuz (.*)$/m) { - log::l("adding a restore bootloader entry on $hd_install_path"); - add_entry($bootloader, { - type => 'image', - label => 'restore', - kernel_or_dev => "$hd_install_path/boot/vmlinuz", - initrd => "$hd_install_path/boot/all.rdz", - append => $cmdline, - }); + log::l("copying kernel and stage1 install to $::prefix/boot/restore"); + eval { mkdir "$::prefix/boot/restore"; + cp_af("/tmp/image/boot/vmlinuz", "$::prefix/boot/restore/vmlinuz"); + cp_af("/tmp/image/boot/all.rdz", "$::prefix/boot/restore/all.rdz") }; + unless ($@) { + log::l("adding a restore bootloader entry on $hd_install_path (remapped to $::prefix/boot/restore)"); + add_entry($bootloader, { + type => 'image', + label => 'restore', + kernel_or_dev => "/boot/restore/vmlinuz", + initrd => "/boot/restore/all.rdz", + append => $cmdline, + }); + } } else { log::l("no restore bootloader need to be used on $hd_install_path"); } -- cgit v1.2.1