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 (Cross)
Section titled “Stage 1 (Cross)”- Leverages tools from the host or stage 0 to cross-compile the packages required to self-host glaucus
- This stage targets
-march=x86-64-v3(an early sanity check) - This stage is not optimized as it needs to be correct, fast and reproducible
- This stage is built on the host system in under 25 minutes on a relatively modern system
- An optional rootfs is generated after a successful build
Stage 2 (Native)
Section titled “Stage 2 (Native)”- Uses stage 1 chroot to perform a native rebuild of glaucus
- This stage is fully offline
- This stage targets
-march=nativeand can optionally target-march=x86-64-v3for some portability - 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 3 (Metal)
Section titled “Stage 3 (Metal)”- This stage is optional
- Uses stage 2 image file to perform a native rebuild of glaucus after install
- This stage is only 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)”autoconfautomakebashbinutils(orllvm binary utilities)bison(orbyacc)bzip2clangcmakecoreutils(ortoybox)cpio(orlibarchiveortoybox)curldiffutils(ortoybox)dosfstoolserofs-utilsfindutils(ortoybox)flexgawk(ormawk)gettext(orgettext-tiny)gitgperfgrep(ortoybox)gzip(orpigzortoybox)libcaplibgcc(orcompiler-rt)libtool(orslibtool)liminelldm4makemeson(ormuon)ninja(orsamuraiormuon samurai)patch(ortoybox)perlpkg-config(orpkgconf) (notu-configas it does not supportPKG_CONFIG_SYSROOT_DIR)sed(ortoybox)tar(orlibarchive)xxhashxzzlib(orzlib-ng)zstd
Required Stubs (Automatically Provided)
Section titled “Required Stubs (Automatically Provided)”a2xasciidocgtkdocizehelp2manldconfigmakeinfopo4atexi2dvitexi2htmltexi2pdfyodl2man
Clone the glaucus Repository
Section titled “Clone the glaucus Repository”git clone --recurse-submodules https://github.com/glaucuslinux/glaucusgit -C glaucus submodule foreach 'git checkout main'Bootstrap Stage 1 (Cross)
Section titled “Bootstrap Stage 1 (Cross)”cd glaucus/live
./bootstrapBootstrap Stage 2 (Native)
Section titled “Bootstrap Stage 2 (Native)”./bootstrap-native