osbuild / osbuild/image-builder

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

Open
#2,228 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/bootc enhancement
Dominant language
Go
Stars
77
Forks
103
Avg merge
3d 6h
Merged PRs (30d)
53

Description

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: https://github.com/osbuild/image-builder-cli/pull/462

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pkg/distro/generic/bootc_imagetype.go at genPartitionTableFsCust and inspect how the base partition table and its first-level payloads are handled. The change is complete when the partitioning mode is inferred as autolvm for lvm, btrfs for btrfs, and raw otherwise, while the rest of the handling remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.