|
|
24fce8 |
From 3a0171fd435765161406238c8df6f66e859ddd93 Mon Sep 17 00:00:00 2001
|
|
|
24fce8 |
From: Don Zickus <dzickus@redhat.com>
|
|
|
24fce8 |
Date: Wed, 22 Jul 2015 13:58:53 -0400
|
|
|
24fce8 |
Subject: [PATCH 12/55] ppc64le sync grub.cfg changes to disk (#1212114)
|
|
|
24fce8 |
|
|
|
24fce8 |
After installing a new kernel, if a panic is induced, not all the kernel
|
|
|
24fce8 |
pieces are on the disk (most importantly the grub.cfg changes). This can
|
|
|
24fce8 |
lead to a hung system on a reboot because the older kernel can not be found.
|
|
|
24fce8 |
|
|
|
24fce8 |
Address this by forcing all the changes (mainly the fs meta data) to disk
|
|
|
24fce8 |
before finishing the kernel package installation.
|
|
|
24fce8 |
|
|
|
24fce8 |
Tested by 'yum install kernel-...; echo c > /proc/sysrq-trigger'.
|
|
|
24fce8 |
|
|
|
24fce8 |
Before, the machine would panic and on reboot be stuck without a grub.cfg
|
|
|
24fce8 |
to read. After, works as expected.
|
|
|
24fce8 |
|
|
|
24fce8 |
Resolves: rhbz#1212114
|
|
|
24fce8 |
---
|
|
|
24fce8 |
new-kernel-pkg | 8 ++++++++
|
|
|
24fce8 |
1 file changed, 8 insertions(+)
|
|
|
24fce8 |
|
|
|
24fce8 |
diff --git a/new-kernel-pkg b/new-kernel-pkg
|
|
|
24fce8 |
index 1f6ab39499f..90652da06b7 100755
|
|
|
24fce8 |
--- a/new-kernel-pkg
|
|
|
24fce8 |
+++ b/new-kernel-pkg
|
|
|
24fce8 |
@@ -927,4 +927,12 @@ fi
|
|
|
24fce8 |
# if we mounted the U-Boot directory, unmount it.
|
|
|
24fce8 |
[ -n "$mounted" ] && umount $ubootDir
|
|
|
24fce8 |
|
|
|
24fce8 |
+# make sure changes make it to the disk.
|
|
|
24fce8 |
+# if /boot is a mountpoint, force the meta data on disk
|
|
|
24fce8 |
+# to by-pass writeback delay.
|
|
|
24fce8 |
+# PPC64LE-only to deal with Petitboot issues
|
|
|
24fce8 |
+if [ "$ARCH" = "ppc64le" ]; then
|
|
|
24fce8 |
+ sync && mountpoint -q /boot &&fsfreeze -f /boot && fsfreeze -u /boot
|
|
|
24fce8 |
+fi
|
|
|
24fce8 |
+
|
|
|
24fce8 |
exit 0
|
|
|
24fce8 |
--
|
|
|
24fce8 |
2.17.1
|
|
|
24fce8 |
|