mkosi for test image builds#4539
Conversation
… if different disk filesystems are used.
|
Looking forward to it, the current build step is slooooooooowwww |
|
If we're fine booting the disk image outside of Because it works to install with, and run a full installation. There's just no way for |
|
The runner is failing because the workflow is still calling @@ -32,7 +32,7 @@ jobs:
- run: pacman-key --init
- run: pacman --noconfirm -Sy archlinux-keyring
- - run: ./build_iso.sh
+ - run: ./test_tooling/mkarchiso/build_iso.shThe script does Happy to send a tiny PR against your branch if that is easier. Not touching the mkosi qemu boot-after-install puzzle, that one is all yours :) |
|
Following up on the boot-chain question separately — dug into why
If two invocations is acceptable, a small wrapper for the post-install boot does the job: #!/usr/bin/env bash
# test_tooling/mkosi/boot_installed.sh
set -euo pipefail
DISK="${1:-mkosi.output/archinstall_small}"
NVRAM="./archinstall_small_VARS.fd"
OVMF_CODE="/usr/share/edk2/x64/OVMF_CODE.4m.fd"
OVMF_VARS="/usr/share/edk2/x64/OVMF_VARS.4m.fd"
[[ -f "$NVRAM" ]] || cp "$OVMF_VARS" "$NVRAM"
exec qemu-system-x86_64 \
-enable-kvm -cpu host -m 8G -smp 4 \
-drive if=pflash,format=raw,readonly=on,file="$OVMF_CODE" \
-drive if=pflash,format=raw,file="$NVRAM" \
-drive file="$DISK",format=raw,if=none,id=disk0 \
-device nvme,serial=archinstall_small,drive=disk0,bootindex=0 \
-display gtkFlow becomes: Keeps the The clean version of this is probably upstream in mkosi — something like |
|
Clarification: I haven't adjusted the runner code at all yet. Just fixed the tooling :) And you're more than welcome to take a swing! I'll see if I can get feedback on your idea from the mkosi project |
The script was relocated to test_tooling/mkarchiso/ in this PR, but iso-build.yaml still invoked it at the old root path, breaking the workflow with `./build_iso.sh: No such file or directory` (exit 127). CWD stays at the repo root since the script does `cp -r .` into /tmp/archlive/airootfs/... — only the invocation path needs updating.
ci(iso-build): use new build_iso.sh path after move
|
Now we just need a GitHub runner that produces a UKI artifact that we can download and boot (to test individual commits). And keep ISO for 1:1 real world Arch ISO releases. That might get gnarly to use mkosi to boot, as it checks versions against the version file when it tries to locate a UKI. So we can use this PR as-is for local tests, but we'd need something like archtest.py to do more generic booting of a UKI -> HDD boot on downloaded UKI artifacts? Tl;Dr: I'd like to create a generic helper script to help boot UKI's our GitHub runners produce |
|
Maybe you can rework #4470 ? Or you meant something else then QEMU testing ? |
It's significantly faster than
mkarchiso, and produce smaller images in general.The downside might be that
mkosiuse case is probably not this.The current limiting factor is that I have no idea how to get
mkosito boot the disk image afterarchinstallhas done it's thing. But using this to test installs works fine if done with:You could manually craft a
qemu-system-x86_64command line, but the whole point of swapping tomkosiwould be that it would allow us to do:And both build with the latest/given
archinstall, and also facilitate a qemu "builder" that matches whatever we built.Currently exploring ways of booting the
archinstall'd system: Torxed/mkosi@6f3c208