PROOT or CHROOT as guest OS (Android/Termux)

I found the Linux App AnLinux to have a chroot image for installation in Termux unfortunately out of date.
I downloaded an opensuse arm64 rootfs tar.xz and extracted it in Termux.
I can chroot with the script into Opensuse, but then I am stuck.
/proc and /sys need to be bind mount to
/opensuse/proc and opensuse/sys

The chroot explanation tells to do this from the host OS . But that does not work in Android-Termux
Can someone help with working commands?

From the general description of anlinux, it’s so you can run Linux on an Android ARM device…
Not the other way around.

Without looking further than this general description, I don’t see how openSUSE enters the picture.

Otherwise,
I wish I had kept an archived copy of a Wiki page I wrote up long ago where to deploy LXC, you had to bind mount proc and various other mounts…

So,
My recommendation is to first verify you understand that what you’re trying to do is consistent with what anlinux is supposed to be.
If you’re sure you’re doing something that is supported, then post what you tried to do.

BTW - A lot of these old technologies for running an isolated system in a chroot will work with a kernel downloaded from OpenVZ instead of doing a bind mount to the HoSTOS, but this assumes you’re running on x86/x64, not ARM.
https://wiki.openvz.org/Download/kernel

TSU

If you install Termux on your Android phone, then you can run Linux on Android.

There are several App in the Playstore, that help you to install, UBUNTU, FEDORA, MANJARO, Kali, Parrot with several differnt desktop environments.

e.g AndroNix makes a install of Manjaro extremly easy.

But for openSUSE AnLinux has an image that runs in Termux, but it is totally rudimenary

https://a2zapk.com/499663-anlinux-run-linux-on-android-without-root-access-5-70-stable.html

Click on dashboard, choose OpenSUSE , copy commands and AnLinux will do the magic.

As this is a total minimum 23mb root install, nothing works right. While you get everything you need with Ubuntu, Fedora or Manjaro

Getting an tar.xz from here http://download.opensuse.org/ports/aarch64/tumbleweed/appliances/
and using it instaed of the 23MB just gives me the error /dev and /sys are not mounted

for this proot need to be configures.

I just installed anlinux and termux on my phone and am able to launch openSUSE LEAP successfully and login with a BASH prompt without a problem, there is no need to do a bind mount.

As described…

  1. Install Termux (better than trying to run Anlinux first) from the Google Play Store
  2. Install Anlinux from the Google Play Store
  3. Tap (select) Dashboard to start the installation.
  4. Tap “Choose” button and select openSUSE LEAP
  5. Tap the “Copy” button to copy the command that installs the LEAP image to the clipboard
  6. Launch Termux
  7. Do a “Long tap” to open the context sensitive menu, select PASTE to paste the command from the clipboard.
  8. From the software keyboard hit the “return” button to execute the command.
  9. When the image install completes, type the following and execute
./start-leap.sh

Everything appears to work.
If you want to view your root directories, chdir up a level.

If you’re expecting more, Anlinux is clear not to expect much, that the User may (or will) need to install more things to do whatever you want. So, for instance I see yast is not installed, which is fundamental to openSUSE… but it does look like zypper works, so I assume you can install yast and or anything else you’d want, but you’ll likely need plenty of storage to install what Users might expect. The base image looks like it might be a custom JeOS image, less than what I normally see even by JeOS standards.

TSU

Small update,
Looks like the configured repos are probably empty, probably will have to be pointed to working repos.
I (or someone) will have to look into this further, I can’t get to this now.
But, I figure once this has working repos, I wouldn’t expect any serious problems.

TSU

Exploring the AnLinux openSUSE image a bit further,
IMO it’s unusable, whoever created the image didn’t know much about openSUSE, possibly much about modern Linux in general.

The repository management is broken, I didn’t check whether packages are downloaded and unreadable or not written at all, bottom line is that zypper can’t read anything in a repository at all. Without this fundamental requirement, it’s not possible to install/add anything.

Other essential commands and subsystems are totally missing…
Like all of the systemd commands (including systemctl, journalctl)
Journalctl in particular is an issue since the legacy /etc/messages is missing, too.

So, I can get the image to run, but bottom line is the image is unusable.

If the owner/author of AnLinux happens upon this post, I’d recommend that any of the many JeOS images should be used for AnLinux, but image sizes generally are around 600MB. openSUSE JeOS images can be trimmed considerably, but only by someone who understands what is essential and what isn’t.

TSU

Hi both.

I have successfully installed openSUSE 15.1 15.2 and Tumbleweed both with XFCE and LXQT using this method.

What I did is used the aarch64 images provided by openSUSE. Links below. Then I install vncserver using rpm (zypper doesn’t find any packages - needs further investigation).

Tumbleweed
https://download.opensuse.org/ports/aarch64/tumbleweed/images/openSUSE-Tumbleweed-ARM-XFCE.aarch64-rootfs.aarch64-2020.03.25-Snapshot20200414.tar.xz

Or Leap 15.1
https://download.opensuse.org/ports/aarch64/distribution/leap/15.1/appliances/openSUSE-Leap-15.1-ARM-XFCE.aarch64-rootfs.aarch64.tar.xz

Instructions:

  1. Open Termux and type “pkg up” to update Termux packages.

  2. Type “wget https://download.opensuse.org/ports/aarch64/distribution/leap/15.1/appliances/openSUSE-Leap-15.1-ARM-XFCE.aarch64-rootfs.aarch64.tar.xz” to download the image, approx 700MB.

You can use any DE you want but I haven’t tested the others.

  1. Type “mv openSUSE-Leap-15.1-ARM-XFCE.aarch64-rootfs.aarch64.tar.xz opensuse-leap-rootfs.tar.xz” .

This is important as we need to instruct AnLinux to install our downloaded image as opposed to the 22 MB one it normally wants to install. If using Tumbleweed, you need to rename your downloaded image to “opensuse-tumbleweed-rootfs.tar.xz”.

  1. Copy AnLinux install command and paste it in Termux

“pkg install wget openssl-tool proot tar -y && hash -r && wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/Installer/openSUSE/Leap/opensuse-leap.sh && bash opensuse-leap.sh”

  1. Once this has been installed (decompressing takes a while) you can launch it with “./start-leap.sh”.

  2. Once logged into root we need to download and install the VNC server. For Tumbleweed you’ll need to to use that repo obviously.

Please type “wget https://download.opensuse.org/ports/aarch64/distribution/leap/15.1/repo/oss/aarch64/libXvnc1-1.9.0-lp151.3.2.aarch64.rpm

Next type “wget
https://download.opensuse.org/ports/aarch64/distribution/leap/15.1/repo/oss/aarch64/xorg-x11-Xvnc-1.9.0-lp151.3.2.aarch64.rpm

And “wget
https://ftp.lysator.liu.se/pub/opensuse/ports/aarch64/distribution/leap/15.1/repo/oss/noarch/firewall-macros-0.5.5-lp151.5.1.noarch.rpm” . I think firewall-macros is not required for Tumbleweed (it probably comes with the Image).

To install them type
“rpm -ivh libXvnc1-1.9.0-lp151.3.2.aarch64.rpm”
“rpm -ivh firewall-macros-0.5.5-lp151.5.1.noarch.rpm”
“rpm -ivh xorg-x11-Xvnc-1.9.0-lp151.3.2.aarch64.rpm”

  1. Last I have installed Andronix VNC start-up script. This is from Fedora, but it works on openSUSE.

“wget https://raw.githubusercontent.com/Techriz/AndronixOrigin/master/Fedora/XFCE4/xfce4_de.sh && bash xfce4_de.sh”

You can now use VNC Viewer on Android to login.

There are a few things that do not work yet, like zypper and yast2, but if we get the right people involved, we’ll get there.

Thank you.

@radumamy](https://forums.opensuse.org/member.php/112645-radumamy)

Thank you for your contribution, I don’t remember exactly what I was looking at when I posted earlier in this thread, but as I described it’s possible to install following available documentation.

That’s interesting that you found RPM commands work although apparently libzypp does not (both YaST and zypper don’t work).
The other significant problem I found earlier were systemd commands… Would be interesting to know if that has been resolved.

TSU

@tsu2 thanks to

 https://github.com/termux/proot/issues/105#ISSUECOMMENT-622960004 

I have managed to get Yast to launch.

I got it to update by installing Yum and using the official repos.

Could you please help resolve Zypper?

Thank you.

How if my phone is arm7

I don’t know what your question is supposed to mean,
But if you’re asking whether your phone or system being ARM is a problem, openSUSE regularly maintains images for various ARM, but you need to be more precise what your ARM hardware is.

TSU

Hi. You can try the following commands in Termux, unfortunately I cannot validate them because my phone is aarch64.

Please let me know if they work.

  1. Download Termux components and openSUSE Tumbleweed image.
pkg install wget openssl-tool proot tar -y && hash -r && wget https://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-XFCE.armv7-rootfs.armv7l.tar.xz -O opensuse-tumbleweed-rootfs.tar.xz 
  1. Execute installation script.
wget https://raw.githubusercontent.com/radumamy/Termux-openSUSE/master/Scripts/Installer/openSUSE/Tumbleweed/opensuse-tumbleweed.sh && bash opensuse-tumbleweed.sh 
  1. Log into openSUSE and install VNC server.
wget https://raw.githubusercontent.com/radumamy/Termux-openSUSE/master/Scripts/Installer/openSUSE/vnc-server-armv7.sh && bash vnc-server-armv7.sh  

Thanks.

FYI -
Sometime after my last post (June 2020?)
I was able to get Termux to install openSUSE on my phone, but all it did was boot up.
Was pretty much broken.

Bottom line is I didn’t immediately identify an installation problem but the image I installed (I’ve forgotten which but was likely the one identified earlier in this Forum thread) wasn’t functional and I didn’t try to look further if the problem is the image itself or how the image is supposed to run.

Sorry that I had to remove the experiment immediately, it uses up an enormous amount of space on a phone… And if something that big isn’t working, it affects what’s available for everything else that’s installed and running.

TSU

Hi @TSU,

I have created scripts for aarch64 that allow you to install and run Leap 15.2 and Tumbleweed. Patches for Yast2 and Zypper are included. I don’t think you can use systemd commands due to limitations of Android/proot.

Leap 15.2

pkg install wget openssl-tool proot tar -y && hash -r && wget https://raw.githubusercontent.com/radumamy/Termux-openSUSE/master/Scripts/Installer/openSUSE/Leap/opensuse-leap.sh && bash opensuse-leap.sh

Tumbleweed

pkg install wget openssl-tool proot tar -y && hash -r && wget https://raw.githubusercontent.com/radumamy/Termux-openSUSE/master/Scripts/Installer/openSUSE/Tumbleweed/opensuse-tumbleweed.sh && bash opensuse-tumbleweed.sh

Once installed you can login and install VNC server to use XFCE4 Desktop Environment.

wget https://raw.githubusercontent.com/radumamy/Termux-openSUSE/master/Scripts/Installer/openSUSE/vnc-server.sh && bash vnc-server.sh

I’ll do my best to sort out most things.

Thank you.

Intro Maker Mod Apk
Funimate Pro Mod Apk
Blue Kinemaster Pro Mod Apk
Octopus Mod Apk Premium
StorePlay Apk
StatusVideoApp
IdleMod