aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2013-05-12 04:13:51 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2013-05-12 04:13:51 +0000
commitdf02b599e1f24788dbda1a1f707178c0ad3fb96a (patch)
tree451dd9ee2ec0ed8fb9128d56c6048b8cb45754a5 /bootscripts
parentf4bdf48b7001cad5b3c883c6ee0d17d34c841671 (diff)
Make sure the root fs is mounted read only in mountfs
before halting git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10272 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts')
-rw-r--r--bootscripts/ChangeLog4
-rw-r--r--bootscripts/lfs/init.d/mountfs3
2 files changed, 7 insertions, 0 deletions
diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog
index 627b1630f..3d7b4a5d2 100644
--- a/bootscripts/ChangeLog
+++ b/bootscripts/ChangeLog
@@ -1,3 +1,7 @@
+2013-05-11 Bruce Dubbs <bdubbs@linuxfromscratch.org>
+ * Make sure the root fs is mounted read only in mountfs
+ before halting
+
2013-01-24 Bruce Dubbs <bdubbs@linuxfromscratch.org>
* Remove local attribue of some variables for Bourne
shell compatability
diff --git a/bootscripts/lfs/init.d/mountfs b/bootscripts/lfs/init.d/mountfs
index 47c21bc33..b700d8e7d 100644
--- a/bootscripts/lfs/init.d/mountfs
+++ b/bootscripts/lfs/init.d/mountfs
@@ -65,6 +65,9 @@ case "${1}" in
umount -a -d -r -t notmpfs,nosysfs,nodevtmpfs,noproc >/dev/null
evaluate_retval
+ # Make sure / is mounted read only (umount bug?)
+ mount -n -o remount,ro /
+
# Make all LVM volume groups unavailable, if appropriate
# This fails if swap or / are on an LVM partition
#if [ -x /sbin/vgchange ]; then /sbin/vgchange -an > /dev/null; fi