Skip to content
Snippets Groups Projects
Select Git revision
  • main
1 result

chroot-demo

  • David Beniamine's avatar
    David Beniamine authored
    cf7d10aa
    History
    Name Last commit Last update
    .gitignore
    Readme.md
    setup.sh

    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