Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: PROOT or CHROOT as guest OS (Android/Termux)

Hybrid View

  1. #1

    Default 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?

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,898
    Blog Entries
    2

    Default Re: PROOT or CHROOT as guest OS (Android/Termux)

    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
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3

    Default Re: PROOT or CHROOT as guest OS (Android/Termux)

    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-ru...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/a...ed/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.

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,898
    Blog Entries
    2

    Default Re: PROOT or CHROOT as guest OS (Android/Termux)

    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
    Code:
    ./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
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,898
    Blog Entries
    2

    Default Re: PROOT or CHROOT as guest OS (Android/Termux)

    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
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,898
    Blog Entries
    2

    Default Re: PROOT or CHROOT as guest OS (Android/Termux)

    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
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7

    Thumbs up Re: PROOT or CHROOT as guest OS (Android/Termux)

    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/...0200414.tar.xz

    Or Leap 15.1
    https://download.opensuse.org/ports/...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.

    3. 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".

    4. Copy AnLinux install command and paste it in Termux

    "pkg install wget openssl-tool proot tar -y && hash -r && wget https://raw.githubusercontent.com/EX...ensuse-leap.sh && bash opensuse-leap.sh"

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

    6. 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"

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

    "wget https://raw.githubusercontent.com/Te...E4/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.

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,898
    Blog Entries
    2

    Default Re: PROOT or CHROOT as guest OS (Android/Termux)

    @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
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9

    Default Re: PROOT or CHROOT as guest OS (Android/Termux)

    Quote Originally Posted by tsu2 View Post
    @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
    Code:
     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.

  10. #10

    Default Re: PROOT or CHROOT as guest OS (Android/Termux)

    Quote Originally Posted by radumamy View Post
    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/...0200414.tar.xz

    Or Leap 15.1
    https://download.opensuse.org/ports/...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.

    3. 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".

    4. Copy AnLinux install command and paste it in Termux

    "pkg install wget openssl-tool proot tar -y && hash -r && wget https://raw.githubusercontent.com/EX...ensuse-leap.sh && bash opensuse-leap.sh"

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

    6. 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"

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

    "wget https://raw.githubusercontent.com/Te...E4/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.
    How if my phone is arm7

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •