chroot

Last modified by Leon Poon on 2021/06/20 12:24

Before entering chroot:

for x in sys proc dev dev/pts ; do mount /$x $x -o bind,ro; done; for x in run run/lock dev/shm; do mkdir -pv $x; mount tmpfs $x -t tmpfs ; done

After exiting chroot:

umount dev/shm run/lock run dev/pts dev proc sys