From 6716ae635064af4514f9c7f18a2e2c554a4151f2 Mon Sep 17 00:00:00 2001 From: Pragyan Poudyal Date: Tue, 27 Jan 2026 16:07:29 +0530 Subject: [PATCH] install: Add `bootloader` option 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 --- crates/kit/src/install_options.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/kit/src/install_options.rs b/crates/kit/src/install_options.rs index ce06f582..74649e04 100644 --- a/crates/kit/src/install_options.rs +++ b/crates/kit/src/install_options.rs @@ -40,6 +40,10 @@ pub struct InstallOptions { /// Default to composefs-native storage #[clap(long)] pub composefs_backend: bool, + + /// Which bootloader to use for composefs-native backend + #[clap(long, requires = "composefs_backend")] + pub bootloader: Option, } impl InstallOptions { @@ -70,6 +74,11 @@ impl InstallOptions { args.push("--composefs-backend".to_owned()); } + if let Some(b) = &self.bootloader { + args.push("--bootloader".into()); + args.push(b.clone()); + } + args } }