pxe: disable systemd-firstboot so the live image doesn't prompt
CI / Lint + build + test (push) Successful in 1m22s
Release / release (push) Has been cancelled

systemd-firstboot.service is an interactive wizard that asks for
locale, timezone, and root password when /etc/machine-id isn't
populated — i.e. every PXE boot of a mkosi-built image. It sits on
sysinit.target waiting for input that will never arrive, blocking
the agent service and every other downstream unit indefinitely.

systemd.firstboot=off on the kernel cmdline is the documented kill
switch; no image-side changes needed.
This commit is contained in:
2026-04-18 15:35:24 -04:00
parent 956120b80e
commit 026923075c
+7
View File
@@ -56,6 +56,13 @@ func BuildScript(p IPXEParams) string {
// tee to ttyS0 if the port exists, we just don't spawn // tee to ttyS0 if the port exists, we just don't spawn
// a login prompt there. // a login prompt there.
"systemd.mask=serial-getty@ttyS0.service", "systemd.mask=serial-getty@ttyS0.service",
// systemd-firstboot.service is the interactive "first boot
// wizard" (locale/timezone/root-password prompts). In a
// PXE live image there's no operator at the console to
// answer, so it blocks sysinit.target forever and the
// agent never comes up. systemd.firstboot=off short-
// circuits it entirely.
"systemd.firstboot=off",
) )
var b strings.Builder var b strings.Builder