I have a filesystem build with buildroot, to compile code for a device using a old kernel and uClibc.

Now I want to chroot into the fs. The problem is, I don't have /bin/bash, just /bin/busybox.
How do I say chroot to use busybox ash instead?

I already tried to create a link to busybox ash, but chroot still says failed to run command /bin/bash. no such file or directory.

chroot /path/to/fs /bin/ash

See the chroot man page for details.

  • this doesn't work, i just have busybox in my /bin/ directory. – Pingu Dec 13 '12 at 15:13
  • You said that you had a link ash -> busybox. Anyway, just run chroot /path/to/fs /bin/busybox ash then. – Stéphane Chazelas Dec 13 '12 at 15:17

You need to 'ldd busybox' and copy over the shared libs to which it links into the chroot. Use 'cp -L src dst' on the libs because they are usually simlinked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.