summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-03-20 16:53:11 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-03-20 17:13:54 +0100
commit4846103510d22eeb9f64711a1573feb7a2bbdb66 (patch)
treea7e362dbb36fea950614ff691045587d9cec06f9 /perl-install
parentb152ff51997fd8df4ebd44bfdbe2e08ff98a9b3a (diff)
downloaddrakx-4846103510d22eeb9f64711a1573feb7a2bbdb66.tar
drakx-4846103510d22eeb9f64711a1573feb7a2bbdb66.tar.gz
drakx-4846103510d22eeb9f64711a1573feb7a2bbdb66.tar.bz2
drakx-4846103510d22eeb9f64711a1573feb7a2bbdb66.tar.xz
drakx-4846103510d22eeb9f64711a1573feb7a2bbdb66.zip
copy instead of renaming grub.cfg (mga#25542)
rationale: update-grub2 (or more likely os-prober) 's failure can leave the system in an unbootable state
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/bootloader.pm3
-rw-r--r--perl-install/install/NEWS1
3 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 2484413c6..8da9be73e 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,6 @@
- diskdrake:
o add minimal support for exFAT
+- drakboot: copy instead of renaming grub.cfg (mga#25542)
- remove no more existing modules from various/crypto
(so that rescue system display less "module xxx not found")
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index fa678bce4..3204aa194 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -2103,7 +2103,8 @@ sub write_grub2 {
write_grub2_sysconfig($bootloader, $o_all_hds, $o_backup_extension);
my $f1 = "$::prefix/boot/grub2/grub.cfg";
- renamef($f1, $f1 . '.old');
+ # we won't just rename as update-grub2 (more likely os-prober may fail):
+ cp_af($f1, $f1 . '.old');
run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error";
log::l("update-grub2 logs: $error");
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index b4bfe96f9..f685cccfd 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,4 @@
+- bootloader config: copy instead of renaming grub.cfg (mga#25542)
- install dmsetup when encrypting "/" (thus workarounding unbootable minimal
system as dracut's crypt module depends on it)
- partitioning: