From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] rc-once/systemd: fall back to the rescue boot-target if rc-once fails to remount RW
Date: Thu, 28 Jul 2016 16:13:30 +0200 [thread overview]
Message-ID: <201607281613.30580.jbe@pengutronix.de> (raw)
In cases where the root filesystem medium has some kind of external
write protection (like an SD card has), remounting the root filesystem
read-write fails and the system seems frozen, because systemd never
starts any log-in console.
This change forces the rescue target for this special case.
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
diff --git a/projectroot/lib/systemd/systemd-rc-once b/projectroot/lib/systemd/systemd-rc-once
index 98b089185604..ff7f7d3dce47 100644
--- a/projectroot/lib/systemd/systemd-rc-once
+++ b/projectroot/lib/systemd/systemd-rc-once
@@ -4,7 +4,10 @@
. /lib/init/rc-once.sh
start() {
- mount_root_rw || exit 1
+ if ! mount_root_rw; then
+ systemctl rescue
+ exit 1
+ fi
if run_rc_once; then
rm -f /system-update
fi
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
reply other threads:[~2016-07-28 14:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201607281613.30580.jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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