source: handbook ch. 12, 13, 14, 17; parch-iso-template build.sh
Build your first Parch ISO
This tutorial builds a real, bootable Parch ISO from the parch-iso-template profile on a local machine. The template is the fastest edition to build (no desktop packages) and is the base every other edition grew from, so everything you learn here transfers directly.
Prerequisites
- An Arch-based host (Arch Linux or Parch GNU/Linux), the tooling assumes Arch package management. Check with
pacman --version. - Root access,
mkarchisomust create device nodes and mount filesystems, so builds run as root via sudo. - Disk space: 30 GB free is a comfortable minimum. A single build can consume 15–20 GB of working space (
work/), the template ISO needs roughly a gigabyte inout/, and the package cache (/var/cache/pacman/pkg/) grows on top. Desktop editions need more. - RAM: 4 GB minimum, 8 GB recommended, package installation and squashfs compression are memory-hungry.
- A working internet connection, packages are downloaded from the Arch mirrors and the Parch
worldrepository. - A filesystem that supports symlinks and long filenames for the build directory (ext4, btrfs, xfs, not FAT32).
Step-by-step
Update the host and install the test tools
In a terminal, refresh the host and install QEMU plus OVMF firmware, you will need them to boot-test the result. (The build dependencies themselves are installed by
build.shin the next step, so you do not need to installarchisomanually.)Update host, install QEMU and UEFI firmware $ sudo pacman -Syu $ sudo pacman -S --needed qemu-desktop edk2-ovmfWorking directory for the rest of the tutorial: your home directory, unprivileged user.
Clone the template profile
Grab the profile from the
parchlinuxGitHub organization and look around.Clone and inspect $ git clone https://github.com/parchlinux/parch-iso-template.git $ cd parch-iso-template $ ls iso/ airootfs bootstrap_packages.x86_64 efiboot grub pacman.conf profiledef.sh public.key syslinuxThree files are worth reading before building:
iso/profiledef.sh(what the ISO is called and how it boots),iso/packages.x86_64(what goes in), andbuild.sh(what the build actually does). See Profile structure for a guided tour.Run the build
From the repository root, as root, run the wrapper. It installs its own toolchain, the template flavor installs the stock
archisopackage, then invokesmkarchiso -v iso/.Build (root required) $ sudo ./build.shExpect the first build to take a while, the bulk of it is downloading and installing packages into the airootfs. The console scrolls pacman output, then bootloader staging, then mksquashfs progress (a large percentage counter), then xorriso assembling the image. Subsequent builds are much faster because the package cache is warm.
Confirm the expected output
On success, the last lines mention the finished ISO path, and
out/contains the image. The templatebuild.shalso produces the release-style artifacts: 7z multi-volume archives and anmd5sums.txt.Typical out/ contents out/ ├── ParchLinux-x86_64.iso ├── ParchLinux-x86_64.iso.7z.001 ├── ParchLinux-x86_64.iso.7z.002 └── md5sums.txtSanity-check the image: it should be roughly 1 GB for the template, and the checksum file should match it.
Verify the checksum $ cd out $ md5sum -c md5sums.txt ParchLinux-x86_64.iso: OKAn ISO dramatically smaller than expected usually means the build was interrupted, delete
out/and rebuild.Boot it with BIOS firmware in QEMU
QEMU is the fast feedback loop. The simplest invocation boots the image the way an old machine would, through the BIOS/MBR Syslinux path of the ISOHYBRID image.
BIOS boot test $ qemu-system-x86_64 -enable-kvm -m 4G -smp 4 \ -cdrom out/ParchLinux-x86_64.iso -boot dThe Syslinux menu appears with Parch entries (standard boot, speech, RAM boot). Take the default.
Boot it with UEFI firmware in QEMU
Run the same image against OVMF to exercise the systemd-boot path.
-bioswith the OVMF code image is enough for a boot test.UEFI boot test $ qemu-system-x86_64 -enable-kvm -m 4G -smp 4 \ -bios /usr/share/edk2/x64/OVMF_CODE.4M.fd \ -cdrom out/ParchLinux-x86_64.iso -boot dYou should see the systemd-boot menu instead of Syslinux, same Parch entries, different bootloader. Both firmwares reaching the live environment confirms all four bootmodes were generated correctly.
Validate the live system
Once booted (either firmware), log in, the live session autologins to a console on tty1, and run through this quick list:
The boot menu showed Parch entries and timed out into a boot without intervention.
Autologin dropped you to a shell (or, on desktop editions, into the graphical session via SDDM).
cat /etc/motdprints the Parch welcome text, which mentions the installation guide.Installation_guide(run as root) opens the installation guide in console, the script ships in /usr/local/bin.Networking works:
ping -c3 archlinux.orgresolves and replies.choose-mirrorruns and rewrites the mirror ranking.sudo pacman -Syuworks against the configured repositories, including the Parchworldrepo (pacman -Sl worldlists it).
Shut down and clean up (or keep iterating)
Power the VM off (
poweroffinside the guest, or close the QEMU window). Back on the host, you now have a working baseline. From here the interesting paths are:- Add packages, see Package lists.
- Change the live system, see airootfs customization.
- Build your own edition end to end, see the Custom edition tutorial.
Expected results
- A bootable
out/ParchLinux-x86_64.iso(template edition) with matchingmd5sums.txtand 7z volumes. - The same image boots via Syslinux under BIOS/SeaBIOS and via systemd-boot under OVMF.
- The live environment autologins, has network, and can reach the
worldrepository.
Troubleshooting
Build: "error: failed to commit transaction" / "target not found"
A package in iso/packages.x86_64 is missing from the configured repositories or conflicts with another entry. Fix the list, see Package lists. Then remove work/ and rebuild.
Build: "must be run as root" or mkarchiso fails mounting
The build was not run with root privileges. Re-run sudo ./build.sh from the repository root; do not try to de-root mkarchiso.
Build dies mid-way with "No space left on device"
Check df -h on the filesystem holding the repository (working dir) and /var/cache/pacman. Free space (paccache -r from pacman-contrib helps) and rebuild. Partial squashfs images from a failed run are safe to delete along with work/.
Build: download timeouts or signature errors on Arch mirrors
Refresh databases and pick faster mirrors on the host (sudo pacman -Syu, then rerank /etc/pacman.d/mirrorlist). Remember: -Sy alone creates partial upgrades, always -Syu.
QEMU is very slow or stuck at the firmware screen
Without KVM acceleration QEMU runs painfully slow, confirm -enable-kvm and that the kvm_intel/kvm_amd module is loaded on the host. Also give the VM at least 2 GB of RAM; the live system wants room.
QEMU boots the ISO but the window is tiny / graphics are garbled
Add -vga virtio (or qxl) to the QEMU command, or test with the image's compatibility boot entry, which passes nomodeset.
Something else fails at boot Work through Testing an ISO, it covers reading the console, editing the kernel command line from the systemd-boot menu, and unpacking the squashfs to inspect what was actually built.
Related pages
- Profile structure, what you just cloned.
- Archiso fundamentals, the phases you watched scroll by.
- Release automation, CI runs exactly this pipeline and ships the same artifact shape.