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:

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.