You are on page 1of 2

Universal code for running any Linux distro

I checked ubuntu, arch, debian, fedora, until the rest of the hands did not reach)
The name of the distribution image must match the name of the directory.
Example: image ubuntu.tar.gz, 'ubuntu' folder

In thermex, install:
```
pkg install proot
```

My install was redivided to 3 stages:

~Installation and launch.


============================

├── os - # name of the directory and image
├── username - # user name, you can write your own
├── format - # the archive type is usually in two formats: (as for images in
tar...) tar.gz or tar. xz

Copying:

```
os="ubuntu"
format="tar.gz"
path="/sdcard"
cp -rf $path/$os.${format} `pwd`
```

Unpacking:

```
os="ubuntu"
format="tar.gz"
dir=`pwd`
mkdir -m0755 $dir/$os 2>/dev/null
mv $dir/$os.${format} $dir/$os
proot --link2symlink tar -xvpf $dir/$os/$os.${format} -C $dir/$os
mv $dir/$os/$os.${format} $dir
```

Booting to the OS:

```
os="ubuntu"
username="linux"
unset LD_PRELOAD
proot \
-0 \
--link2symlink \
-r ~/$os \
-b /dev/ \
-b /sys/ \
-b /proc/ \
-b /sdcard/ \
-b /storage/ \
/usr/bin/env \
-i \
HOME=/root \

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/l
ocal/games \
TERM="xterm-256color" \
USER=$username \
USERNAME=$username \
/usr/bin/bash --login
```

~Solving problems
-----------------

All input in the running OS

If there is no internet access and the package manager does not work, the problem
usually occurs on ubuntu:
```
echo 'nameserver 8.8.8.8' > /etc/resolv.conf
echo 'nameserver 8.8.4.4' >> /etc/resolv.conf

```

https://www.archlinux.org/mirrorlist/ (I dont know it)

Solving non-removable packages or installation problems:

```
dpkg --configure -a
```

Links to distribution images:

ubuntu:
http://cdimage.ubuntu.com/ubuntu-base/releases/
Arch:
armv8 (aarch64)
https://archlinuxarm.org/platforms/armv8/generic
Fedora:
armv8 (aarch64)
https://dl.fedoraproje…tainer/aarch64/images/

sourse: https://4pda.ru/forum/index.php?showtopic=741456&view=findpost&p=93823064

You might also like