From: Ankit Kumar <ankit-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: hbathini-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
mahesh-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
ankit-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Subject: [PATCH][dracut] Sync initramfs after creation
Date: Mon, 7 Aug 2017 12:13:53 +0530 [thread overview]
Message-ID: <1502088233-10139-1-git-send-email-ankit@linux.vnet.ibm.com> (raw)
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
next reply other threads:[~2017-08-07 6:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 6:43 Ankit Kumar [this message]
[not found] ` <1502088233-10139-1-git-send-email-ankit-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-08-07 7:03 ` [PATCH][dracut] Sync initramfs after creation Dracut GitHub Import Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1502088233-10139-1-git-send-email-ankit@linux.vnet.ibm.com \
--to=ankit-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
--cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hbathini-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mahesh-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).