No module information in multiboot2 tags

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
heat
Member
Member
Posts: 103
Joined: Sat Mar 28, 2015 11:23 am
Libera.chat IRC: heat

No module information in multiboot2 tags

Post by heat »

Hello,

I'm trying to get the module address so I can access my initrd. My old kernel would get it using a similar grub.cfg, but using multiboot1. Now I'm trying to use multiboot2 to boot the new x86_64 kernel. I already was able to get the framebuffer info and the memory map. The problem is that grub 2 doesn't pass the module tag to the kernel. I tried messing with the header tags but it didn't change a thing.

My grub.cfg:

Code: Select all

menuentry "Spartix" {
	set timeout=10
	loadfont unicode
	insmod vbe
  	insmod vga
  	insmod xzio
	insmod gzio
  	insmod gfxterm
	terminal_output gfxterm
	echo "Loading the vmspartix kernel"
	multiboot2 /boot/vmspartix.xz
	echo "done."
	set gfxpayload=1024x768x32
	echo "Loading the initrd"
	module /boot/initrd.tar.xz
	echo "done."
	boot
}
Multiboot2 header: https://github.com/PedroFalcato/Spartix ... _64/boot.S
Multiboot2 tag parsing code: https://github.com/PedroFalcato/Spartix ... kernel.cpp

Thanks for the help :D
If some of you people keep insisting on having backwards compatibitity with the stone age, we'll have stone tools forever.
My Hobby OS: https://github.com/heatd/Onyx
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: No module information in multiboot2 tags

Post by kzinti »

Replace:

Code: Select all

	module /boot/initrd.tar.xz
With:

Code: Select all

	module2 /boot/initrd.tar.xz
heat
Member
Member
Posts: 103
Joined: Sat Mar 28, 2015 11:23 am
Libera.chat IRC: heat

Re: No module information in multiboot2 tags

Post by heat »

kzinti wrote:Replace:

Code: Select all

	module /boot/initrd.tar.xz
With:

Code: Select all

	module2 /boot/initrd.tar.xz
Thanks!! It worked!

May I ask where you get all these commands? If I try to look in the Grub 2 documentation, it usually doesn't show or describe too much of multiboot commands ( and module ). It just shows linux stuff and freebsd stuff, etc.

Thanks,
If some of you people keep insisting on having backwards compatibitity with the stone age, we'll have stone tools forever.
My Hobby OS: https://github.com/heatd/Onyx
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: No module information in multiboot2 tags

Post by kzinti »

TheRussianFail wrote: May I ask where you get all these commands? If I try to look in the Grub 2 documentation, it usually doesn't show or describe too much of multiboot commands ( and module ). It just shows linux stuff and freebsd stuff, etc.
I couldn't find the commands either. I spent quite a few hours on it. That is until I decided to download the Grub source code and read it to figure this one out.

I still don't understand why Grub has the multiboot2/module2 commands. It should just look for both headers with the multiboot/module commands.
Post Reply