Skip to content

feat(installer): adopt Flatcar's EFI-SYSTEM/USR-A/USR-B/ROOT partition layout #134

Closed as not planned

Description

@castrojo

Design: docs/superpowers/specs/2026-09-13-flatcar-base-migration-design.md (PR #123), phase 3. Blocked by #126.

Flatcar's GPT, read directly from flatcar_production_image.bin:

# PARTLABEL MiB Type GUID
1 EFI-SYSTEM 1024 c12a7328-f81f-11d2-ba4b-00a0c93ec93b
2 BIOS-BOOT 2 21686148-6449-6e6f-744e-656564454649
3 USR-A 2048 5dfbf5f4-2848-4bac-aa5e-0d9a20b745a6
4 USR-B 2048 5dfbf5f4-2848-4bac-aa5e-0d9a20b745a6
6 OEM 1024 0fc63daf-8483-4772-8e79-3d69d8477de4
7 OEM-CONFIG 64 c95dc21a-df0e-4340-8d7b-26cbfa9a03e0
9 ROOT 1784 3884dd41-8582-4404-b9a8-e9b84f2df50e

Partitions 5 and 8 are absent; the numbering is ChromeOS heritage.

Change

Replace files/installer/repart.d/10-esp.conf, 20-root-a.conf, and 30-var.conf with:

PARTLABEL Type Source
EFI-SYSTEM ESP, vfat bootctl install + the OS UKI
USR-A 5dfbf5f4-2848-4bac-aa5e-0d9a20b745a6 CopyBlocks= the /usr DDI
USR-B same empty, sized to match
ROOT 3884dd41-8582-4404-b9a8-e9b84f2df50e Format=, GrowFileSystem=yes

Dropped: BIOS-BOOT (UEFI-only image, hard rule 5), OEM and OEM-CONFIG (cloud-provider hooks and Ignition, both rejected by the design).

Verity stays off in this ticket. Stage 1 guards the whole veritysetup block behind [ "${usrhash}" != "" ], so a layout-only change is a valid, bootable intermediate state. Verity lands in the /usr DDI ticket.

Cmdline for this stage: mount.usr=PARTLABEL=USR-A mount.usrfstype=xfs mount.usrflags=ro. Note the kernel prepends its own CONFIG_CMDLINE of rootflags=rw mount.usrflags=ro, so the UKI cmdline merges rather than replaces.

Acceptance

  • New repart.d drop-ins use the upstream type GUIDs verbatim.
  • systemd-sysinstall provisions all four partitions; USR-B exists and is empty.
  • Target boots with /usr mounted read-only from USR-A and a writable ROOT.
  • tests/unit/test_repart_layout.py updated for the new layout.
  • just validate passes.

Activity

  1. castrojo commented on Sep 13, 2026

    @castrojo
    ContributorAuthor

    Correction from the boot proof: OEM is required, not droppable.

    Built a conforming disk from upstream artifacts alone (unprivileged: sfdisk, mksquashfs, mke2fs -d) and booted the pinned kernel against it with no external initrd.

    First attempt, without an OEM partition, stalled:

    [*     ] Job dev-disk-by\x2dlabel-OEM.device/start running (4s / 1min 30s)
    ...
    Press Enter for emergency shell or wait 5 minutes for reboot.
    

    Stage 2 declares a dependency on dev-disk-by-label-OEM.device. Note it matches on filesystem label, not partition label, so the partition must be formatted with mke2fs -L OEM or equivalent.

    Second attempt with OEM added booted all the way:

    [    1.122448] Run /init as init process
    Mounting /usr from /dev/vda2
    [    1.776610] systemd[1]: Successfully made /usr/ read-only.
    [    1.788585] systemd[1]: systemd 257.9 running in system mode
    [    4.133550] systemd[1]: Switching root.
    Welcome to Flatcar Container Linux by Kinvolk 4593.2.5 (Oklo)!
    [  OK  ] Reached target multi-user.target - Multi-User System.
    localhost login:
    

    SSH host keys generated, DHCP up on ens3.

    Revised layout for this ticket:

    PARTLABEL Type GUID Source
    EFI-SYSTEM c12a7328-… bootctl install + UKI
    USR-A 5dfbf5f4-… CopyBlocks= the /usr DDI
    USR-B 5dfbf5f4-… empty
    OEM 0fc63daf-… Format=ext4, Label=OEM
    ROOT 3884dd41-… Format=, GrowFileSystem=yes

    BIOS-BOOT stays dropped (UEFI-only, hard rule 5). OEM-CONFIG stays dropped; nothing in the boot path references it.

    Second correction: Ignition needs no masking. ignition-setup-pre.service finished, ignition-delete-config.service was skipped because no trigger condition checks were met, and ignition-subsequent.target - Subsequent (Not Ignition) boot complete was reached. The state machine no-ops itself without a config.

    Also note mount.usrflags=ro alone produced Successfully made /usr/ read-only - no fstab or cmdline ro work needed.

  2. repires commented on Sep 22, 2026

    @repires

    This issue is covered by two existing open PRs and blocked on an unanswered maintainer decision:

    1. Covering Open PRs:

    2. Blockers & Maintainer Decisions Required:

    Assisted-by: Gemini 3.8 Flash via GitHub Copilot
    Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

    — hive: backend=agy

    🐝 Hive Agent: contributor | SHA: dc48bfb

  3. jeefy commented on Sep 29, 2026

    @jeefy
    Collaborator

    Superseded by #262: installed disks now use systemd-repart discoverable partitions (ESP, A/B /usr + verity slots, persistent xfs root; files/os/repart.d/) instead of Flatcar's EFI-SYSTEM/USR-A/USR-B/ROOT layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions