@@ -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
}
@@ -1509,17 +1514,17 @@ fn setup_composefs_bls_boot(
1509
1514
None => anyhow:: bail!( "Expected rootfs to have a UUID by now" ) ,
1510
1515
} ;
1511
1516
1512
- let cmdline_refs = [
1513
- "console=ttyS0,115200" ,
1514
- & format ! ( "root=UUID={rootfs_uuid}" ) ,
1515
- "rw" ,
1516
- ] ;
1517
+ let root_uuid_karg = format ! ( "root=UUID={rootfs_uuid}" ) ;
1518
+
1519
+ let mut cmdline_refs = vec ! [ "console=ttyS0,115200" , & root_uuid_karg , "rw" ] ;
1520
+
1521
+ cmdline_refs . extend ( root_setup . kargs . iter ( ) . map ( String :: as_str ) ) ;
1517
1522
1518
1523
composefs_write_boot_simple (
1519
1524
& repo,
1520
1525
entry,
1521
1526
& id,
1522
- root_setup. physical_root_path . as_std_path ( ) , // /run/mounts/bootc/boot
1527
+ root_setup. physical_root_path . as_std_path ( ) ,
1523
1528
Some ( "boot" ) ,
1524
1529
Some ( & format ! ( "{}" , id. to_hex( ) ) ) ,
1525
1530
& cmdline_refs,
@@ -1555,8 +1560,6 @@ fn setup_composefs_uki_boot(
1555
1560
) ?;
1556
1561
1557
1562
// Add the user grug cfg
1558
- // TODO: We don't need this for BLS. Have a flag for BLS vs UKI, or maybe we can figure it out
1559
- // via the boot entries above
1560
1563
let grub_user_config = format ! (
1561
1564
r#"
1562
1565
menuentry "Fedora Bootc UKI" {{
0 commit comments