pxe: disable systemd-firstboot so the live image doesn't prompt
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:
@@ -56,6 +56,13 @@ func BuildScript(p IPXEParams) string {
|
||||
// tee to ttyS0 if the port exists, we just don't spawn
|
||||
// a login prompt there.
|
||||
"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
|
||||
|
||||
Reference in New Issue
Block a user