diff --git a/sdk_lib/enter_chroot.sh b/sdk_lib/enter_chroot.sh index 2434960e05..b344ee7bd5 100755 --- a/sdk_lib/enter_chroot.sh +++ b/sdk_lib/enter_chroot.sh @@ -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