Page 1 of 1
Does Grub need mlt boot header
Posted: Wed Feb 06, 2008 7:29 pm
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?
Re: Does Grub need mlt boot header
Posted: Wed Feb 06, 2008 8:09 pm
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
Re: Does Grub need mlt boot header
Posted: Wed Feb 06, 2008 8:09 pm
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
Posted: Thu Feb 07, 2008 6:38 am
by bloodhound23
So I can just write my kernel, link it, and have Grub load it without having to worry about a thing?
Posted: Thu Feb 07, 2008 7:38 am
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.
Re: Does Grub need mlt boot header
Posted: Thu Feb 07, 2008 7:52 am
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
Posted: Thu Feb 07, 2008 8:23 am
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.
Posted: Thu Feb 07, 2008 8:57 am
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.)
Posted: Thu Feb 07, 2008 9:03 am
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!
Posted: Thu Feb 07, 2008 9:23 am
by Solar