Grub2 load modules

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
HyperAssembler
Member
Member
Posts: 36
Joined: Thu Sep 04, 2014 5:24 pm
Location: !SIGSEGV

Grub2 load modules

Post by HyperAssembler »

Hi guys,

I am planning to use grub2 to load 64-bit kernel as a module and jump to it from 32-bit multiboot-complaint kernel.

My grub.cfg is

Code: Select all

menuentry "OS" {
	insmod kernel64
	multiboot kernel32.bin
}
(kernel64.mod is in /boot/grub/i386-pc/)
The problem is grub says "invalid arch-dependent elf magic" and I'm pretty sure it happens when I try to load kernel64 module(without insmod kernel64 it works well).

kernel64 and kernel32.bin are linked as a flat binary file.

So how do I solve the problem and are there any specific requirements on the format of grub2 modules?

Please note that : I tried to google it and google gave me all "reinstall grub2" garbage from ask ubuntu.

Thanks for you time!!
HyperAssembler
Member
Member
Posts: 36
Joined: Thu Sep 04, 2014 5:24 pm
Location: !SIGSEGV

Re: Grub2 load modules

Post by HyperAssembler »

OMG it's solved.

I am not supposed to use insmod :(
I should though use module
See:
http://forum.osdev.org/viewtopic.php?f= ... 85&start=0
Post Reply