代码拉取完成,页面将自动刷新
From 3a0171fd435765161406238c8df6f66e859ddd93 Mon Sep 17 00:00:00 2001
From: Don Zickus <dzickus@redhat.com>
Date: Wed, 22 Jul 2015 13:58:53 -0400
Subject: [PATCH 12/55] ppc64le sync grub.cfg changes to disk (#1212114)
After installing a new kernel, if a panic is induced, not all the kernel
pieces are on the disk (most importantly the grub.cfg changes). This can
lead to a hung system on a reboot because the older kernel can not be found.
Address this by forcing all the changes (mainly the fs meta data) to disk
before finishing the kernel package installation.
Tested by 'yum install kernel-...; echo c > /proc/sysrq-trigger'.
Before, the machine would panic and on reboot be stuck without a grub.cfg
to read. After, works as expected.
Resolves: rhbz#1212114
---
new-kernel-pkg | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/new-kernel-pkg b/new-kernel-pkg
index 1f6ab39499f..90652da06b7 100755
--- a/new-kernel-pkg
+++ b/new-kernel-pkg
@@ -927,4 +927,12 @@ fi
# if we mounted the U-Boot directory, unmount it.
[ -n "$mounted" ] && umount $ubootDir
+# make sure changes make it to the disk.
+# if /boot is a mountpoint, force the meta data on disk
+# to by-pass writeback delay.
+# PPC64LE-only to deal with Petitboot issues
+if [ "$ARCH" = "ppc64le" ]; then
+ sync && mountpoint -q /boot &&fsfreeze -f /boot && fsfreeze -u /boot
+fi
+
exit 0
--
2.17.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。