Making a branded Arch Linux spin with archiso
arch-linuxarchisomkarchisodistrobrandingos-releasepacman-hooks
archiso is the official tool that builds the Arch Linux install ISO. "Forking Arch" for a personal distro (Justin's "Just Linux", 2026-10) mostly means a custom archiso profile plus a few identity files; packages still come from Arch's core and extra. The work below was done in a clone of gitlab.archlinux.org/archlinux/archiso (v91) on a branch, adding files rather than editing upstream ones so upstream merges stay clean.
The profile
- Copy
configs/releng(the official ISO profile) toconfigs/<name>/and rebrand:profiledef.sh(iso_name,iso_labellikeJUST_YYYYMM,install_dir), boot menu entries (syslinux, systemd-boot, GRUB configs),airootfs/etc/motd,airootfs/etc/hostname, and a boot splash (render it with a script, e.g. PIL, so it is reproducible). - Build:
mkarchiso -v -w /tmp/work -o out configs/<name>.
Identity that survives upgrades
Arch's filesystem package owns /usr/lib/os-release, so editing it on the ISO is undone by the first upgrade on an installed system. Instead:
- Ship a script (/usr/bin/<name>-branding) that rewrites os-release (ID=just, ID_LIKE=arch, NAME, PRETTY_NAME, URLs).
- Add a pacman hook (/etc/pacman.d/hooks/<name>-os-release.hook) triggered on install/upgrade of filesystem that runs it.
- Package both as a <name>-release PKGBUILD so installed systems get them. That package needs a hosted, signed [<name>] repository to reach installed systems; until then it only lives on the ISO.
ID_LIKE=arch keeps tools that branch on distro family working.
Build host requirements
mkarchiso needs Arch (pacman) and root. Options: build on an Arch host, or run sudo podman|docker run --privileged archlinux and build inside. Rootless mode needs newuidmap from the uidmap package. A Pop!_OS desktop without pacman, podman, docker or local sudo cannot build it; verify scripts with bash -n and test the branding script against a scratch root instead.