From: Davin McCall Date: Mon, 27 Mar 2017 21:24:59 +0000 (+0100) Subject: linux service scripts: remount /proc after intial mount X-Git-Tag: v0.05~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=da8827026ec5a89fc4b0557d1311acd5138c9798;p=oweals%2Fdinit.git 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. --- 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