Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Phase 002 — build the forge disk

At a glance

FieldValue
Phase familyPhase 0 — forge
Run commandmake phase 002
Underlying make target/scriptvm/phase0/fetch-rootfs.sh + vm/phase0/build-disk.sh
Runs onhost, with rootful loop/mount/chroot work
Main proof/artifactCreates the bootable forge disk at vm/state/quarry.raw.
make phase 002

This creates the bootable forge disk:

vm/downloads/alpine-minirootfs-*.tar.gz
        |
        v
vm/state/quarry.raw

The disk layout is intentionally simple:

ONIX-ESP    FAT32 EFI system partition
onix-root   ext4 root filesystem

During the build, the script:

  1. creates a sparse raw disk
  2. attaches it with losetup
  3. partitions it
  4. formats the ESP and root partition
  5. extracts Alpine minirootfs
  6. enters a chroot
  7. installs kernel, OpenRC, SSH, GRUB, Rust/build tools
  8. creates the mason build user
  9. exports kernel/initramfs for direct boot fallback

OpenRC and GRUB are only forge scaffolding. The real ONIX target can still use systemd/systemd-boot later if we choose that route.