Page 1 of 1

GRUB information required.

Posted: Sun Jan 16, 2011 9:27 pm
by pranjas
Hi,

I was trying to load a kernel in a flat binary image which is multiboot complaint. The GRUB manual says that it being a multiboot compliant boot loader should be able to load a kernel either in ELF format or having the multiboot header.
I set bit 16, and filled in the required offsets using the linker script for the addresses needed in offsets 12-24.
I'm not able to load the kernel though. Is it that i need it to be in elf format?

Secondly, i don't have a file system yet so i'm specifying the kernel (hd0)+10 (is it correct?) and it says executable format not recognized. The executable is only 4KB in size so i'm loading 5Kbs i think with this command for the kernel right?

Any help guys please... i'm so desperate now can't find this information and wasted almost 3 days trying to fix this!

Thanks for reading this.

Re: GRUB information required.

Posted: Sun Jan 16, 2011 9:51 pm
by Brynet-Inc
GRUB loads kernels in 32-bit protected mode.

Re: GRUB information required.

Posted: Mon Jan 17, 2011 1:09 am
by xenos
It would be helpful if you could post your kernel source and the steps you perform to compile and link your kernel.

There's also a tool named mbchk coming with GRUB which you can use to check whether your kernel is Multiboot compliant.

Re: GRUB information required.

Posted: Mon Jan 17, 2011 2:26 am
by Tosi
Try loading your kernel on an image with a simple filesystem like FAT12.