From df02b599e1f24788dbda1a1f707178c0ad3fb96a Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 12 May 2013 04:13:51 +0000 Subject: [PATCH] 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 --- bootscripts/ChangeLog | 4 ++++ bootscripts/lfs/init.d/mountfs | 3 +++ chapter01/changelog.xml | 6 +++++- packages.ent | 2 +- 4 files changed, 13 insertions(+), 2 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 + * Make sure the root fs is mounted read only in mountfs + before halting + 2013-01-24 Bruce Dubbs * 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 diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 50d0dd6ea..461640f3c 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -38,6 +38,10 @@ 2013-05-11 + + [bdubbs] - Minor update to boot script mountfs + to ensure clean shutdown. + [bdubbs] - Upgrade to gawk-4.1.0. Fixes #3343. @@ -57,7 +61,7 @@ #3341. - [bdubbs] - Upgrade to gettest-0.18.2.1. Fixes + [bdubbs] - Upgrade to gettext-0.18.2.1. Fixes #3298. diff --git a/packages.ent b/packages.ent index a36bf6d8d..47f5d52f6 100644 --- a/packages.ent +++ b/packages.ent @@ -310,7 +310,7 @@ - +