Building an ISO
peiso build builds a bootable Peios ISO from packages you have built.
Do this to try a set of packages as a whole system, or to make a medium
to boot a machine from. For what an ISO holds, see
Peios ISOs.
Before you start #
- Install
peiso, andmkirfandmkukifrom peiosutils, or know where they are. - Install
mkfs.vfat, mtools,xorriso, andmksquashfsfrom squashfs-tools 4.6 or later.peisoruns them, without any privilege. - Have the packages in an artifact directory, such as one that
pekitpacks into. The live system needs a shell and an init, and the initramfs needs prelude, the live-boot hook, and a shell. Packages bring what they depend on or require, so the artifact directory needs those packages too. - Have the kernel package,
dev.peios.kernel, in the artifact directory too, or a Peios kernel image built with its EFI stub.
Write the spec #
Write the spec, such as peios.toml, beside the artifact directory. Paths
in it are relative to the spec:
= true
[[]]
= "artifacts"
[]
= "dev.peios.kernel"
= "console=ttyS0 rd.shell"
[[]]
= "net.busybox.busybox"
= true
[[]]
= "dev.peios.ppk"
[[]]
= "dev.peios.prelude"
= false
= true
[[]]
= "dev.peios.live-root"
= false
= true
The kernel comes from its package, which the ISO carries in its store.
The live system is busybox and ppk, and the initramfs holds busybox,
whose shell the live-boot hook runs, with prelude and the hook itself.
Each place also holds every package its packages depend on or require,
and each package is carried at the newest version the artifact directory
holds, unless the spec gives a version. For every key, see
ISO Specs.
Check what the spec brings #
Run peiso resolve to list every package the ISO would carry, without
building it:
Each line is a package, the places that hold it, and what first asked for it. A package in neither place is in the store only:
dev.peios.kernel@0.25.0-indev-1?arch=x86_64 store (the request for dev.peios.kernel)
dev.peios.prelude@0.0.7-1?arch=x86_64 initramfs (the request for dev.peios.prelude)
org.gnu.glibc@2.44-1?arch=x86_64 liveboot,initramfs (net.busybox.busybox@1.37.0-1 requires libc.so.6)
Build the ISO #
Run peiso build with the spec and where to write the ISO:
Give --mkirf, --mkuki and --mksquashfs with their paths if they
aren't on PATH.
peiso says what it is doing, and prints the ISO's path when it is done:
peiso: fetching net.busybox.busybox@1.37.0-1?arch=x86_64
peiso: fetching dev.peios.ppk@0.1.0-1?arch=x86_64
peiso: fetching dev.peios.prelude@0.0.7-1?arch=x86_64
peiso: fetching dev.peios.live-root@0.1.0-1?arch=x86_64
peiso: fetching dev.peios.kernel@0.25.0-indev-1?arch=x86_64
peiso: writing the live system's image
peiso: composing the initramfs
peiso: building the UKI
peiso: writing the ISO
peios.iso
Boot it #
Boot the ISO in QEMU with OVMF, its UEFI firmware. OVMF writes to its variables, so give it a copy of them:
prelude reports each step of boot on the console, and starts the live system's init. The live-boot hook says where it found the medium, and checks the live system's image before it mounts it:
ppk-live-root: found the medium on /dev/sr0
ppk-live-root: checking the live system's image
To boot a computer, write the ISO to a USB stick and start the computer from it. The ISO is also a disk with an EFI system partition, so it boots from a stick as it does from a disc.
If peiso refuses #
peiso checks the spec and resolves every package before it builds
anything. It refuses a package, or a dependency, that no repository
holds at a version that will do, and says what needed it:
peiso: dev.peios.peios-experimental@2026.8-11 depends on dev.peios.bootconfig >= 0.21.0-alpha11-1, but no artifact directory holds dev.peios.bootconfig for x86_64: artifacts
It refuses a spec with no package in the live system, or none in the initramfs, since such an ISO couldn't boot. It also refuses what a spec can say but Peios can't do yet, such as a repository on the network, and says why.
If a tool it runs fails, peiso stops and shows what the tool said.