summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-02-27 17:44:16 +0000
committerThierry Vignaud <tv@mageia.org>2013-02-27 17:44:16 +0000
commitc3bf55979df2978ff72d1d2e31b712665b8b2ed8 (patch)
tree74f210f57d6c3dcb1516984560112a0c0c0a5fdc /perl-install/bootloader.pm
parentb4fa6ee6ef4e9b54f347abe6c54a4a3dff4b5ede (diff)
downloaddrakx-c3bf55979df2978ff72d1d2e31b712665b8b2ed8.tar
drakx-c3bf55979df2978ff72d1d2e31b712665b8b2ed8.tar.gz
drakx-c3bf55979df2978ff72d1d2e31b712665b8b2ed8.tar.bz2
drakx-c3bf55979df2978ff72d1d2e31b712665b8b2ed8.tar.xz
drakx-c3bf55979df2978ff72d1d2e31b712665b8b2ed8.zip
fix installing grub2 on a partition (mga#8462)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 5c89d055b..2512842a2 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -2009,7 +2009,12 @@ sub install_grub2 {
my $error;
write_grub2($bootloader, $all_hds);
my $boot = $bootloader->{boot}
- run_program::rooted($::prefix, 'grub2-install', '2>', \$error, $boot) or die "grub2-install failed: $error";
+ # if (member($boot, map { "/dev/$_->{device}" } @{$all_hds->{hds}}) {
+ if ($boot =~ /\d$/) {
+ run_program::rooted($::prefix, 'grub2-install', '2>', \$error, '--grub-setup=/bin/true', $boot) or die "grub2-install failed: $error";
+ } else {
+ run_program::rooted($::prefix, 'grub2-install', '2>', \$error, $boot) or die "grub2-install failed: $error";
+ }
setVarsInSh("$::prefix/boot/grub2/drakboot.conf", { boot => $boot });
}