summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-08-15 14:23:03 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-08-15 14:23:03 +0100
commit685d7db4c9b8caff105de90731c039809f971c09 (patch)
tree110cdc928e9db5ea13238a9f542c1754993adf16 /perl-install/bootloader.pm
parent4846df45d24880a8b4d0ca82b2d179b17b4e80c2 (diff)
downloaddrakx-685d7db4c9b8caff105de90731c039809f971c09.tar
drakx-685d7db4c9b8caff105de90731c039809f971c09.tar.gz
drakx-685d7db4c9b8caff105de90731c039809f971c09.tar.bz2
drakx-685d7db4c9b8caff105de90731c039809f971c09.tar.xz
drakx-685d7db4c9b8caff105de90731c039809f971c09.zip
Fix failure to update grub2 config when service_harddrake attempts to add/remove the nokmsboot option.
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 0c6a1292b..8cd392b0e 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -2104,10 +2104,12 @@ sub write_grub2 {
write_grub2_sysconfig($bootloader, $o_all_hds, $o_backup_extension);
my $f1 = "$::prefix/boot/grub2/grub.cfg";
- # we won't just rename as update-grub2 (more likely os-prober may fail):
+ #- we won't just rename as grub2-mkconfig (more likely os-prober) may fail:
cp_af($f1, $f1 . '.old') if -e $f1;
- run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error";
- log::l("update-grub2 logs: $error");
+ #- don't use the update-grub2 script here, it hangs when run by service_harddrake
+ #- during boot because it causes systemd to try to start a user session
+ run_program::rooted($::prefix, 'grub2-mkconfig', '2>', \$error, '-o', '/boot/grub2/grub.cfg') or die "grub2-mkconfig failed: $error";
+ log::l("grub2-mkconfig logs: $error");
write_grub2_default_entry($bootloader, $o_all_hds, $o_backup_extension);
check_enough_space();