Gabboxl / ts3serverARM

Run x86 apps on ARM
https://arm.gabboxl.ga
3 stars 0 forks source link

ts3serverARM

I managed to run some x86 applications like the Teamspeak (32 bit) server on my rpi 3B+ using a virtualized chroot environment (under the 64-bit version of Ubuntu Server for Rpi).

Tested on

Requirements

if the 4.0.0 version isn't available, on Raspbian you can use debian's sid repository && for ubuntu use eoan or newer repos [you can change the repos by editing your /etc/apt/sources.list file; anyway google is your best friend ]

Creation of the x86 enviroment

Entering in the x86 environment

You can use chroot to enter in the environment: sudo chroot ./chroot-stretch/ then cd ~ to return in the default root's directory.

Creation of the ts3 server

Be aware that this a completely detached environment from the host raspberry's system, so for example, if you need to use a certain program that you have installed on the host system, you need to reinstall it using apt (or whatever its installation method is) in the newly created environment.

!) if apt asks you to install a package without verification type YES.

First run of the server

[well if you have problems open an issue xdd]

Running the server in background

from the base system use screen: apt install screen

sudo screen -dm sudo chroot ./chroot-stretch/ /root/teamspeak3-server_linux_x86/ts3server_minimal_runscript.sh

to kill a screen instance, this is its documentation.

Running the server automatically on boot

To accomplish this I created a systemd service in the following way:

Create a new service file: sudo nano /etc/systemd/system/teamspeak3.service.

Copy the following text in it:

[Unit]
Description=Teamspeak Qemu Server
After=syslog.target network.target

[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/home/gabboxl/chroot-stretch/
ExecStartPre=-sudo mount -t sysfs sys ./sys/ ; -sudo mount -t proc proc ./proc/ ; -sudo mount --bind /dev ./dev/ ; -sudo mount --bind /dev/pts ./dev/pts/ ; -sudo mount --bind /dev/shm ./dev/shm/
ExecStart=chroot . /root/teamspeak3-server_linux_x86/ts3server_minimal_runscript.sh
ExecStop=chroot . /root/teamspeak3-server_linux_x86/ts3server_startscript.sh stop
ExecReload=chroot . /root/teamspeak3-server_linux_x86/ts3server_startscript.sh restart

[Install]
WantedBy=multi-user.target

Then modify WorkingDirectory's value so that it points to the folder where the chroot environment is located.

Run sudo systemctl enable teamspeak3 to enable the service, and sudo systemctl start teamspeak3 to start the server.

You're done!

Final considerations & known issues

TODO

Credits

Created by Gabboxl

If this guide helped you in any way I ask you to star this project! If you have encountered a problem open a new issue here on Github and I'll try to help you; do not hesitate!