summaryrefslogtreecommitdiffstats
path: root/liveinit.tpl
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2019-01-17 15:23:09 +0100
committer Eric Hameleers <alien@slackware.com>2019-01-17 15:23:09 +0100
commit48d5d3d98c7f105aab38edc299df9521fa5b118e (patch)
treebda21a4e771410f219121df61f40ec9002d36a0c /liveinit.tpl
parent23b1e956e1132b87e59ddaa2a6a3075c5189b2bc (diff)
downloadliveslak-48d5d3d98c7f105aab38edc299df9521fa5b118e.tar.gz
liveslak-48d5d3d98c7f105aab38edc299df9521fa5b118e.tar.xz
Follow the Slackware init with respect to readonly root on boot
The live init script creates a /etc/fastboot file to prevent any file system check on boot. This is cleaner than hacking rc.S and failing.
Diffstat (limited to 'liveinit.tpl')
-rwxr-xr-xliveinit.tpl9
1 files changed, 5 insertions, 4 deletions
diff --git a/liveinit.tpl b/liveinit.tpl
index b3b192e..c47c107 100755
--- a/liveinit.tpl
+++ b/liveinit.tpl
@@ -1326,6 +1326,9 @@ EOT
/sbin/udevadm settle --timeout=10
echo 0x0100 > /proc/sys/kernel/real-root-dev
+ # Re-mount the overlay read-only:
+ mount -t overlay -o remount,ro,workdir=${OVLWORK},upperdir=${UPPERDIR},lowerdir=${RODIRS} overlay /mnt/overlay
+
if [ ! -r /mnt/overlay/${INIT} ]; then
echo "ERROR: No ${INIT} found on rootdev (or not mounted). Trouble ahead."
echo " You can try to fix it. Type 'exit' when things are done."
@@ -1345,10 +1348,8 @@ unset ERR
umount /proc
umount /sys
umount /run 2>/dev/null
-# We disable the filesystem checking code in /etc/rc.d/rc.S,
-# so we need to keep the fs writable here.
-#mount -o ro,remount /mnt/overlay 2>/dev/null
-echo "${MARKER}: Slackware Live system is ready."
+echo "${MARKER}: Slackware Live system is ready."
echo "${MARKER}: exiting"
+
exec switch_root /mnt/overlay $INIT $RUNLEVEL