Grub2 multiboot

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
ashken
Posts: 6
Joined: Tue Aug 03, 2010 2:33 pm

Grub2 multiboot

Post by ashken »

I am trying to load a multiboot kernel using grub2 but i get the error message

Code: Select all

error: can't find command `multiboot`
error: you need to load the kernel first
here is the entry config

Code: Select all

menuentry "TEST OS" {
	set root='(hd0,0)'
	multiboot /kernel/kernel
        boot 
}
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: Grub2 multiboot

Post by BrightLight »

What filesystem/device are you using? What else is in your config file?
This was enough for me:

Code: Select all

menuentry "xOS" {
	multiboot /boot/xos.sys
	module /boot/initrd.img
}
EDIT: At least, it was enough for ISO9660. I didn't try my kernel on other boot devices.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
ashken
Posts: 6
Joined: Tue Aug 03, 2010 2:33 pm

Re: Grub2 multiboot

Post by ashken »

fat 32 ESP.
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: Grub2 multiboot

Post by BrightLight »

Did you at least try using the config I gave you? BTW, what is FAT32 ESP exactly? Is it a FAT32 HDD, USB stick, etc..?
You know your OS is advanced when you stop using the Intel programming guide as a reference.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Grub2 multiboot

Post by Combuster »

It's the EFI partition.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: Grub2 multiboot

Post by BrightLight »

Combuster wrote:It's the EFI partition.
Oh. Then perhaps someone other than myself can answer; as I don't have any experience with EFI.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
ashken
Posts: 6
Joined: Tue Aug 03, 2010 2:33 pm

Re: Grub2 multiboot

Post by ashken »

Apparently the grub2 efi loader i was using (compiled by someone else) did not include some modules so compiling grub2 with the required modules solves the issue.
Post Reply