mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 04:56:58 +02:00
enter_chroot: ensure the chroot's root directory is a mount point
This commit is contained in:
parent
1093592e4d
commit
09851b8460
@ -216,6 +216,10 @@ setup_env() {
|
||||
# Using 'slave' means we see global changes but cannot change global state.
|
||||
mount --make-rslave /
|
||||
|
||||
# Make sure the new root directory itself is a mount point. Tools like
|
||||
# unshare assume that things like `mount --make-rprivate /` work.
|
||||
setup_mount "${MOUNTED_PATH}" "--bind" /
|
||||
|
||||
setup_mount none "-t proc" /proc
|
||||
setup_mount none "-t sysfs" /sys
|
||||
setup_mount /dev "--bind" /dev
|
||||
|
Loading…
Reference in New Issue
Block a user