GRUB

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
Vladaz

GRUB

Post by Vladaz »

Hello again ;D
When I try to load my OS using GRUB, it says:

Error 13: Invalid or unsupported executable format

Does there has to be some code(multiboot header) in my kernel? If it does, what code does there has to be? I'm using NASM for my kernel.asm, and from kernel.asm I jump to C code(kernel.c).
And does my linker file(ld) will has to be changed as well?

Thanks :)
Vladaz

Re:GRUB

Post by Vladaz »

And there's one more question:
Can my compiled and linked kernel be kernel.bin, not ELF or anything else? Or is it better to use ELF or anything else?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:GRUB

Post by Solar »

Please read the Multiboot specification, then check the FAQ Wiki, especially the page "Bare Bones".
Every good solution is obvious once you've found it.
Warrior

Re:GRUB

Post by Warrior »

You are using an executable format not accepted by grub. Try the ELF format or a.out using the aout kludge.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:GRUB

Post by Candy »

Nelson wrote: You are using an executable format not accepted by grub. Try the ELF format or a.out using the aout kludge.
The point of the a.out kludge (or multiboot header) is that you can boot any file type, not just those known by whatever your boot loader is.
Post Reply