Creating a Multiarch chroot with multistrap

Add Multiarch support to the [General] section:

# enable Multiarch for the specified architectures
multiarch=armel mipsel

Then add sections for each set of packages which are to be installed for the relevant foreign architecture(s):


These two changes, together, will cause multistrap to check the underlying dpkg support and will warn if there is no support for Multiarch on your system. (The relevant sections will be omitted and the Multiarch support will not be set in the chroot because dpkg will fail if the Multiarch support files are created ahead of actual dpkg support. (It doesn't just fail to do Multiarch operations, dpkg will fail to perform any functions on any package.)

ERR: Unsupportable option: 'architecture'. Current dpkg version does not support MultiArch. Packages for 'foreign' have been ignored.

Multiarch and suites

Multiarch requires that foreign architectures are in version lock-step with the native architecture packages.

Do NOT mix suites across Multiarch systems

It is not possible to have native packages from one suite and foreign packages of another suite

Multistrap does not enforce this directly, apt will simply fail to install the foreign architecture packages.

bootstrap and aptsources

apt will complain (without other problems) about duplicate source entries inside the chroot if you repeat the foreign architecture section in the aptsources entry alongside the native one. The two do need to be the same suite and it usually makes sense to use the same mirror and components. The actual support for the foreign architecture is not encoded in the sources list (it's in the /etc/dpkg/dpkg.conf.d/ files), so the actual sources list entry for these two sections will be the same.

native and foreign

It is possible to create a Multiarch rootfs for two or more foreign architectures but the typical usage is that the base system is the native architecture and only selected packages are added for the one or more foreign architectures. (If you do try this, report your success or failure here.)

Package selection

Multiarch is a large change and requires a bit of careful thought about exactly which packages are listed in the package list for the foreign architecture(s). Package selection will be limited by the Multiarch support in the packages themselves. Feel free to file bugs asking for problematic packages to migrate to supporting Multiarch but until the packages are fixed, there is nothing apt or multistrap can do. The chroot will simply have to do without that package in the foreign architecture.

Note: It is not possible to mix Multiarch and dpkg-cross methods - the entire chain of -cross packages would have to be installed whether or not those already exist as Multiarch packages. Having three versions of the same package installed (native, foreign & -cross) is likely to cause problems and is not recommended.