Page 1 of 1
Patching GRUB
Posted: Sun Mar 01, 2009 8:22 am
by neonek
Hi all!
How to patch GRUB Legacy to load 64bit ELF kernel but stay in Protected Mode so I can myself switch to Long Mode.
Is there any patch which does it or I need to do it myself ?
Regards,
Mark
Re: Patching GRUB
Posted: Sun Mar 01, 2009 9:18 am
by xenos
Have a look at
this thread. You don't have to patch GRUB to load 64 bit ELF files, if you include an a.out kludge in your kernel.
Also, you should look at
the wiki.
Re: Patching GRUB
Posted: Sun Mar 01, 2009 9:35 am
by neonek
But when I don't want to include a.out kludge in my kernel multiboot header ? What i need to change in GRUB sources to give it ability loading ELF64 executables without a.out kludge ?
Regards,
Mark
Re: Patching GRUB
Posted: Sun Mar 01, 2009 12:34 pm
by JohnnyTheDon
Well then you'll have to download the grub sources and find a patch or modify the elf loading code yourself. The wiki goes over the different methods of loading 64-bit kernels.
Re: Patching GRUB
Posted: Sun Mar 01, 2009 1:55 pm
by neonek
OK, done. I've patched GRUB using JamesM's pedigree GRUB AMD64 patch. If anybody will want my patch I can attach it.
Regards,
Mark
EDIT: DiffUtils and Patch works terribly on Vista.

Re: Patching GRUB
Posted: Sun Mar 01, 2009 4:33 pm
by Love4Boobies
neonek wrote:OK, done. I've patched GRUB using JamesM's pedigree GRUB AMD64 patch. If anybody will want my patch I can attach it.
Your patch? You just said it was JamesM's patch

Re: Patching GRUB
Posted: Sun Mar 01, 2009 6:08 pm
by 01000101
I believe he meant to say that he could share his "patched grub" (which probably implies and image of some sort).
If that is the case, I'd be interested in that.
Re: Patching GRUB
Posted: Sun Mar 01, 2009 6:31 pm
by Love4Boobies
The advantage of the kludge is that it's Multiboot compatible.