I have a 64bit Debian system running on my laptop. I wanted to chroot into a RasPiOS system (Raspberry Pi OS), but this OS is only 32 bit. When I try to chroot I get the following error:

# chroot /media/rpi /bin/bash
chroot: failed to run command ‘/bin/bash’: Exec format error

# ls -al /media/rpi/bin/bash
-rwxr-xr-x 1 root root 925124 2019-04-18 06:12:36 /media/rpi/bin/bash*

Some people say it's because of the mismatch between 64 and 32 bit arch.

So is there a way to chroot into 32bit system from 64bit host?

1 Answer 1


The difficulty comes from the fact that your Raspberry Pi OS environment is built for ARM CPUs, not the x86 CPU used in your laptop.

To be able to chroot into it, you need to install an emulator so that the binaries can run on your laptop:

sudo apt install qemu-user-static

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .