@@ -201,7 +201,7 @@ pub(crate) struct InstallConfigOpts {
201
201
///
202
202
/// Example: --karg=nosmt --karg=console=ttyS0,114800n8
203
203
#[ clap( long) ]
204
- karg : Option < Vec < String > > ,
204
+ pub ( crate ) karg : Option < Vec < String > > ,
205
205
206
206
/// The path to an `authorized_keys` that will be injected into the `root` account.
207
207
///
@@ -568,6 +568,11 @@ impl InstallToDiskOpts {
568
568
}
569
569
}
570
570
571
+ // Can't add kargs to UKI
572
+ if self . composefs_opts . boot == BootType :: Uki && self . config_opts . karg . is_some ( ) {
573
+ anyhow:: bail!( "Cannot pass kargs to UKI" ) ;
574
+ }
575
+
571
576
Ok ( ( ) )
572
577
}
573
578
}
@@ -1516,17 +1521,17 @@ fn setup_composefs_bls_boot(
1516
1521
None => anyhow:: bail!( "Expected rootfs to have a UUID by now" ) ,
1517
1522
} ;
1518
1523
1519
- let cmdline_refs = [
1520
- "console=ttyS0,115200" ,
1521
- & format ! ( "root=UUID={rootfs_uuid}" ) ,
1522
- "rw" ,
1523
- ] ;
1524
+ let root_uuid_karg = format ! ( "root=UUID={rootfs_uuid}" ) ;
1525
+
1526
+ let mut cmdline_refs = vec ! [ "console=ttyS0,115200" , & root_uuid_karg , "rw" ] ;
1527
+
1528
+ cmdline_refs . extend ( root_setup . kargs . iter ( ) . map ( String :: as_str ) ) ;
1524
1529
1525
1530
composefs_write_boot_simple (
1526
1531
& repo,
1527
1532
entry,
1528
1533
& id,
1529
- root_setup. physical_root_path . as_std_path ( ) , // /run/mounts/bootc/boot
1534
+ root_setup. physical_root_path . as_std_path ( ) ,
1530
1535
Some ( "boot" ) ,
1531
1536
Some ( & format ! ( "{}" , id. to_hex( ) ) ) ,
1532
1537
& cmdline_refs,
@@ -1562,8 +1567,6 @@ fn setup_composefs_uki_boot(
1562
1567
) ?;
1563
1568
1564
1569
// Add the user grug cfg
1565
- // TODO: We don't need this for BLS. Have a flag for BLS vs UKI, or maybe we can figure it out
1566
- // via the boot entries above
1567
1570
let grub_user_config = format ! (
1568
1571
r#"
1569
1572
menuentry "Fedora Bootc UKI" {{
0 commit comments