Does Grub need mlt boot header

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
User avatar
bloodhound23
Member
Member
Posts: 115
Joined: Wed Jan 23, 2008 7:13 pm
Contact:

Does Grub need mlt boot header

Post by bloodhound23 »

Do I need my OS do have the multiboot header to have it load it? Also, Grub loads 32bit OSs, how would I use it if I need to load a 64 bit OS?
I thought I wasn't thinking, I thought wrong.
User avatar
Zenith
Member
Member
Posts: 224
Joined: Tue Apr 10, 2007 4:42 pm

Re: Does Grub need mlt boot header

Post by Zenith »

Q1. It's not really a requirement (lots of non-multiboot kernels can boot off grub, like Linux) - But using multiboot is great since its a step to using a unified boot standard which shouldn't change depending on the bootloader (though GRUB is one of the very few multiboot-compliant loaders out there).

Q2. As far as I know, GRUB can only make it into 32-bit mode. You have to get to long mode yourself.

Hope this helps,
Julian
User avatar
Assembler
Member
Member
Posts: 30
Joined: Fri Oct 27, 2006 5:26 am
Contact:

Re: Does Grub need mlt boot header

Post by Assembler »

bloodhound23 wrote:Do I need my OS do have the multiboot header to have it load it? Also, Grub loads 32bit OSs, how would I use it if I need to load a 64 bit OS?
Hi,

Ya, it's a must if you want grub to load your kernel, but AFAIK grub has the ability to load the Linux kernel without multiboot header, for Windows grub just does chain-loading (loads the boot loader of windows).

AFAIK grub only boots 32-bit kernel, so you have to write a 32-bit image first which is loaded by grub and in-turn it loads your 64-bit kernel. I'm not sure if there is other ways to do so.

Good Luck
Systems and Computer Engineering Researcher
"Do you pine for the nice days of Minix-1.1, when men were men and wrote their own device drivers?" -- Linus Torvalds
http://sce.carleton.ca/~maslan
User avatar
bloodhound23
Member
Member
Posts: 115
Joined: Wed Jan 23, 2008 7:13 pm
Contact:

Post by bloodhound23 »

So I can just write my kernel, link it, and have Grub load it without having to worry about a thing?
I thought I wasn't thinking, I thought wrong.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

It depends what you mean by "worry about a thing". As long as you have your multiboot header set up and the kernel linked to load at 1MB, you'll be fine.

GRUB does *not* load files with a non multiboot header unless they are a recognised, hardcoded OS like linux.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Does Grub need mlt boot header

Post by jal »

karekare0 wrote:(though GRUB is one of the very few multiboot-compliant loaders out there).
And even not that compliant anyway (no VESA information, for example).


JAL
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

JamesM wrote:GRUB does *not* load files with a non multiboot header unless they are a recognised, hardcoded OS like linux.
Erm... not quite correct. GRUB works just fine as a chainloader, too.
Every good solution is obvious once you've found it.
User avatar
binutils
Member
Member
Posts: 214
Joined: Thu Apr 05, 2007 6:07 am

Post by binutils »

problem is .eh_frame in x86-64, it preserve it unlike x86.
objcopy --only-keep-debug seem fix it partly

http://www.x86-64.org/documentation/abi-0.99.pdf

--
AISB: lilo has no problem with 64 bit, grub2 still so far(1.96 doesn't work atm.)
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Solar wrote:
JamesM wrote:GRUB does *not* load files with a non multiboot header unless they are a recognised, hardcoded OS like linux.
Erm... not quite correct. GRUB works just fine as a chainloader, too.
Damn! Sorry Solar, I knew that, I was intending to add it to the end of my post with an "or" clause but got sidetracked, forgot and hit submit! :)
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

8)
Every good solution is obvious once you've found it.
Post Reply