Skip to content

Instantly share code, notes, and snippets.

@wwalker
Created September 10, 2009 20:47
Show Gist options
  • Save wwalker/184807 to your computer and use it in GitHub Desktop.
Save wwalker/184807 to your computer and use it in GitHub Desktop.
[root@dawkins ~]# mkdir my_chroot
[root@dawkins ~]# mkdir my_chroot/bin
[root@dawkins ~]# mkdir my_chroot/lib
[root@dawkins ~]# cp /bin/bash my_chroot/bin
[root@dawkins ~]# cp /lib/libtinfo.so.5 /lib/libdl.so.2 /lib/libc.so.6 /lib/ld-linux.so.2 my_chroot/lib
[root@dawkins ~]# chroot my_chroot
bash-4.0# ^C
bash-4.0# exit
[root@alpha ~]# mkdir my_chroot
[root@alpha ~]# mkdir my_chroot/bin
[root@alpha ~]# mkdir my_chroot/lib
[root@alpha ~]# cp /bin/bash my_chroot/bin
[root@alpha ~]# cp /lib64/libtermcap.so.2 /lib64/libdl.so.2 /lib64/libc.so.6 /lib64/ld-linux-x86-64.so.2 my_chroot/lib/
[root@alpha ~]# chroot my_chroot
chroot: cannot run command `/bin/bash': No such file or directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment