mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] rc-once/systemd: fall back to the rescue boot-target if rc-once fails to remount RW
@ 2016-07-28 14:13 Juergen Borleis
  0 siblings, 0 replies; only message in thread
From: Juergen Borleis @ 2016-07-28 14:13 UTC (permalink / raw)
  To: ptxdist

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-28 14:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 14:13 [ptxdist] rc-once/systemd: fall back to the rescue boot-target if rc-once fails to remount RW Juergen Borleis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox