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