Skip to content

research: 1.16.x composefs installs onto btrfs: repository security mode and boot after PR 2629 #36

Open

Description

@cgwalters-bot

Follow-up to #33. Does a composefs install made by bootc 1.16.x (before bootc-dev/bootc PR 2248, which first shipped in 1.17.0) onto btrfs end up with a repository opened insecure by the pre-flight, as on ext4 without verity?

In a bcvk VM, run bootc install to-filesystem --composefs-backend with BLS boot from 1.16.0, 1.16.3 and 1.16.14 onto a btrfs root. For each:

  1. Record the BLS options line (strict, or with ?).
  2. Run fsverity measure on the repository's meta.json and on a sample of objects, and record the repository's security mode.
  3. Boot it, then update to bootc-dev/bootc PR 2629's head and boot again.

Report a short table (version → strict?, meta.json verity, objects verity, boots before and after PR 2629), with the exact commands.

Activity

  1. cgwalters-bot commented on Nov 6, 2026

    @cgwalters-bot
    CollaboratorAuthor

    ✅ agent ended well. Result: #36 (comment)

  2. cgwalters-bot commented on Nov 6, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Yes on the repository mode, but it doesn't break boot on btrfs. All three versions write meta.json without fs-verity, so composefs-rs detects each repository as insecure. The BLS karg is still strict, though, and on btrfs every object has verity. bootc-dev/bootc#2629 (head c53c2fcc) applies a strict policy from the karg and doesn't look at meta.json, so all three systems boot after the switch.

    install on btrfs, GRUB BLS BLS composefs= meta.json verity objects with verity boots before boots after the switch to #2629
    1.16.14 023600d8... (strict) none (ENODATA) 34631 / 34631 yes yes
    1.16.0 36b7df4e... (strict) none (ENODATA) 34630 / 34630 yes yes
    1.16.3 d644027a... (strict) none (ENODATA) 34630 / 34630 yes yes

    The status JSON reported missingVerityAllowed: false on each system before the switch, and the new BLS entry it staged was strict too. After the reboot, bootc-root-setup finished and /proc/cmdline showed the PR's digest. I counted the objects on the booted 1.16.x system after bootc switch had pulled the PR image, so the counts include its objects. At install time, sampled objects already had verity. The missing verity on meta.json comes from the disk-space pre-flight in install.rs, which creates the repository first: it passes enable_verity = false in 1.16.0 and RepositoryConfig::...set_insecure() in 1.16.3 and 1.16.14. supports_fsverity() counts btrfs (and ext4), and that is why the karg is strict.

    Setup, which differs from #33 in places:

    • Base image: quay.io/fedora/fedora-bootc:44 (kernel 7.2.15), because CentOS Stream 10 kernels have no btrfs.
    • Each image is built with podman build --build-context src=<bootc checkout of the tag or PR head> -t localhost/bootc-<ver>. The build stage on fedora:44 runs make bin && make install DESTDIR=/out. The final stage copies /out onto the base and runs dracut -f.
    • Each install runs in bcvk ephemeral run-ssh --bind-storage-ro --mount-disk-file disk.raw:target localhost/bootc-<ver> (bcvk 0.22.0, 20G disk). Inside the VM:
      sfdisk --wipe always /dev/disk/by-id/virtio-target   # 1M BIOS boot, 512M ESP, rest root (DPS x86-64 root type)
      mkfs.vfat -n EFI-SYSTEM ...-part2; mkfs.btrfs -f -L root ...-part3
      mount ...-part3 /var/mnt/target; mount ...-part2 /var/mnt/target/boot/efi
      # /etc/containers/storage.conf: additionalimagestores = ["/run/virtiofs-mnt-hoststorage"]
      bootc install to-filesystem --composefs-backend --bootloader grub \
        --source-imgref containers-storage:localhost/bootc-<ver> --karg console=ttyS0,115200n8 /var/mnt/target
      cat /var/mnt/target/boot/loader/entries/*.conf
      fsverity measure composefs/meta.json; find composefs/objects -type f | xargs fsverity measure   # fsverity-utils 1.6 from Fedora 44
      
    • Boot: qemu-kvm -machine q35 -cpu host -m 4096 -drive if=virtio,format=raw,file=disk.raw, with SeaBIOS rather than OVMF (see below). The root SSH key goes in through -smbios type=11,value=io.systemd.credential.binary:ssh.authorized_keys.root=....
    • Update: podman push localhost/bootc-pr2629 127.0.0.1:5036/bootc-pr2629 to a local registry:2.8. On the guest, I marked 10.0.2.2:5036 insecure in registries.conf.d, then ran bootc switch 10.0.2.2:5036/bootc-pr2629:latest and systemctl reboot.

    Things I noticed along the way:

    • From the bcvk ephemeral VM, bootupd installed only its BIOS component and left the ESP empty, so these disks don't boot under OVMF. I booted them with SeaBIOS. GRUB and the BLS entries are the same either way.
    • On the BIOS-booted system, bootc status from the PR build fails with Finding ESP used for booting: Reading LoaderDevicePartUUID-...: SystemNotUEFI. 1.16.14 shows its status fine on the same system.
    • 1.16.0 and 1.16.3 left --karg console=ttyS0,115200n8 out of the BLS entry; 1.16.14 kept it.
    • --root-ssh-authorized-keys didn't give working root SSH on the 1.16.14 install, which is why I used the SMBIOS credential.

    Not covered: install to-disk, UKIs, systemd-boot, and booting under UEFI.

    Generated-by: https://github.com/cgwalters/#llms

    Generated by agent · ◷

  3. cgwalters commented on Nov 6, 2026

    @cgwalters
    Member

    OK we need to ensure we've refined good tools and instructions here. Why did this agent run not use bcvk to-disk?

    Update: podman push localhost/bootc-pr2629 127.0.0.1:5036/bootc-pr2629 to a local registry:2.8. On the guest, I marked 10.0.2.2:5036 insecure in registries.conf.d, then ran bootc switch 10.0.2.2:5036/bootc-pr2629:latest and systemctl reboot.

    OK yeah we need to streamline this right now upgrade tests rely on virtiofs mounted container stores, but I think we could take that approach too. Let's refine the logs from that into reusable scripts for later? Something in our xtask.rs?

  4. cgwalters commented on Nov 6, 2026

    @cgwalters
    Member

    @cgwalters-bot comment on the gist

  5. cgwalters-bot commented on Nov 6, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Posted on the gist. Tooling follow-up: cgwalters-forge/bootc#108 (an xtask command built on bcvk to-disk, plus devspace instructions).

  6. thejesh23 commented on Nov 11, 2026

    @thejesh23

    The result table says all three versions boot after the switch to #2629 on btrfs; I haven't reproduced it.

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