[Solved] Exagear on Arch Linux ARM (Raspberry Pi)

[Solved] Exagear on Arch Linux ARM (Raspberry Pi)

Postby joao » Mon Mar 14, 2016 4:35 am

Getting ExaGear up an running on my Arch linux ARM system has been a bit hit and miss.

Firstly the dependencies that I was told are required by exagear:

Code: Select all
bash coreutils findutils realpath curl binfmt-support cron


Then I went ahead and found what I was missing in the AUR (specifically: binfmt-support)
not sure if "cron" is compatible with my system.
As a heads up Arch uses Systemd, and I'm not sure whether this conflicts with exagear's services??

anyway, then went ahead and extracted the .deb files I needed for my use case to their default locations.
(exagear-mem2g_2466-1_armhf.deb and exagear-guest-ubuntu-1504-wine2g_2_all.deb since I want to install TeamViewer)

running exagear results in the following output:

Code: Select all
which: no service in (/usr/bin)
/usr/bin/exagear: line 104: /usr/sbin/service: No such file or directory
Starting /bin/bash  in the guest image /opt/exagear/images/ubuntu-1504-wine2g


apart from the above, the first problem I had was running sudo apt-get update:
Code: Select all
ExaGear itself does not support running SUID or SGID binaries,
they must be started using the binfmt_misc wrapper.
Please see the user manual for the details.


running exagear with sudo does allow me to run apt-get, but I do not want to be running exagear as root.

other issues: terminal commands such as "ls" and "wget" are not found when I'm in exagear's environment.

anyone familiar with how to get exagear up and running properly?

the command "arch" is depreciated on my system, instead I use "uname -m" which outputs: armv7l
Last edited by joao on Mon Mar 14, 2016 4:54 pm, edited 1 time in total.
joao
 
Posts: 5
Joined: Mon Mar 14, 2016 4:01 am

Re: Exagear on Arch Linux ARM (Raspberry Pi)

Postby goha » Mon Mar 14, 2016 9:07 am

Hi!
Both errors point that exagear service is not started. You can proceed further if you switch user to root on the host ARM system and then enter the guest system as root:
user@arm $ sudo su
root@arm $ exagear
root@arm $ arch
i686
root@arm $ apt-get update
root@arm $ apt-get install wget

Now a litle bit more details about what's going on.
Systemd itselt is ok for ExaGear but it seems that Arch Linux has discrepancies in packages names and even in some basic utilities locations or names. How do you run services on Arch Linux? Is there 'service' utility or its analogue? Normally on Debian-like systems this utility is found in /usr/sbin/service. But on your system ExaGear failed to find 'service' utility at all. Therefore exagear service was not started.

Also ExaGear service uses binfmt kernel module therefore please check if there is this module on your device.
$ cat /proc/sys/fs/binfmt_misc/status
If this file exists then you have required module. You might not need binfmt-support package as Arch Linux might have another rules for using binfmt functionality but you need to have this module installed on your ARM system. The lack of binfmt module is not critical for ExaGear but causes some limitations. You won't be able to run sudo inside the guest x86 system but you still can execute privileged commands as root.
goha
 
Posts: 127
Joined: Wed Oct 08, 2014 9:22 am

Re: Exagear on Arch Linux ARM (Raspberry Pi)

Postby joao » Tue Mar 15, 2016 3:59 am

Services on arch are managed by Systemd, with "systemctl". (instead of "service" which as I understand it is part of SysVinit)
I think we need a specific service script for systemd.

fiy: $ cat /proc/sys/fs/binfmt_misc/status output:
Code: Select all
[joao@alarmpi ~]$ cat /proc/sys/fs/binfmt_misc/status
enabled


I can't use use sudo apt-get in exagear because of the service not being started.
however using exagear as root, many core utilities and binaries are not available to me:

Code: Select all
[joao@alarmpi ~]$ ls
Desktop    'Latest working chormium'  Pictures     Roms
Documents  Music                      pkglist.txt  Videos
Downloads  pcsx_rearmed_libretro.so   Public       yaourt
[joao@alarmpi ~]$ sudo su
[root@alarmpi joao]# exagear
which: no service in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)
/usr/sbin/exagear: line 104: /usr/sbin/service: No such file or directory
Starting /bin/bash  in the guest image /opt/exagear/images/ubuntu-1504-wine2g
root@alarmpi:~# arch
i686
root@alarmpi:~# ls
bash: ls: command not found

can you provide instructions for getting the exagear service up and running on a systemd managed system?
joao
 
Posts: 5
Joined: Mon Mar 14, 2016 4:01 am

Re: Exagear on Arch Linux ARM (Raspberry Pi)

Postby goha » Tue Mar 15, 2016 11:45 am

joao wrote:Services on arch are managed by Systemd, with "systemctl". (instead of "service" which as I understand it is part of SysVinit)
I think we need a specific service script for systemd.


Do you know is it possible to run /etc/init.d scripts on Arch Linux? Is there /etc/init.d directory?
There are Debian versions with systemd but they have compatibility with system V (you can find details here http://unix.stackexchange.com/questions/233468/how-does-systemd-use-etc-init-d-scripts) and that is why exaGear service works there by default.
What if you run these commands:
$ systemctl exagear status
$ systemctl /etc/init.d/exagear status
goha
 
Posts: 127
Joined: Wed Oct 08, 2014 9:22 am

Re: Exagear on Arch Linux ARM (Raspberry Pi)

Postby joao » Tue Mar 15, 2016 3:21 pm

here's the output of what happens when I try to get the exagear service up using systemctl:

Code: Select all
joao@alarmpi ~> systemctl status exagear
● exagear.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
joao@alarmpi ~> systemctl start exagear
Failed to start exagear.service: Unit exagear.service not found.
joao@alarmpi ~> systemctl status /etc/init.d/exagear
● etc-init.d-exagear.mount
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
joao@alarmpi ~> systemctl start /etc/init.d/exagear
Failed to start etc-init.d-exagear.mount: Unit etc-init.d-exagear.mount not found.
joao@alarmpi ~> ls /etc/init.d/
dbus*     exagear.dpkg-new*                  networking*
exagear*  exagear-guest-ubuntu-1504-wine2g*  x11-common*
joao
 
Posts: 5
Joined: Mon Mar 14, 2016 4:01 am

Re: Exagear on Arch Linux ARM (Raspberry Pi)

Postby goha » Wed Mar 16, 2016 1:29 pm

Could you try to run exagear script manually, i.e.
Code: Select all
/etc/init.d/exagear start
goha
 
Posts: 127
Joined: Wed Oct 08, 2014 9:22 am

Re: Exagear on Arch Linux ARM (Raspberry Pi)

Postby joao » Wed Mar 16, 2016 5:21 pm

no luck :-/ here's the output:
Code: Select all
[joao@alarmpi ~]$ sudo /etc/init.d/exagear start
Starting ExaGear: x86_guest.
[joao@alarmpi ~]$ exagear
which: no service in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
/usr/bin/exagear: line 104: /usr/sbin/service: No such file or directory
Starting /bin/bash  in the guest image /opt/exagear/images/ubuntu-1504-wine2g
[joao@alarmpi ~]$ sudo apt-get update
ExaGear itself does not support running SUID or SGID binaries,
they must be started using the binfmt_misc wrapper.
Please see the user manual for the details.
joao
 
Posts: 5
Joined: Mon Mar 14, 2016 4:01 am

Re: Exagear on Arch Linux ARM (Raspberry Pi)

Postby goha » Thu Mar 24, 2016 11:07 am

joao wrote:I can't use use sudo apt-get in exagear because of the service not being started.
however using exagear as root, many core utilities and binaries are not available to me:

Code: Select all
[joao@alarmpi ~]$ ls
Desktop    'Latest working chormium'  Pictures     Roms
Documents  Music                      pkglist.txt  Videos
Downloads  pcsx_rearmed_libretro.so   Public       yaourt
[joao@alarmpi ~]$ sudo su
[root@alarmpi joao]# exagear
which: no service in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)
/usr/sbin/exagear: line 104: /usr/sbin/service: No such file or directory
Starting /bin/bash  in the guest image /opt/exagear/images/ubuntu-1504-wine2g
root@alarmpi:~# arch
i686
root@alarmpi:~# ls
bash: ls: command not found

Try to do
$ export PATH=$PATH:/bin/:/sbin/
after that enter the guest x86 system by typing 'exagear' command.

joao wrote:can you provide instructions for getting the exagear service up and running on a systemd managed system?

Patched version of /etc/init.d/exagear was sent you by email. This script should work on Arch Linux.
goha
 
Posts: 127
Joined: Wed Oct 08, 2014 9:22 am

Re: Exagear on Arch Linux ARM (Raspberry Pi)

Postby joao » Thu Mar 31, 2016 6:26 am

Thanks for all your help.

So following your instructions replacing the original service file and the exagear binary, I am able to get exagear up and running on my system, will you be providing patched files here for everyone, or will it be part of the next update of Exagear Desktop? (Including fixes for the issues below?)


here's a few tips for anyone who needs:

After starting exagear properly it was necessary to run "export PATH=$PATH:/bin/:/sbin/:/usr/sbin"
This makes sure exagear looks in the correct place for all the commands available to it from my arch system.

Then, installing wget I got the error "dpkg: unrecoverable fatal error, aborting: unknown group 'crontab' in statoverride file"
I resolved this by renaming the statoverride file in my image to statoverride.disabled
For me it's located here: /opt/exagear/images/ubuntu-1504-wine2g/var/lib/dpkg/

sudo complains about my hostname but I just ignore it: "sudo: unable to resolve host alarmpi"
joao
 
Posts: 5
Joined: Mon Mar 14, 2016 4:01 am

Re: [Solved] Exagear on Arch Linux ARM (Raspberry Pi)

Postby skilbjo » Fri Nov 18, 2016 10:40 pm

Hi joao, what steps did you take to get exagear working on an Arch Linux distro?
skilbjo
 
Posts: 7
Joined: Wed Nov 16, 2016 3:37 pm

Next

Return to ExaGear Desktop

Who is online

Users browsing this forum: No registered users and 2 guests

cron