Chroot demo
This is a small script to create and setup a chroot
To test edit the setup.sh script and change the BINARIES line to add the binaries you want.
Then run ./setup.sh
it will create a jail
directory next to the script.
Finally run sudo chroot jail
you should obtain a chrooted shell with only this executables
Warnings and limitation
This is only a very small script for demonstrating what a chroot is.
The script is not robust :
- It only copies binaries no config files are shared files
- Special directories are not mounted to the chroot, so no network, no devices etc.
- lib64 is hardly coded, lib32 is not supported
- I do not plan to maintain this script in any way