On 23 October 2014 02:47, Urmish Ajit Thakker <[email protected]> wrote: > Hi, > > I am trying to chroot into an arm system from a x86 host. However, I keep > getting the following error > > chroot: failed to run command `/bin/bash': Exec format error. > > I think I have already installed the required files and I am not able to > debug the issue. Can anyone help me with this?
A set of things you can try to narrow down the problem: /path/to/chroot/usr/bin/qemu-arm-static --help # if this doesn't work you haven't installed the right QEMU into # your chroot sudo chroot /path/to/chroot /usr/bin/qemu-arm-static --help # if this doesn't work then your allegedly static QEMU # isn't actually statically linked /path/to/chroot/usr/bin/qemu-arm-static /path/to/chroot/bin/ls # this *should* fail with "/lib/ld-linux.so.3: No such file or directory" # or similar, indicating we read the executable but couldn't find # the dynamic linker. If this fails then maybe your chroot doesn't # have ARM binaries in it... sudo chroot /path/to/chroot /usr/bin/qemu-arm-static /bin/ls # this should work and list the files in the chroot directory. # if it doesn't work then likely your chroot is wrongly set up sudo chroot /path/to/chroot /bin/ls # if this fails but the previous command worked, then your binfmt-misc # registration is broken. thanks -- PMM
