[SOLVED] Can't load module with GRUB2
Posted: Sat Sep 09, 2017 10:33 am
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:
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):
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!
Code: Select all
...
multiboot2 /boot/kernel.bin
module /test_program.bin
boot
...
Code: Select all
let boot_info = unsafe { multiboot2::load(multiboot_ptr) };
println!("Detected {} modules", boot_info.module_tags().count());