GRUB information required.

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
pranjas
Member
Member
Posts: 25
Joined: Sun Jan 16, 2011 9:18 pm

GRUB information required.

Post 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.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: GRUB information required.

Post by Brynet-Inc »

GRUB loads kernels in 32-bit protected mode.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: GRUB information required.

Post 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.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: GRUB information required.

Post by Tosi »

Try loading your kernel on an image with a simple filesystem like FAT12.
Post Reply