Skip to content

Commit 94ce2b4

Browse files
Grub wip
Signed-off-by: Pragyan Poudyal <[email protected]>
1 parent fd2796a commit 94ce2b4

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
@@ -1518,6 +1518,21 @@ fn setup_composefs_boot(root_setup: &RootSetup, state: &State, image_id: &str) -
15181518
&cmdline_refs,
15191519
)?;
15201520

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

0 commit comments

Comments
 (0)