summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-03-31 17:32:51 +0000
committerFrancois Pons <fpons@mandriva.com>2003-03-31 17:32:51 +0000
commitebd2f1d9e9566bca546e3af1528fe5ee3b393b99 (patch)
tree55cd2a5374acee5b4c862f8759cf02950a957638
parentd9396fe9912a2ca64b89131e4354ccbca615467b (diff)
downloaddrakx-ebd2f1d9e9566bca546e3af1528fe5ee3b393b99.tar
drakx-ebd2f1d9e9566bca546e3af1528fe5ee3b393b99.tar.gz
drakx-ebd2f1d9e9566bca546e3af1528fe5ee3b393b99.tar.bz2
drakx-ebd2f1d9e9566bca546e3af1528fe5ee3b393b99.tar.xz
drakx-ebd2f1d9e9566bca546e3af1528fe5ee3b393b99.zip
copy kernel and stage1 in order to avoid remapping /mnt/hd on the fly during
install for bootloader installation to complete correctly.
-rw-r--r--perl-install/bootloader.pm22
1 files 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");
}