summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-06-16 06:50:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-06-16 06:50:04 +0000
commit0d7ae0f998220aed6a923703452660406b2bc40d (patch)
treed1a8b3555c9dacb83acd5bbd36d91304f8283ef5 /perl-install
parent4590359c9eec53767477c20e1baa5c47a6cef15b (diff)
downloaddrakx-backup-do-not-use-0d7ae0f998220aed6a923703452660406b2bc40d.tar
drakx-backup-do-not-use-0d7ae0f998220aed6a923703452660406b2bc40d.tar.gz
drakx-backup-do-not-use-0d7ae0f998220aed6a923703452660406b2bc40d.tar.bz2
drakx-backup-do-not-use-0d7ae0f998220aed6a923703452660406b2bc40d.tar.xz
drakx-backup-do-not-use-0d7ae0f998220aed6a923703452660406b2bc40d.zip
- new grub has files in /lib/grub/i386-pc, copy them in /boot/grub (as done by grub-install)
- use "setup" grub command instead of "install" so that it handles stage1.5 embedding if possible, and is simpler
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index fd13a797f..9b1157ba9 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1266,6 +1266,11 @@ sub grub2file {
sub write_grub {
my ($bootloader, $all_hds) = @_;
+ {
+ my @files = grep { /(stage1|stage2|_stage1_5)$/ } glob("$::prefix/lib/grub/*/*");
+ cp_af(@files, "$::prefix/boot/grub");
+ }
+
my $fstab = [ fs::get::fstab($all_hds) ];
my @legacy_floppies = detect_devices::floppies();
my @sorted_hds = sort_hds_according_to_bios($bootloader, $all_hds);
@@ -1338,13 +1343,13 @@ sub write_grub {
}
{
my $f = "$::prefix/boot/grub/install.sh";
- my $dev = device_string2grub($bootloader->{boot}, \@legacy_floppies, \@sorted_hds);
- my ($stage1, $stage2) = map { $file2grub->(glob("/lib/grub/*/$_")) } qw(stage1 stage2);
- my ($menu_lst) = $file2grub->("/boot/grub/menu.lst");
+ my $boot_dev = device_string2grub($bootloader->{boot}, \@legacy_floppies, \@sorted_hds);
+ my $files_dev = device2grub(fs::get::root_($fstab, 'boot'), \@sorted_hds);
renamef($f, "$f.old");
- output_with_perm("$::prefix/boot/grub/install.sh", 0755,
+ output_with_perm($f, 0755,
"grub --device-map=/boot/grub/device.map --batch <<EOF
-install $stage1 d $dev $stage2 p $menu_lst
+root $files_dev
+setup $boot_dev
quit
EOF
");