From be9b366e687cc4595c0484ae8bf3109e8c062f13 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 28 Aug 2013 22:20:20 -0400 Subject: [PATCH] Do not unmount kernel fs in runlevel 0 and 6 --- stage1/bootscripts/mountfs | 8 ++++++-- stage1/bootscripts/mountkernfs | 6 +----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stage1/bootscripts/mountfs b/stage1/bootscripts/mountfs index c7fd27e..bed8bfb 100755 --- a/stage1/bootscripts/mountfs +++ b/stage1/bootscripts/mountfs @@ -31,12 +31,16 @@ case "$1" in # at this point mount will automatically mount it read-only which # is what is supposed to happen. This way no data can be written # anymore to disk). - cmd_run_nolog_box "Unmounting file systems" umount -a -d -r -v -t notmpfs,noproc + cmd_run_nolog_box "Unmounting file systems" \ + umount -a -d -r -v -t notmpfs,nosysfs,nodevtmpfs,noproc,nodevpts if [ $? -ne 0 ]; then exit ${EXIT_CODE_WARNING} fi + + # Make sure / is mounted read-only (umount bug?) + mount -o remount,ro / ;; - + *) echo "Usage: $0 {start|stop}" exit ${EXIT_CODE_FAILURE} diff --git a/stage1/bootscripts/mountkernfs b/stage1/bootscripts/mountkernfs index e0552af..263e4ff 100755 --- a/stage1/bootscripts/mountkernfs +++ b/stage1/bootscripts/mountkernfs @@ -18,12 +18,8 @@ case "$1" in cmd_run_log_box "Mounting /run" mount /run ;; - stop) - umount -n proc - ;; - *) - echo "Usage: $0 {start|stop}" + echo "Usage: $0 {start}" exit ${EXIT_CODE_FAILURE} ;; esac -- 2.20.1