[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using IA32 chroot: Exec format error



Alex,
that's it!!! Thank you for your right guess!
This needs to be added to FAQ.

Now I've got chroot'ing as well as direct running some ia32 binaries to work.

Max

Alex Perry wrote:
Max,
everything you write is consistent with having a kernel that does not have 32 bit emulation available. Could you please check your config file for the status of the symbol CONFIG_IA32_EMULATION in your running kernel ? The quick way to try, which may not work, is
   zgrep CONFIG_IA32_EMULATION /proc/config.gz



Max wrote:

Hello!

I'm having troubles using IA32 applications under debian-amd64.

First, I installed ia32-libs with apt-get. I noticed that ia32-libs description/docs do not mention 'chroot' at all but claim that "ia32 Linux applications can be executed on 64-bit systems". So I hoped that I would be able "just run" ia32 binaries as promised. But in reality I got "cannot execute binary file" errors.

Next I tried to get into ia32 enviroment with `chroot /emul/ia32-linux/' command but it didn't work saying that '/bin/bash' is missing. I checked ia32-libs package and indeed it did not provide '/bin/bash'.

I decided to follow FAQ with debootstrap'ing. So I run

debootstrap --arch i386 sid /emul/ia32-linux/ ftp://ftp.debian.org/debian

It did a lot of checking/installing/validating/extracting but finally ended up with the following

chroot: cannot run command `mount': Exec format error
W: Failure trying to run: chroot /emul/ia32-linux mount -t proc proc /proc
umount: /emul/ia32-linux/dev/pts: not found
umount: /emul/ia32-linux/dev/shm: not found
umount: /emul/ia32-linux/proc/bus/usb: not found
umount: /emul/ia32-linux/proc: not mounted

So debootstrap installed a lot of IA32 stuff including '/bin/bash' but that stuff still does not work.
In particular, chroot'ing now reports

# chroot /emul/ia32-linux/
chroot: cannot run command `/bin/bash': Exec format error

The same error appears on attempts to run any other application with 'dchroot'.

At the same time 'file /emul/ia32-linux/bin/bash' reports
/emul/ia32-linux/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), stripped
which looks OK to me.

So I got stuck. Please advise.

Thanks,
Max







Reply to: