Create Devterm CM3 image: question about chroot

Following the instructions on Create DevTerm CM3 OS image from scratch · clockworkpi/DevTerm Wiki · GitHub i try to mount and chroot to the mount point of the downloaded image. When i try to

sudo chroot .

on the mount point of the image i get an error message:

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

What should i do to chroot?

You cannot chroot into different architecture. By chrooting, you are executing the binaries (from the chroot) on your architecture. Executing ARM binaries on x86 (and x86_64 in that matter) would lead to “Exec format error”.

You can do this:

sudo apt-get update
sudo apt-get install debootstrap qemu qemu-user-static
sudo qemu-debootstrap --arch armhf bionic armhf-chroot
sudo chroot armhf-chroot '/bin/bash'

uname -m 

Thanks, that makes a lot of sense. I’ve made the image on another pi. Now i have bullseye running on the devterm.

1 Like