This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Knowledge Base:Chrooting returns exec format error
Synopsis
During the installation of Gentoo Linux, attempting to chroot into the new environment breaks with the following error:
root #
chroot /mnt/gentoo /bin/bash
chroot: failed to run command `/bin/bash': Exec format error
Environment
This article applies to Gentoo Linux installations on an x86_64 platform (amd64 architecture).
Analysis
The error Exec format error means that the binary being executed is made for a different architecture than the environment currently booted. It usually occurs when the system has been booted on a 32-bit system when a 64-bit environment is trying to load.
Resolution
Reboot the live environment and choose the correct architecture (most LiveCDs support a 64-bit kernel as well as a 32-bit option, although it is not booted by default). Look for entries labeled gentoo64 or linux64 if trying to boot a 64-bit system.