From a0721ad2b3167f7f02b7af61709c646d6b16ee47 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Jul 2012 22:04:28 -0400 Subject: [PATCH] stage-1-init: Use mount --move to move /sys etc. to the target root This fixes warnings about /sys/kernel/security during shutdown and cleans up /proc/mounts. --- modules/system/boot/stage-1-init.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/system/boot/stage-1-init.sh b/modules/system/boot/stage-1-init.sh index 175b58a3719..112d3798aec 100644 --- a/modules/system/boot/stage-1-init.sh +++ b/modules/system/boot/stage-1-init.sh @@ -362,10 +362,10 @@ fi mkdir -m 0755 -p $targetRoot/proc $targetRoot/sys $targetRoot/dev $targetRoot/run -mount --bind /proc $targetRoot/proc -mount --bind /sys $targetRoot/sys -mount --bind /dev $targetRoot/dev -mount --bind /run $targetRoot/run +mount --move /proc $targetRoot/proc +mount --move /sys $targetRoot/sys +mount --move /dev $targetRoot/dev +mount --move /run $targetRoot/run exec switch_root "$targetRoot" "$stage2Init"