Page 1 of 1

Grub2 multiboot

Posted: Thu Jul 07, 2016 7:53 pm
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 
}

Re: Grub2 multiboot

Posted: Thu Jul 07, 2016 9:15 pm
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.

Re: Grub2 multiboot

Posted: Fri Jul 08, 2016 1:53 am
by ashken
fat 32 ESP.

Re: Grub2 multiboot

Posted: Fri Jul 08, 2016 2:16 am
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..?

Re: Grub2 multiboot

Posted: Fri Jul 08, 2016 2:55 am
by Combuster
It's the EFI partition.

Re: Grub2 multiboot

Posted: Fri Jul 08, 2016 9:57 am
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.

Re: Grub2 multiboot

Posted: Sun Jul 10, 2016 5:06 am
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.