forked from EXALAB/Anlinux-Resources
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0508c19
Showing
179 changed files
with
3,460 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# WARNING | ||
|
||
Everything under this folder is for testing only, it contains latest features that are ready to be released, but sometimes may contain several bugs. | ||
|
||
If you encountered any error or bugs, please open an issue [here](https://github.com/EXALAB/AnLinux-App/issues) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# WARNING | ||
|
||
Everything under this folder is extremely experimental, no one knows what error it could cause unless after testing, please don't use anything under this folder unless you are a developer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
#Get the necessary components | ||
apt-get update | ||
apt-get install kde-plasma-desktop tightvncserver dbus-x11 -y | ||
apt-get install xfe -y | ||
apt-get clean | ||
|
||
#Setup the necessary files | ||
mkdir ~/.vnc | ||
wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Experimental/xstartup -P ~/.vnc/ | ||
wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Experimental/vncserver-start -P /usr/local/bin/ | ||
wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Experimental/vncserver-stop -P /usr/local/bin/ | ||
|
||
chmod +x ~/.vnc/xstartup | ||
chmod +x /usr/local/bin/vncserver-start | ||
chmod +x /usr/local/bin/vncserver-stop | ||
|
||
echo " " | ||
echo "You can now start vncserver by running vncserver-start" | ||
echo " " | ||
echo "It will ask you to enter a password when first time starting it." | ||
echo " " | ||
echo "The VNC Server will be started at 127.0.0.1:5901" | ||
echo " " | ||
echo "You can connect to this address with a VNC Viewer you prefer" | ||
echo " " | ||
echo "Connect to this address will open a window with KDE Desktop Environment" | ||
echo " " | ||
echo " " | ||
echo " " | ||
echo "Running vncserver-start" | ||
echo " " | ||
echo " " | ||
echo " " | ||
echo "To Kill VNC Server just run vncserver-stop" | ||
echo " " | ||
echo " " | ||
echo " " | ||
|
||
echo "export DISPLAY=":1"" >> /etc/profile | ||
source /etc/profile | ||
|
||
vncserver-start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export USER=root | ||
export HOME=/root | ||
|
||
vncserver -geometry 1024x768 -depth 24 -name remote-desktop :1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export USER=root | ||
export HOME=/root | ||
|
||
vncserver -kill :1 | ||
rm -rf /tmp/.X1-lock | ||
rm -rf /tmp/.X11-unix/X1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
xrdb $HOME/.Xresources | ||
startkde & |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The source code is [here](https://github.com/EXALAB/android-shmem), which is a forked of [android-shmem](https://github.com/pelya/android-shmem) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Library/Ashmem/aarch64/libandroid-shmem.so -P /usr/local/lib |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Library/Ashmem/amd64/libandroid-shmem.so -P /usr/local/lib |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Library/Ashmem/armhf/libandroid-shmem.so -P /usr/local/lib |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Library/Ashmem/i386/libandroid-shmem.so -P /usr/local/lib |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
This is the place where all the images and scripts are stored. If you are looking for the main application, please visit [here](https://github.com/EXALAB/AnLinux-App) | ||
|
||
To open an issue, please visit [here](https://github.com/EXALAB/AnLinux-App/issues) | ||
|
||
|
||
|
||
## Bootstraping System | ||
|
||
Note: Only [Ubuntu](https://www.ubuntu.com/), [Debian](https://www.debian.org/), [Kali](https://www.kali.org/), [Parrot Security OS](https://www.parrotsec.org/), [BackBox](https://www.backbox.org) are bootstrap using the script, others are official image without modification. | ||
|
||
Script located at Scripts/Bootstrap are used to bootstrap the system, to bootstrap a system, simply run: | ||
|
||
> ./bootstrap.sh architecture /path/to/bootstrap | ||
For example: | ||
|
||
> ./bootstrap.sh armhf /home/user/debian/armhf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
These file are taken from here, without any modification except change to the file name: | ||
|
||
http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
All the rootfs used in AnLinux app is here, with the exception of Kali Nethunter and Arch Linux, their image is too large, so we cannot store them here, you could find it here: | ||
|
||
[Kali Nethunter](https://build.nethunter.com/kalifs/kalifs-latest/) | ||
|
||
[ArchLinux](http://mirrors.evowise.com/archlinux/iso/2019.05.02/) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
How these image are made: | ||
|
||
1. Download the script here: | ||
|
||
[Script](https://github.com/EXALAB/AnLinux-Resources/tree/master/Scripts/Docker) | ||
|
||
2. Then install the required things: | ||
|
||
> sudo apt-get install curl jq golang | ||
3. Export GOARCH to something you want: | ||
|
||
> export GOARCH=somearch | ||
There are four Architecture for AnLinux: | ||
|
||
> 386 | ||
amd64 | ||
arm | ||
arm64 | ||
|
||
4. Then run the script: | ||
|
||
For Leap: | ||
|
||
> ./fetch-docker-image.sh leap opensuse/leap:latest | ||
For Tumbleweed: | ||
|
||
> ./fetch-docker-image.sh tumbleweed opensuse/tumbleweed:latest | ||
5. After image downloaded, go to the tumbleweed folder and find a folder named "layer", and extract the layer folder. | ||
|
||
6. At last, open a terminal in the extracted folder, and run this command to pack the system into xz (change the file name base on your need. ALso remember to delete the layer.tar, json, VERSION file before proceeding!): | ||
|
||
> XZ_OPT=-9 tar -cJvf ../openSUSE-Leap-rootfs-armhf.tar.xz * |
Binary file added
BIN
+21.3 MB
Rootfs/openSUSE/Tumbleweed/amd64/openSUSE-Tumbleweed-rootfs-amd64.tar.xz
Binary file not shown.
Binary file added
BIN
+19.7 MB
Rootfs/openSUSE/Tumbleweed/arm64/openSUSE-Tumbleweed-rootfs-arm64.tar.xz
Binary file not shown.
Binary file added
BIN
+18.9 MB
Rootfs/openSUSE/Tumbleweed/armhf/openSUSE-Tumbleweed-rootfs-armhf.tar.xz
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env bash | ||
|
||
#Bootstrap the system | ||
rm -rf $2 | ||
mkdir $2 | ||
if [ "$1" = "i386" ] || [ "$1" = "amd64" ] ; then | ||
debootstrap --no-check-gpg --arch=$1 --variant=minbase --include=systemd,libsystemd0,wget,ca-certificates xenial $1 http://archive.ubuntu.com/ubuntu | ||
else | ||
qemu-debootstrap --no-check-gpg --arch=$1 --variant=minbase --include=systemd,libsystemd0,wget,ca-certificates xenial $1 http://ports.ubuntu.com/ubuntu-ports | ||
fi | ||
|
||
#Reduce size | ||
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
LC_ALL=C LANGUAGE=C LANG=C chroot $2 apt-get clean | ||
|
||
#Fix permission on dev machine only for easy packing | ||
chmod 777 -R $2 | ||
|
||
#This step is also needed for BackBox as it is based on Ubuntu Xenial | ||
touch $2/root/.hushlogin | ||
|
||
#This step is only needed for BackBox to import BackBox repo key | ||
chroot $2 apt-key adv --keyserver keyserver.ubuntu.com --recv-key 680E1A5A78A7ABE1 | ||
|
||
#Setup DNS | ||
echo "127.0.0.1 localhost" > $2/etc/hosts | ||
echo "nameserver 8.8.8.8" > $2/etc/resolv.conf | ||
echo "nameserver 8.8.4.4" >> $2/etc/resolv.conf | ||
|
||
#sources.list setup | ||
rm $2/etc/apt/sources.list | ||
rm $2/etc/hostname | ||
echo "AnLinux-BackBox" > /etc/hostname | ||
if [ "$1" = "i386" ] || [ "$1" = "amd64" ] ; then | ||
echo "deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> $2/etc/apt/sources.list | ||
echo "deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> $2/etc/apt/sources.list | ||
echo "" >> $2/etc/apt/sources.list | ||
echo "deb http://ppa.launchpad.net/backbox/five/ubuntu xenial main" >> $2/etc/apt/sources.list | ||
echo "deb-src http://ppa.launchpad.net/backbox/five/ubuntu xenial main" >> $2/etc/apt/sources.list | ||
else | ||
echo "deb http://ports.ubuntu.com/ubuntu-ports xenial main restricted universe multiverse" >> $2/etc/apt/sources.list | ||
echo "deb-src http://ports.ubuntu.com/ubuntu-ports xenial main restricted universe multiverse" >> $2/etc/apt/sources.list | ||
echo "" >> $2/etc/apt/sources.list | ||
echo "deb http://ppa.launchpad.net/backbox/five/ubuntu xenial main" >> $2/etc/apt/sources.list | ||
echo "deb-src http://ppa.launchpad.net/backbox/five/ubuntu xenial main" >> $2/etc/apt/sources.list | ||
fi | ||
|
||
#tar the rootfs | ||
cd $2 | ||
rm -rf ../backbox-rootfs-$1.tar.xz | ||
rm -rf dev/* | ||
XZ_OPT=-9 tar -cJvf ../backbox-rootfs-$1.tar.xz ./* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
#Bootstrap the system | ||
rm -rf $2 | ||
mkdir $2 | ||
if [ "$1" = "i386" ] || [ "$1" = "amd64" ] ; then | ||
debootstrap --no-check-gpg --arch=$1 --variant=minbase --include=busybox,systemd,libsystemd0,wget,ca-certificates buster $1 http://deb.debian.org/debian | ||
else | ||
qemu-debootstrap --no-check-gpg --arch=$1 --variant=minbase --include=busybox,systemd,libsystemd0,wget,ca-certificates buster $1 http://deb.debian.org/debian | ||
fi | ||
|
||
#Reduce size | ||
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
LC_ALL=C LANGUAGE=C LANG=C chroot $2 apt-get clean | ||
|
||
#Fix permission on dev machine only for easy packing | ||
chmod 777 -R $2 | ||
|
||
#Setup DNS | ||
echo "127.0.0.1 localhost" > $2/etc/hosts | ||
echo "nameserver 8.8.8.8" > $2/etc/resolv.conf | ||
echo "nameserver 8.8.4.4" >> $2/etc/resolv.conf | ||
|
||
#sources.list setup | ||
rm $2/etc/apt/sources.list | ||
rm $2/etc/hostname | ||
echo "AnLinux-Debian" > /etc/hostname | ||
echo "deb http://deb.debian.org/debian buster main contrib non-free" >> $2/etc/apt/sources.list | ||
echo "deb-src http://deb.debian.org/debian buster main contrib non-free" >> $2/etc/apt/sources.list | ||
|
||
#tar the rootfs | ||
cd $2 | ||
rm -rf ../debian-rootfs-$1.tar.xz | ||
rm -rf dev/* | ||
XZ_OPT=-9 tar -cJvf ../debian-rootfs-$1.tar.xz ./* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
#Bootstrap the system | ||
rm -rf $2 | ||
mkdir $2 | ||
if [ "$1" = "i386" ] || [ "$1" = "amd64" ] ; then | ||
debootstrap --no-check-gpg --arch=$1 --variant=minbase --include=busybox,systemd,libsystemd0,wget,ca-certificates kali-rolling $1 http://mirror.fsmg.org.nz/kali | ||
else | ||
qemu-debootstrap --no-check-gpg --arch=$1 --variant=minbase --include=busybox,systemd,libsystemd0,wget,ca-certificates kali-rolling $1 http://mirror.fsmg.org.nz/kali | ||
fi | ||
|
||
#Reduce size | ||
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
LC_ALL=C LANGUAGE=C LANG=C chroot $2 apt-get clean | ||
|
||
#Fix permission on dev machine only for easy packing | ||
chmod 777 -R $2 | ||
|
||
#Setup DNS | ||
echo "127.0.0.1 localhost" > $2/etc/hosts | ||
echo "nameserver 8.8.8.8" > $2/etc/resolv.conf | ||
echo "nameserver 8.8.4.4" >> $2/etc/resolv.conf | ||
|
||
#sources.list setup | ||
rm $2/etc/apt/sources.list | ||
rm $2/etc/hostname | ||
echo "AnLinux-Kali" > /etc/hostname | ||
echo "deb http://mirror.fsmg.org.nz/kali kali-rolling main contrib non-free" >> $2/etc/apt/sources.list | ||
echo "deb-src http://mirror.fsmg.org.nz/kali kali-rolling main contrib non-free" >> $2/etc/apt/sources.list | ||
#Import the gpg key, this is only required in Kali | ||
wget https://archive.kali.org/archive-key.asc -O $2/etc/apt/trusted.gpg.d/kali-archive-key.asc | ||
|
||
#tar the rootfs | ||
cd $2 | ||
rm -rf ../kali-rootfs-$1.tar.xz | ||
rm -rf dev/* | ||
XZ_OPT=-9 tar -cJvf ../kali-rootfs-$1.tar.xz ./* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
You will need to run this command before bootstrap: | ||
|
||
> ln -s /usr/share/debootstrap/scripts/stable /usr/share/debootstrap/scripts/rolling | ||
Or it will result in error. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
#Bootstrap the system | ||
rm -rf $2 | ||
mkdir $2 | ||
if [ "$1" = "i386" ] || [ "$1" = "amd64" ] ; then | ||
debootstrap --no-check-gpg --arch=$1 --variant=minbase --include=busybox,systemd,libsystemd0,wget,ca-certificates rolling $1 http://ba.mirror.garr.it/mirrors/parrot | ||
else | ||
qemu-debootstrap --no-check-gpg --arch=$1 --variant=minbase --include=busybox,systemd,libsystemd0,wget,ca-certificates rolling $1 http://ba.mirror.garr.it/mirrors/parrot | ||
fi | ||
|
||
#Reduce size | ||
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
LC_ALL=C LANGUAGE=C LANG=C chroot $2 apt-get clean | ||
|
||
#Fix permission on dev machine only for easy packing | ||
chmod 777 -R $2 | ||
|
||
#Setup DNS | ||
echo "127.0.0.1 localhost" > $2/etc/hosts | ||
echo "nameserver 8.8.8.8" > $2/etc/resolv.conf | ||
echo "nameserver 8.8.4.4" >> $2/etc/resolv.conf | ||
|
||
#sources.list setup | ||
rm $2/etc/apt/sources.list | ||
rm $2/etc/hostname | ||
echo "AnLinux-Parrot" > /etc/hostname | ||
echo "deb http://ba.mirror.garr.it/mirrors/parrot rolling main contrib non-free" >> $2/etc/apt/sources.list | ||
echo "deb-src http://ba.mirror.garr.it/mirrors/parrot rolling main contrib non-free" >> $2/etc/apt/sources.list | ||
#Import the gpg key, this is only required in Parrot Security OS | ||
wget http://archive.parrotsec.org/parrot/misc/archive.gpg -O $2/etc/apt/trusted.gpg.d/parrot-archive-key.asc | ||
|
||
#tar the rootfs | ||
cd $2 | ||
rm -rf ../parrot-rootfs-$1.tar.xz | ||
rm -rf dev/* | ||
XZ_OPT=-9 tar -cJvf ../parrot-rootfs-$1.tar.xz ./* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env bash | ||
|
||
#Bootstrap the system | ||
rm -rf $2 | ||
mkdir $2 | ||
if [ "$1" = "i386" ] || [ "$1" = "amd64" ] ; then | ||
debootstrap --no-check-gpg --arch=$1 --variant=minbase --include=systemd,libsystemd0,libnss-systemd,systemd-sysv,wget,ca-certificates bionic $1 http://archive.ubuntu.com/ubuntu | ||
else | ||
qemu-debootstrap --no-check-gpg --arch=$1 --variant=minbase --include=systemd,libsystemd0,libnss-systemd,systemd-sysv,wget,ca-certificates bionic $1 http://ports.ubuntu.com/ubuntu-ports | ||
fi | ||
|
||
#Reduce size | ||
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
LC_ALL=C LANGUAGE=C LANG=C chroot $2 apt-get clean | ||
|
||
#Fix permission on dev machine only for easy packing | ||
chmod 777 -R $2 | ||
|
||
#This step is only needed for Ubuntu to prevent Group error | ||
touch $2/root/.hushlogin | ||
|
||
#Setup DNS | ||
echo "127.0.0.1 localhost" > $2/etc/hosts | ||
echo "nameserver 8.8.8.8" > $2/etc/resolv.conf | ||
echo "nameserver 8.8.4.4" >> $2/etc/resolv.conf | ||
|
||
#sources.list setup | ||
rm $2/etc/apt/sources.list | ||
rm $2/etc/hostname | ||
echo "AnLinux-Ubuntu" > /etc/hostname | ||
if [ "$1" = "i386" ] || [ "$1" = "amd64" ] ; then | ||
echo "deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse" >> $2/etc/apt/sources.list | ||
echo "deb-src http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse" >> $2/etc/apt/sources.list | ||
else | ||
echo "deb http://ports.ubuntu.com/ubuntu-ports bionic main restricted universe multiverse" >> $2/etc/apt/sources.list | ||
echo "deb-src http://ports.ubuntu.com/ubuntu-ports bionic main restricted universe multiverse" >> $2/etc/apt/sources.list | ||
fi | ||
|
||
#tar the rootfs | ||
cd $2 | ||
rm -rf ../ubuntu-rootfs-$1.tar.xz | ||
rm -rf dev/* | ||
XZ_OPT=-9 tar -cJvf ../ubuntu-rootfs-$1.tar.xz ./* |
Oops, something went wrong.