From da8827026ec5a89fc4b0557d1311acd5138c9798 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Mon, 27 Mar 2017 22:24:59 +0100 Subject: [PATCH] linux service scripts: remount /proc after intial mount The "hidepid=1" mount option to /proc doesn't appear to take effect on the first mount. May be a kernel or "mount" bug. In the meantime, workaround it by remounting immediately with the desired option. --- doc/linux/services/early-filesystems.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/linux/services/early-filesystems.sh b/doc/linux/services/early-filesystems.sh index ca70379..58bf09d 100755 --- a/doc/linux/services/early-filesystems.sh +++ b/doc/linux/services/early-filesystems.sh @@ -9,7 +9,10 @@ if [ "$1" = start ]; then # Ideally devtmpfs will be mounted by kernel: mount -n -t devtmpfs tmpfs /dev mount -n -t tmpfs -o mode=775 tmpfs /run + # "hidepid=1" doesn't appear to take effect on first mount of /proc, + # so we mount it and then remount: mount -n -t proc -o hidepid=1 proc /proc + mount -n -t proc -o remount,hidepid=1 proc /proc mkdir /run/udev mkdir /dev/pts mkdir /dev/shm -- 2.25.1