On Fri, 27 Jul 2018 13:20:34 +0200
Patrick Dupre wrote:
Why I cannot make a chroot?
Because chroot only does the one disk, but a operational
system requires stuff like /dev and /proc.
Here's the critical bits of the chroot script I use
to make a chroot functional:
mount --bind /dev $newroot/dev
mount --bind /dev/pts $newroot/dev/pts
mount --bind /dev/shm $newroot/dev/shm
mount -t proc none $newroot/proc
mount -t sysfs none $newroot/sys
chroot $newroot /bin/bash
umount $newroot/sys
umount $newroot/proc
umount $newroot/dev/shm
umount $newroot/dev/pts
umount $newroot/dev