Skip to content

bootc composefs-native backend #1190

@travier

Description

@travier

The composefs-rs project is a Rust implementation of composefs that is capable of generating composefs images from container images.

We should integrate it in bootc as an alternative to the ostree backend. This would help make progress on phasing out ostree, UKI support and unified storage:

To be able to do that, we need to make bootc capable of handling both repository formats and have it handle the transition from ostree to pure composefs.

A potential layout for this is discussed in containers/composefs-rs#38.

Here are suggested steps for creating a first proof of concept implementation:

  • Add an option to bootc switch
    • bootc switch --composefs quay.io://foo:bar
    • bootc will import the container image using the composefs-rs library in a dedicated composefs repo
    • bootc will set up the repo as needed
  • bootc will create a new "deployment" for this image
    • Do the three way merge for /etc, comparing previous image, new image, current changes
    • Or use overlayfs instead to do that for /etc
    • Setup /var so that it's shared with ostree deployments
  • bootc will setup the new deployment for the next boot
    • UKI case:
      • GRUB: Generate GRUB config snippet to boot the UKIs in order
      • systemd-boot: Install the UKI in /boot/efi/EFI/Linux (order handling to be confirmed)
    • Non-UKI case:
      • GRUB: Install the kernel & initrd in /boot and setup the BLS config
      • systemd-boot: Install the kernel & initrd in /boot/efi and setup the BLS config

Tracker issues:

Install UX

Right now we're adding a new --composefs-native.

Proposal: Sealed images default to requiring sealed setup

i.e. secure boot w/fsverity on target or erroring by default

(less agreement on: can opt in to degrading w/ bootc install <image> --disable-sealing )

TODO: Create a spec for detecting sealed images

  • Detect via looking at layer structure
  • Detect by parsing UKI

Proposal: Automatically detect in initramfs if Secure Boot is disabled

?

Proposal from @travier: Remove verity optional composefs flag

Some confusion about use cases

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/composefsIssues related to composefstriagedThis looks like a valid issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions