diff options
author | Thomas Backlund <tmb@mageia.org> | 2012-12-17 19:07:47 +0000 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2012-12-17 19:07:47 +0000 |
commit | 7fd2efcef961711a995a89c3245a972a136e2463 (patch) | |
tree | ddec8283adaf6df350b93f1914b5b4647fd1a6ea /perl-install/bootloader.pm | |
parent | e5660bf092c9a54871d60b7eaf9393133d509e2e (diff) | |
download | drakx-7fd2efcef961711a995a89c3245a972a136e2463.tar drakx-7fd2efcef961711a995a89c3245a972a136e2463.tar.gz drakx-7fd2efcef961711a995a89c3245a972a136e2463.tar.bz2 drakx-7fd2efcef961711a995a89c3245a972a136e2463.tar.xz drakx-7fd2efcef961711a995a89c3245a972a136e2463.zip |
fix installing grub2 from live session (blino)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index dd0b25551..cecd5aa4c 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1970,9 +1970,13 @@ sub restore_previous_MBR_bootloader { sub install_grub2 { my ($bootloader, $_all_hds) = @_; my $error; - run_program::rooted($::prefix, 'grub2-install', '2>', \$error, $bootloader->{boot}) or die "grub2 failed: $error"; + my $grub2_cfg = "/boot/grub2/grub.cfg"; + if (!-s "$::prefix/$grub2_cfg") { + run_program::rooted($::prefix, 'grub2-mkconfig', '2>', \$error, '-o', $grub2_cfg) or die "grub2-mkconfig failed: $error"; + } + run_program::rooted($::prefix, 'grub2-install', '2>', \$error, $bootloader->{boot}) or die "grub2-install failed: $error"; } - + sub install_grub { my ($bootloader, $all_hds) = @_; |