* [PATCH][dracut] Sync initramfs after creation
@ 2017-08-07 6:43 Ankit Kumar
[not found] ` <1502088233-10139-1-git-send-email-ankit-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Ankit Kumar @ 2017-08-07 6:43 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA, harald-H+wXaHxf7aLQT0dZR+AlfA
Cc: hbathini-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
mahesh-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
ankit-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
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-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
dracut.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dracut.sh b/dracut.sh
index 70dc79d..81e1562 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1806,4 +1806,10 @@ fi
command -v restorecon &>/dev/null && restorecon -- "$outfile"
+sync $outfile 2> /dev/null
+if [ $? -ne 0 ] ; then
+ dinfo "dracut: sync operartion on newly created initramfs $outfile failed"
+ exit 1
+fi
+
exit 0
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-07 7:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 6:43 [PATCH][dracut] Sync initramfs after creation Ankit Kumar
[not found] ` <1502088233-10139-1-git-send-email-ankit-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-08-07 7:03 ` Dracut GitHub Import Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox