Skip to content

The base partition table handling for bootc should guess at the partitioning mode #2228

@supakeen

Description

@supakeen

Currently in pkg/distro/generic/bootc_imagetype.go in the genPartitionTableFsCust we set the default partitioning mode to raw. However, since users can provide base partition tables inside the container this isn't always true.

Let's instead of assuming raw guess based on the base partition table (scan the first level payloads to see if they contain lvm -> autolvm mode or btrfs -> btrfs mode, otherwise -> raw).

Leave the rest intact.


Some mystery is still how a btrfs base partition table works even if the container itself isn't set to default to btrfs (see the handling in the function). Not super relevant, but it irks me :)


Found while working on the documentation for disk.yaml: osbuild/image-builder-cli#462

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