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.
This commit is contained in:
parent
fb15b1894e
commit
a0721ad2b3
|
@ -362,10 +362,10 @@ fi
|
||||||
|
|
||||||
mkdir -m 0755 -p $targetRoot/proc $targetRoot/sys $targetRoot/dev $targetRoot/run
|
mkdir -m 0755 -p $targetRoot/proc $targetRoot/sys $targetRoot/dev $targetRoot/run
|
||||||
|
|
||||||
mount --bind /proc $targetRoot/proc
|
mount --move /proc $targetRoot/proc
|
||||||
mount --bind /sys $targetRoot/sys
|
mount --move /sys $targetRoot/sys
|
||||||
mount --bind /dev $targetRoot/dev
|
mount --move /dev $targetRoot/dev
|
||||||
mount --bind /run $targetRoot/run
|
mount --move /run $targetRoot/run
|
||||||
|
|
||||||
exec switch_root "$targetRoot" "$stage2Init"
|
exec switch_root "$targetRoot" "$stage2Init"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue