View Single Post
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#165
Originally Posted by RobbieThe1st View Post
Thanks.

But, erm, two questions:
Which are those/where can I find them, and why is it saying "can't find file X"? Shouldn't it say something like "missing X library.so"?
Use ldd to find the required libraries for an application. For busybox, they're:
  • /lib/libcrypt.so.1 (symlink to /lib/libcrypt-2.5.so)
  • /lib/libc.so.6 (symlink to /lib/libc-2.5.so)
  • /lib/ld-linux.so.3 (symlink to /lib/ld-2.5.so)

You'll probably also need to bind mount /dev, /proc and /sys under your chroot:
Code:
mkdir /tmp/disk/dev /tmp/disk/sys /tmp/disk/proc
mount -o bind /dev /tmp/disk/dev
mount -o bind /sys /tmp/disk/sys
mount -o bind /proc /tmp/disk/proc
As for why you get the error message you get - it's a bit confusing, but actually correct. It cannot execute /bin/sh because the linked libraries don't exist.
 

The Following User Says Thank You to Rob1n For This Useful Post: