Skip to content

Conversation

@mvo5
Copy link
Contributor

@mvo5 mvo5 commented Nov 12, 2025

[this will unblock https://github.com/osbuild/image-builder-cli/pull/324]

We need a way to
a) set the bootc default filesystem
b) detect when its unset and provide a clear error

This commit fixes both issue, we had a way to setup the default filesystem but that is now applied too late because we now share the partition table loading with the generic image types which have no concept of an empty default. So this moves the default-fs setting into the bootc.NewBootcDistro() as a new DistroOptions struct.

It also adds a proper error type for when no default-fs is set, this way ibcli can detect this and pick a default on its own (this is what Achilleas suggested in [0]).

There is also a bugfix in setupDefaultFS() so that we do not switch to "btrfs" on the /boot partition. This is the wrong layer to know about /boot and details like this, we will need a followup that moves this into disk instead.

[0] osbuild/image-builder-cli#324 (comment)

@mvo5 mvo5 requested a review from ondrejbudai November 12, 2025 08:49
@mvo5 mvo5 requested a review from a team as a code owner November 12, 2025 08:49
@mvo5 mvo5 requested review from achilleas-k, bcl and thozza November 12, 2025 08:49
}

type DistroOptions struct {
DefaultFs string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we document that this has precedence over the default coming from the container?

We need a way to
a) set the bootc default filesystem
b) detect when its unset and provide a clear error

This commit fixes both issue, we had a way to setup the default
filesystem but that is now applied too late because we now share
the partition table loading with the generic image types which
have no concept of an empty default. So this moves the default-fs
setting into the `bootc.NewBootcDistro()` as a new `DistroOptions`
struct.

It also adds a proper error type for when no default-fs is set,
this way ibcli can detect this and pick a default on its own
(this is what Achilleas suggested in [0]).

There is also a bugfix in setupDefaultFS() so that we do not
switch to "btrfs" on the /boot partition. This is the wrong
layer to know about /boot and details like this, we will
need a followup that moves this into disk instead.

[0] osbuild/image-builder-cli#324 (comment)
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@supakeen supakeen added this pull request to the merge queue Nov 13, 2025
Merged via the queue into osbuild:main with commit 51304fc Nov 13, 2025
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants