# Create Devterm CM3 image: question about chroot

**URL:** <https://forum.clockworkpi.com/t/create-devterm-cm3-image-question-about-chroot/8740>\
**Category:** Firmware and Apps\
**Created:** [July 14, 2022, 9:48am UTC](https://forum.clockworkpi.com/t/create-devterm-cm3-image-question-about-chroot/8740 "2022-07-14T09:48:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@edwin](https://forum.clockworkpi.com/u/edwin)\
**Post date:** [July 14, 2022, 9:48am UTC](https://forum.clockworkpi.com/t/create-devterm-cm3-image-question-about-chroot/8740/1 "2022-07-14T09:48:44Z")

</div>

Following the instructions on [Create DevTerm CM3 OS image from scratch · clockworkpi/DevTerm Wiki · GitHub](https://github.com/clockworkpi/DevTerm/wiki/Create-DevTerm-CM3-OS-image-from-scratch#start-a-chroot-env) 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?

---

<div class="post-metadata">

**Author:** ![CaptainCrashOnMars](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/captaincrashonmars/32/5329_2.png) [@CaptainCrashOnMars](https://forum.clockworkpi.com/u/CaptainCrashOnMars)\
**Post date:** [July 15, 2022, 2:59am UTC](https://forum.clockworkpi.com/t/create-devterm-cm3-image-question-about-chroot/8740/2 "2022-07-15T02:59:14Z")

</div>

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:

```auto
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 

```

---

<div class="post-metadata">

**Author:** ![edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@edwin](https://forum.clockworkpi.com/u/edwin)\
**Post date:** [July 15, 2022, 5:40am UTC](https://forum.clockworkpi.com/t/create-devterm-cm3-image-question-about-chroot/8740/3 "2022-07-15T05:40:09Z")

</div>

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