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

Image flavours

Every image is the same image.nix derivation with different contents and geometry. Sizes are megabytes.

x86_64

PackageFileESPRootNotes
imagepuredarwin.img646144The full system: X11, Wayland, Xfce, Wine, toolchains
image-debugpuredarwin.img646144Same, built against the debug kernel
image-strippedpuredarwin-stripped.img646144Base system plus a small library and test set
image-waylandpuredarwin-wayland.img646144Wayland only: no X11 clients, no Xfce, sway and GTK built without X
image-minimalpuredarwin-minimal.img60200The usual boot-test image
image-minimal-debugpuredarwin-minimal-debug.img64384Minimal, debug kernel, tracing on
image-hfspuredarwin.img646144HFS+ root instead of ext4

image-hfs has two uses.

The first is bisection. When something looks like filesystem corruption, booting the same system on Apple’s own hfs.kext tells you whether the ext4 driver is the culprit. It has been the deciding test more than once.

The second is for macOS users who want to open the image and change something. Every other image has an ext4 root, and macOS cannot mount ext4 without our own kext, which is not much help when the thing you are trying to modify is the image that contains it. An HFS+ root mounts on a Mac without ceremony. This is the mildly absurd consequence of supporting a filesystem Apple does not: the Linux-native option is the one a Mac cannot read.

arm64

PackageESPRootNotes
image-arm64-virt646144QEMU virt, BOOTAA64.EFI
image-arm64-virt-minimal768512RAM disk root (rd=md0), 512 MB ramdisk
image-arm64-virt-minimal-release64512Release kernel, AHCI and kext logging
image-arm64-virt-full643072Larger set, virtio-gpu debugging enabled
netboot-arm64-virt-minimal--Netboot only, 512 MB ramdisk
ramdisk-arm64-t8010--iPad 6, 160 MB ext4 ramdisk, loaded by PongoOS
image-arm64-bcm2837641024Raspberry Pi 3, puredarwin-rpi3.img

Geometry and ramdisk knobs

image.nix parameters you will meet when adding a flavour:

ParameterDefaultMeaning
espMB64EFI system partition size
rootMB6144Root partition size
apfsMB128APFS test partition size
rootFsTypeext4ext4 or hfs
efiBinaryBOOTX64.EFIBOOTAA64.EFI on arm64
netbootOnlyfalseProduce netboot artifacts instead of a disk image
useRamdiskfalseRoot from a RAM disk
ramdiskMB128RAM disk size
ramdiskPruneemptyPaths to drop from the RAM disk only
bootArgssee belowWritten to \EFI\BOOT\boot-args.txt

ramdiskPrune matters more than it looks. A RAM disk has to fit in memory twice over on the way in, so anything not needed to run the system is worth removing. The T8010 image prunes the kernels directory, every include tree, the pkgconfig directories and the guest header staging.

Baked boot-args

The default, used by the full x86_64 images:

debug=0x218 -nogzalloc_mode keepsyms=1 serial=3 gopconsole=1 -noprogress
gen9_debug=1 serial_video_mirror=1

Per-flavour overrides:

Flavourboot-args
image-minimal-v debug=0x218 -nogzalloc_mode keepsyms=1 serial=3 gopconsole=1 gen9_debug=1
image-minimal-debugas above plus serial_video_mirror=1 pdtrace=1
image-arm64-virt-minimal, netboot-arm64-virt-minimal-v debug=0x218 -nogzalloc_mode keepsyms=1 serial=3 gopconsole=1 pdtrace=1 serial_video_mirror=1 no_interrupt_masked_debug=1 rd=md0
ramdisk-arm64-t8010-v debug=0x218 -nogzalloc_mode keepsyms=1 serial=3 serial_video_mirror=1 no_interrupt_masked_debug=1 rd=md0
image-arm64-bcm2837-v debug=0x218 -nogzalloc_mode keepsyms=1 serial=1 no_interrupt_masked_debug=1
image-arm64-virt-fulldefault plus vgpu_debug=1
image-arm64-virt-minimal-release-v serial=3 ahci_debug=1 kext=0xffff io=0xffff

The loader falls back to a built-in default if it cannot read boot-args.txt, but the file is there so you can edit arguments without rebuilding an image. What each argument does is in Debugging.

One row reads oddly on its own: ramdisk-arm64-t8010 sets serial=3 on a device with no serial port. serial_video_mirror=1 is the part that matters there, because the console the user actually sees is the iPad’s display. See arm64 T8010.