containers / bootc

Boot and upgrade via container images

Home Page:https://containers.github.io/bootc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bios installs fail

cgwalters opened this issue · comments

One thing I haven't yet debugged is for some reason grub fails with BIOS. There must be something different around how we're creating the partitions or installing things.

Ideally also, we should switch the installation code to use the new bootupd BIOS support.

OK things work with

diff --git a/src/bios.rs b/src/bios.rs
index f6501da..9ae93fc 100644
--- a/src/bios.rs
+++ b/src/bios.rs
@@ -61,7 +61,7 @@ impl Bios {
         #[cfg(target_arch = "x86_64")]
         cmd.args(&["--target", "i386-pc"])
             .args(&["--boot-directory", boot_dir.to_str().unwrap()])
-            .args(&["--modules", "mdraid1x"])
+            .args(&["--modules", "part_gpt mdraid1x"])
             .arg(device);
 
         #[cfg(target_arch = "powerpc64")]

I think this is because the code in https://github.com/rhboot/grub2/blob/61616e1efb5b4fcc7835711a6cdf7affb72d8801/util/setup.c#L253 is failing to probe the rootfs and isn't injecting the ext2 module. Or maybe hmm, it's that in a container the rootfs is overlayfs, but in coreos-assembler the rootfs is ext4. Regardless we need to ensure we sync up the bootfs and module for boot.

Edit: Actually the problem seems to be detecting the gpt setup