Install bundled 32-bit system in 64-bit system
This article presents one way of running 32-bit applications, which may be of use to those who do not wish to install the lib32-* libraries from the multilib repository and instead prefer to isolate 32bit applications. The approach involves creating a "chroot jail" to handle 32-bit apps.
# mkdir /opt/arch32 # linux32 pacstrap -C path/to/pacman.conf -di /opt/arch32 base base-devel
Key configuration files should be copied over:
# cd /etc # for i in passwd* shadow* group* sudoers resolv.conf localtime locale.gen vimrc inputrc profile.d/locale.sh; do cp -p /etc/"$i" /opt/arch32/etc/; done
Remember to define the correct the number of MAKEFLAGS and other vars in
/opt/arch32/etc/makepkg.conf before attempting to build.
# linux32 arch-chroot /opt/arch32
xhost +si:localuser:chroot_user. See for details.
It is recommended to use a custom bash prompt inside the 32-bit chroot installation in order to differentiate from the regular system. You can, for example, add a
ARCH32 string to the
PS1 variable defined in
Install to the native 64-bit installation:
/etc/schroot/schroot.conf, and create an [Arch32] section.
[Arch32] type=directory profile=arch32 description=Arch32 directory=/opt/arch32 users=user1,user2,user3 groups=users root-groups=root personality=linux32 aliases=32,default
Using Schroot to run a 32-bit application
The general syntax for calling an application inside the chroot is:
# schroot -p -- htop
In this example, htop is called from within the 32-bit environment.
If you get:
X Error of failed request: BadLength (poly request too large or internal Xlib length error)
while trying to run an application that requires video acceleration, make sure you have installed appropriate video drivers in your chroot.
Sound in Flash
$ export FIREFOX_DSP="aoss"
Every chroot into the 32-bit system requires this environment variable.
Tips and tricks
Java in a chroot
See Java. After installation, adjust the path:
$ export PATH="/opt/java/bin/:$PATH"
Allow 32-bit applications access to 64-bit PulseAudio
Additional paths have to be bind-mounted to the chroot environment:
# mount --bind /var/run /opt/arch32/var/run # mount --bind /var/lib/dbus /opt/arch32/var/lib/dbus
Unmount them when leaving the environment:
# umount /opt/arch32/var/run # umount /opt/arch32/var/lib/dbus
Optionally add the commands to the
/usr/local/bin/arch32 script after the other bind-mount/umount commands. See PulseAudio from within a chroot for details
Sound in Firefox
/usr/bin/firefox32 as root:
#!/bin/sh schroot -p firefox $1;export FIREFOX_DSP="aoss"
Make it executable:
# chmod +x /usr/bin/firefox32
To access installed CUPS printers from the chroot environment, one needs to bind the
/var/run/cups directory to the same (relative) location in the chroot environment.
Simply make sure the
/var/run/cups directory exists in the chroot environment and bind-mount the host
/var/run/cups to the chroot environment:
# mkdir /opt/arch32/var/run/cups # mount --bind /var/run/cups /opt/arch32/var/run/cups
and printers should be available from 32-bit chroot applications immediately.