Bootstrap
Disclaimer
Section titled “Disclaimer”- It is recommended that you bootstrap glaucus at least once
- This may not always work as glaucus is a moving target
- You are not expected to start from stage 0 every time
Introduction
Section titled “Introduction”- To truly bootstrap a distribution is to generate a self-hosting image file capable of rebuilding itself under itself from nothing
- Relying on an existing host does not count as a true full bootstrap as it starts from stage 1
Stages
Section titled “Stages”Stage 0 (Nothing)
Section titled “Stage 0 (Nothing)”- This stage is optional
- Starts from nothing
- Does not rely on an existing host
- Not supported yet
Stage 1 (Toolchain)
Section titled “Stage 1 (Toolchain)”- Leverages tools from the host or stage 0 to build a cross-compilation toolchain that will build stage 2
- This stage is not optimized as it needs to be correct, fast and reproducible
- This stage is built on the host in under 15 minutes on a relatively modern system
Stage 2 (Cross)
Section titled “Stage 2 (Cross)”- Uses stage 1 toolchain to cross-compile the packages required to self-host glaucus
- This stage is optimized for
x86-64-v3(an early sanity check) - This stage is built on the host system in under 25 minutes on a relatively modern system
- An image file
.imgis generated after a successful build
Stage 3 (Native)
Section titled “Stage 3 (Native)”- Uses stage 2 image file to perform a native rebuild of glaucus
- This stage is fully offline
- This stage is optimized for
x86-64-v3 - This stage is built under QEMU in under 45 minutes on a relatively modern system
- An image file
.isois generated after a successful build
Stage 4 (Real)
Section titled “Stage 4 (Real)”- This stage is optional
- Uses stage 3 image file to perform a native rebuild of glaucus after install
- This stage is optimized for
nativeand will only run on your machine - Not supported yet
Host System Requirements
Section titled “Host System Requirements”- A relatively modern
x86-64-v3system with a minimum of 4 GB of memory and 10 GB of storage space - Arch and Linux From Scratch (LFS) can be used to bootstrap glaucus
- It is not recommended to bootstrap glaucus in a live environment
Required Packages (Automatically Checked)
Section titled “Required Packages (Automatically Checked)”autoconfautomakebashbinutilsbison(orbyacc)boosterbzip2coreutils(ortoybox)curldiffutils(ortoybox)dosfstoolserofs-utilsfindutils(ortoybox)flexgawk(ormawk)gccgettext(orgettext-tiny)gitgperfgrepgzip(orpigz)libcaplibtool(orslibtool)liminem4makemeson(ormuon)ninja(orsamurai)patch(ortoybox)perlpkg-config(orpkgconf) (notu-configas it does not supportPKG_CONFIG_SYSROOT_DIR)sed(ortoybox)tar(orlibarchive)xzzlib(orzlib-ng)zstd
Required Paths (Automatically Created)
Section titled “Required Paths (Automatically Created)”/var/cache/rad/var/lib/rad/var/log/rad/var/tmp/rad
Required Stubs (Automatically Provided)
Section titled “Required Stubs (Automatically Provided)”a2xasciidocgtkdocizehelp2manldconfigmakeinfopo4atexi2dvitexi2pdfyodl2man
- Clone the
glaucusrepository:
git clone --recurse-submodules https://github.com/glaucuslinux/glaucusgit -C glaucus submodule foreach 'git checkout main'- Bootstrap stages 1 and 2 (toolchain and cross):
cd glaucus/live
sudo ./bootstrap- Bootstrap stage 3 (native) under QEMU:
./qemu-img
rad bootstrap 3
poweroff- Create a stage 3 (native) iso:
sudo ./iso