How to run x86 on arm

Originally published at:

This is a guide on how to run x86 on ARM including wine! I have put a lot of time and effort into creating this guide along with breaking down a few older tutorials to give you guys a up to date guide on running x86 on arm (i.e raspberry pi or tinkerboard). Hope you…

Hi, thanks for the tutorial.
I’m having a problem after the step of compiling the Kernel. When I try to run the command: root@raspberrypi:/home/pi# debootstrap --foregin –-arch i386 stretch ./chroot-stretch-i386

I receive the following error:

E: unrecognized or invalid option --foregin

So I’ve tried change the parameter --foregin for --foreign and the error changed to:
No such script: ./chroot-stretch-i386

Could you help me, please.

Thanks in advance from Brazil.


Hello Diegombejar,

I had the same problem along with other problems with the install. so far I have up and running. The only problem is that I am having trouble with installing software with wine.

below are the steps that I performed.

sudo apt-get update

sudo apt-get install -y qemu qemu-user qemu-user-static binfmt-support debootstrap binutils

sudo apt-get install -y debian-keyring
sudo apt-get install -y debian-archive-keyring

sudo debootstrap --foreign --arch i386 stretch ./chroot-stretch-i386

sudo mount -t sysfs sys ./chroot-stretch-i386/sys/
sudo mount -t proc proc ./chroot-stretch-i386/proc/
sudo mount --bind /dev ./chroot-stretch-i386/dev/
sudo mount --bind /dev/pts ./chroot-stretch-i386/dev/pts/
sudo mount --bind /dev/shm ./chroot-stretch-i386/dev/shm/

sudo cp /usr/bin/qemu-i386-static ./chroot-stretch-i386/usr/bin/

sudo chroot ./chroot-stretch-i386/ /debootstrap/debootstrap --second-stage

sudo chroot /home/pi/chroot-stretch-i386/ /bin/su -l root

add to .bashrc

export LANGUAGE=“C”
export LC_ALL=“C”
export DISPLAY=:0

source ~/.bashrc

apt update

add pi user to chroot

adduser -uid 1000 pi

installing leafpad

apt install leafpad

sudo chroot /home/pi/chroot-stretch-i386/ /bin/su -l pi

export LANGUAGE=“C”
export LC_ALL=“C”
export DISPLAY=:0

wget --no-check-certificate

I followed the guide and i was able to run notepad++.
When i tried to run Teamspeak3 Server i get the next error.

Can someone help me solve this ?

  • pi@raspberrypi:~$ cd tsserver/
  • pi@raspberrypi:~/tsserver$ wine ts3server.exe
  • 0009:err:winediag:gnutls_initialize failed to load libgnutls, no support for encryption
  • 0009:err:winediag:schan_imp_init Failed to load libgnutls, secure connections will not be available.
  • 000f:err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception.
  • wine client error:f: read: Bad file descriptor


I tried to follow the guide on Exagear to run TS3 Server (skipping the exagear install and doing the command with the root / pi chroot methode from “x86 on arm” guide
and then i get this error

  • root@raspberrypi:~# /usr/local/teamspeak/teamspeak3-server_linux_x86/
  • 2019-04-30 17:32:59.712794|INFO |ServerLibPriv | |TeamSpeak 3 Server 3.7.1 (2019-03-28 07:46:26)
  • 2019-04-30 17:32:59.743498|INFO |ServerLibPriv | |SystemInformation: Linux 4.19.36-v7+ #1 SMP Mon Apr 29 21:34:00 BST 2019 i686 Binary: 32bit
  • 2019-04-30 17:32:59.746064|WARNING |ServerLibPriv | |The system locale is set to “C” this can cause unexpected behavior. We advice you to repair your locale!
  • 2019-04-30 17:32:59.800830|INFO |DatabaseQuery | |dbPlugin name: SQLite3 plugin, Version 3, ©TeamSpeak Systems GmbH
  • 2019-04-30 17:32:59.803395|INFO |DatabaseQuery | |dbPlugin version: 3.11.1
  • qemu: uncaught target signal 11 (Segmentation fault) - core dumped
  • Segmentation fault

only need to have 1 of these 2 running , i don’t know wich would be easier to fix.
Thanks in advance

I completed the tutorial successfully, but I had several problems on the way due to typos in the tutorial.

  1. The tutorial said this:
    sudo debootstrap –foregin –arch i386 stretch ./chroot-stretch-i386
    And later said this:
    $ sudo mount –bind /dev ./chroot-stretch-i386/dev/
    $ sudo mount –bind /dev/pts ./chroot-stretch-i386/dev/pts/
    $ sudo mount –bind /dev/shm ./chroot-stretch-i386/dev/shm/
    I had to change all the long dashes, “–”, to two short dashes, “–”, corrected the typo “–foregin” to “–foreign”, and then the commands ran without errors.

  2. The website said this: export DISPLAY=:0l. Turns out that was not a 1. Nor an I or an l. So I had to change it to export DISPLAY=:01, and then the command worked.

I also had to modify the desktop shortcuts before they worked.
[Desktop Entry]
Comment=Start Wine x86 Environment
Name=Wine x86 User
Exec=sudo /usr/sbin/chroot /home/pi/chroot-stretch-i386/ /bin/su -l pi

1 Like

Are you cd’ed into the directory you downloaded the x86 linux?

i have updated the write up to reflect the two dashes. thanks for pointing that out

it shows me: “Bus error” when i’m trying to run wine, do you know how to solve this?

i managed to get x86 running on raspberry pi 4. upgrading the buster from stretch will indeed break it again with bus error

I get an error:
sudo chroot ./chroot-stretch-i386/ /debootstrap/debootstrap --second-stage
I: Keyring file not available at /usr/share/keyrings/debian-archive-keyring.gpg; switching to https mirror
W: Failure trying to run: /sbin/ldconfig
W: See //debootstrap/debootstrap.log for details

in the log
/debootstrap/debootstrap: 905: /debootstrap/debootstrap: /sbin/ldconfig: Exec format error

I understand that it’s due to not being able to specify the debian source.
How can I fix it?