I am trying to load a module (a flat binary file) using GRUB2. I have put the file I want to load at the root of the ISO and then modified my grub.cfg to:
Code:
...
multiboot2 /boot/kernel.bin
module /test_program.bin
boot
...
I am then trying to read the information about this module using the
multiboot2 crate (my OS is written in Rust) with this code (just to test the number of modules loaded):
Code:
let boot_info = unsafe { multiboot2::load(multiboot_ptr) };
println!("Detected {} modules", boot_info.module_tags().count());
This reports that 0 modules have been loaded. I am fairly sure the parsing of the multiboot header is working as intended, as I am using it for page frame allocation etc. successfully. Thanks in advance!