Skip to content

Conversation

@Johan-Liebert1
Copy link
Contributor

For composefs backend we'd sometimes want to override the bootloader. Currently we have logic that check if an image has bootupd or not, and if it does we use grub as the bootloader, even if systemd-boot is actually installed

We use this option to override the bootloader

For composefs backend we'd sometimes want to override the bootloader.
Currently we have logic that check if an image has bootupd or not, and
if it does we use grub as the bootloader, even if systemd-boot is
actually installed

We use this option to override the bootloader

Signed-off-by: Pragyan Poudyal <[email protected]>
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request successfully introduces a bootloader option for the composefs_backend within the InstallOptions struct. This option is correctly configured with clap attributes to require composefs_backend and is properly translated into command-line arguments for bootc. The changes are well-aligned with the stated goal of overriding the bootloader for composefs-native backends.

@Johan-Liebert1
Copy link
Contributor Author

This is in prep for bootc-dev/bootc#1913

pub composefs_backend: bool,

/// Which bootloader to use for composefs-native backend
#[clap(long, requires = "composefs_backend")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure we need to require this here, but it doesn't hurt.

Comment on lines +77 to +80
if let Some(b) = &self.bootloader {
args.push("--bootloader".into());
args.push(b.clone());
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Obviously fine as is but can also be args.extend(self.bootloader.map(|v| ["--bootloader", v).cloned()) probably

@cgwalters cgwalters enabled auto-merge (rebase) January 27, 2026 14:26
@cgwalters cgwalters merged commit dec2d7c into bootc-dev:main Jan 27, 2026
12 of 14 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.

2 participants