You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
798 B
30 lines
798 B
4 years ago
|
From 1126a69746b6e0625d4a8db3b246a3edb7c5f551 Mon Sep 17 00:00:00 2001
|
||
|
From: Ankit Kumar <ankit@linux.vnet.ibm.com>
|
||
|
Date: Mon, 7 Aug 2017 12:13:53 +0530
|
||
|
Subject: [PATCH] Sync initramfs after creation
|
||
|
|
||
|
If we trigger crash just after creating initramfs, sometimes it is
|
||
|
observed that initramfs is not written to disk causing the subsequent
|
||
|
boot to fail. A sync should resolve this.
|
||
|
|
||
|
Signed-off-by: Ankit Kumar <ankit@linux.vnet.ibm.com>
|
||
|
---
|
||
|
dracut.sh | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/dracut.sh b/dracut.sh
|
||
|
index 27489528..9df63cd7 100755
|
||
|
--- a/dracut.sh
|
||
|
+++ b/dracut.sh
|
||
|
@@ -1704,4 +1704,10 @@ else
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
+sync $outfile 2> /dev/null
|
||
|
+if [ $? -ne 0 ] ; then
|
||
|
+ dinfo "dracut: sync operartion on newly created initramfs $outfile failed"
|
||
|
+ exit 1
|
||
|
+fi
|
||
|
+
|
||
|
exit 0
|