Skip to content

Commit 83227f5

Browse files
Grub wip
Signed-off-by: Pragyan Poudyal <[email protected]>
1 parent b3d1952 commit 83227f5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/src/install.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,21 @@ fn setup_composefs_boot(root_setup: &RootSetup, state: &State, image_id: &str) -
15201520
&cmdline_refs,
15211521
)?;
15221522

1523+
// Add the user grug cfg
1524+
let grub_user_config = format!(
1525+
r#"
1526+
menuentry "Some Fedora Idk" {{
1527+
insmod fat
1528+
insmod chain
1529+
search --no-floppy --set=root --fs-uuid {rootfs_uuid}
1530+
chainloader /boot/EFI/Linux/uki.efi
1531+
}}
1532+
"#
1533+
);
1534+
1535+
std::fs::write(boot_dir.join("grub2/user.cfg"), grub_user_config)
1536+
.context("Failed to write grub2/user.cfg")?;
1537+
15231538
let state_path = root_setup
15241539
.physical_root_path
15251540
.join(format!("state/{}", id.to_hex()));

0 commit comments

Comments
 (0)