Repository navigation
Description
Design: docs/superpowers/specs/2026-09-13-flatcar-base-migration-design.md (PR #123), phase 2.
The finding
flatcar_production_image_kernel_config.txt for 4593.2.5:
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="bootengine.cpio"
CONFIG_INITRAMFS_COMPRESSION_XZ=y
The kernel elements/flatcar/flatcar-kernel.bst already imports is self-sufficient. Flatcar publishes a manifest per stage:
| Stage | Manifest | Entries | Contents |
|---|---|---|---|
| 1 | flatcar_production_image_initrd_contents.txt |
339 | rootfs-0/ shim: 6,772-byte /init, busybox, kmod, dmsetup, veritysetup, empty /realinit + /sysusr/usr |
| 2 | flatcar_production_image_realinitrd_contents.txt |
2,280 | The systemd initrd - same entry count as /usr/lib/flatcar/bootengine.img |
Stage 1 sets up dm-verity for /usr and pivots into stage 2. flatcar_production_image.vmlinuz and flatcar_production_pxe.vmlinuz are both 34,245,760 bytes - one kernel, one embedded initramfs.
So the installer has been generating a second initrd to lay over a working one.
Corrections to earlier revisions of this issue
flatcar_production_pxe_image.cpio.gzis not a driver initrd: four cpio entries wrappingusr.squashfsat 374 MiB, a RAM-boot OS payload.bootengine.imgdoes not need separate importing either. It is stage 2 of what the kernel already contains.
What still has to go
elements/oci/bluefin-server-installer.bst step 1b: the dracut call with its hand-curated --add-drivers list (origin of the missing usb-storage/uas/sd_mod/xhci-pci/ahci bugs), the two-root ld.so.conf/ld.so.cache staging at lines 108-124, grep/sed in build-depends, and the module force-load + udevadm settle workaround.
What has to arrive
Conformance to the cmdline the embedded initramfs expects. From Flatcar's shipped usr/boot/syslinux/root.A.cfg:
root=LABEL=ROOT rootflags=subvol=root usr=PARTLABEL=USR-A
The DDI has neither a USR-A verity pair nor a ROOT label, and this design rejects Ignition, so stage 2's ignition-fetch/disks/mount/files/kargs units and sysroot-boot.service must be masked.
Options, ranked, to be settled by the phase 4 boot proof (#130):
- Conform to Flatcar's layout -
USR-A/USR-Bverity pair plusROOT-labelled root infiles/installer/repart.d/. Largest change, but it is the only layout upstream tests, and it delivers roadmap items 1-3 (A/B slots, read-only/usr, dm-verity) as a side effect rather than as three separate projects. - Override the built-in initramfs with an external one. Today's behavior; keeps us owning a generator forever.
mkosi-initrd --generic --kernel-version=6.12.102-flatcar- the systemd project's own generator, if the current partition layout must be preserved.
Acceptance
- dracut call,
ld.so.cachestaging, and force-load/settle workaround deleted; no replacement generator added. - Target boots on the kernel's built-in initramfs with Ignition units masked.
- Root mounts without an Ignition config present.
just show-me-the-futureinstalls and boots without manual initrd repair.- Installer contract tests updated for the removed steps.
Activity
[-]feat(installer): assemble the target UKI from upstream Flatcar kernel and initrd, delete the dracut path[/-][+]feat(installer): boot the target from Flatcar bootengine.img, delete the dracut path[/+][-]feat(installer): boot the target from Flatcar bootengine.img, delete the dracut path[/-][+]feat(installer): delete the dracut path; the Flatcar kernel already carries its initramfs[/+]castrojo commentedon Sep 13, 2026
Verified empirically, not just from the kernel config.
Booted the pinned
flatcar_production_image.vmlinuzin QEMU with no-initrdand no disk attached:Result:
Run /init as init processwith no initrd supplied - the initramfs is compiled in and live.Waiting for drive..., the busybox shim hunting forusr=PARTLABEL=USR-A. That is the boot contract asserting itself.rootflags=rw mount.usrflags=roprecedes the appended args: the kernel carries a built-inCONFIG_CMDLINE, so a UKI cmdline merges with it rather than replacing it. Worth knowing before anyone sets--cmdlineinukifyand expects full control.Recorded in the spec at
bc5df5eon PR #123.castrojo commentedon Sep 13, 2026
Decision made: follow Flatcar's design. Option 1 adopted; options 2 and 3 dropped.
Stage 1's
/initwas extracted from the kernel's embedded initramfs and read directly rather than inferred. The contract, and what each part forces:veritysetup --panic-on-corruption --hash-offset=1065345024- verity is one partition with the hash appended, not systemd-repart's two-partition model. Now feat(ddi): build the OS payload as a verity /usr image pinned by verity.usrhash #135.[ "${usrhash}" != "" ]guards the whole block - verity is optional, so partition layout (feat(installer): adopt Flatcar's EFI-SYSTEM/USR-A/USR-B/ROOT partition layout #134) and verity (feat(ddi): build the OS payload as a verity /usr image pinned by verity.usrhash #135) split cleanly.mount -t "${usrfstype}"-/usrstays XFS viamount.usrfstype=xfs.losetup -r /sysusr/usr/lib/flatcar/bootengine.img- stage 2 comes from/usron disk, not the kernel. Noted on feat(flatcar): import Flatcar /usr as a boot reference, not as the payload #126.This ticket now reduces to its original core: delete the dracut call, the two-root
ld.so.cachestaging, thegrep/sedbuild-depends, and the force-load/settle workaround. No replacement generator.jeefy commentedon Sep 29, 2026
Superseded by #262: the OS no longer uses a Flatcar kernel or its bundled initramfs. The kernel comes from freedesktop-sdk and the initrd is built from FSDK components (elements/bluefin-server/initrd/), so there is no dracut path to delete.