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
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…
Install Termux (better than trying to run Anlinux first) from the Google Play Store
Install Anlinux from the Google Play Store
Tap (select) Dashboard to start the installation.
Tap “Choose” button and select openSUSE LEAP
Tap the “Copy” button to copy the command that installs the LEAP image to the clipboard
Launch Termux
Do a “Long tap” to open the context sensitive menu, select PASTE to paste the command from the clipboard.
From the software keyboard hit the “return” button to execute the command.
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.
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.
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.
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).
You can use any DE you want but I haven’t tested the others.
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”.
Copy AnLinux install command and paste it in Termux
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”
Last I have installed Andronix VNC start-up script. This is from Fedora, but it works on openSUSE.
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.
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.
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.
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.