Skip to content

Instantly share code, notes, and snippets.

@wwalker
Created September 10, 2009 20:51
Show Gist options
  • Save wwalker/184810 to your computer and use it in GitHub Desktop.
Save wwalker/184810 to your computer and use it in GitHub Desktop.
[root@alert ~]# ldd /bin/bash
libtermcap.so.2 => /lib64/libtermcap.so.2 (0x000000390c200000)
libdl.so.2 => /lib64/libdl.so.2 (0x000000390aa00000)
libc.so.6 => /lib64/libc.so.6 (0x000000390a600000)
/lib64/ld-linux-x86-64.so.2 (0x000000390a200000)
[root@alert ~]# mkdir my_chroot
[root@alert ~]# mkdir my_chroot/bin
[root@alert ~]# mkdir my_chroot/lib
[root@alert ~]# cp /bin/bash my_chroot/bin
[root@alert ~]# cp /lib64/libtermcap.so.2 /lib64/libdl.so.2 /lib64/libc.so.6 /lib64/ld-linux-x86-64.so.2 my_chroot/lib/
[root@alert ~]# 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