diff options
author | Francois Pons <fpons@mandriva.com> | 2003-03-31 17:32:51 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-03-31 17:32:51 +0000 |
commit | ebd2f1d9e9566bca546e3af1528fe5ee3b393b99 (patch) | |
tree | 55cd2a5374acee5b4c862f8759cf02950a957638 /perl-install | |
parent | d9396fe9912a2ca64b89131e4354ccbca615467b (diff) | |
download | drakx-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.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 22 |
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"); } |