Phase 002 — build the forge disk
At a glance
| Field | Value |
|---|---|
| Phase family | Phase 0 — forge |
| Run command | make phase 002 |
| Underlying make target/script | vm/phase0/fetch-rootfs.sh + vm/phase0/build-disk.sh |
| Runs on | host, with rootful loop/mount/chroot work |
| Main proof/artifact | Creates 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:
- creates a sparse raw disk
- attaches it with
losetup - partitions it
- formats the ESP and root partition
- extracts Alpine minirootfs
- enters a chroot
- installs kernel, OpenRC, SSH, GRUB, Rust/build tools
- creates the
masonbuild user - 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.