Skip to content

add_distro

XADE edited this page Dec 10, 2023 · 1 revision

STEP 1: start by defining a function

for example name of the function is distro

distro () {

STEP 2: get the rootfs of new distro inside ${DIR}

here are someways to get a rootfs

Option 1: use a script to create rootfs from scratch

for example codeberg.org/zz/strap/src/branch/master/pacstrap.sh is the script

GET codeberg.org/zz/strap/raw/branch/master/pacstrap.sh
sh "${FETCHED}" "${DIR}"

Option 2: fetch archive from an url

for example link to download rootfs tarball is mirror.domain/downloads/disrto-ver.tar.xz

FGE 1 "mirror.domain/downloads" ">distro${COMP}" 

Option 3: extract rootfs from distro.iso [stupid option: wastage of bandwidth]

for example link to download iso is mirror.domain/downloads/disrto-ver.iso

FGE 1 "mirror/downloads" ">distro.*iso<" 
# fetched files are saved as ${FETCHED}
# mount iso on /tmp of new rootfs
MNT -o loop "${FETCHED}" /tmp/iso 
# for example, destination of rootfs image inside iso is /LiveOS/rootfs.img
MNT -o loop "${TMP}iso/LiveOS/rootfs.img" tmp/iso
# copy rootfs to ${DIR}
cp -r "${TMP}iso/." "${DIR}"

STEP 3: create the chroot script ${CHT} with steps and commands to setup the distro

PRINT "
<package_manager> <install> ${PKG}
" >| "${CHT}"

STEP 4: end the function

}

MISC

this function should be defined before the comment

## CHECK REQUIREMENTS and START INSTALLATION

a separate section is created inside of function: CHROOT () {} to install grub, modify that instead of including it inside ${CHT}

check and modify other segments of this script if needed


How To Install ?

Now, When prompted for DISTRO ID enter the name of function defined earlier

> DISTRO ID : distro

Features

Requirements

Notes


Walk Through :

  1. Execute the script

  1. Select Distro & Packages

Click one of the Distros below for Detailed steps

Distro non Systemd Immutable musl support compilation support
Arch
Artix
Alpine
Void
Gentoo
Funtoo
NixOS
GUIX

Questions :

How ?

Why ?

Clone this wiki locally