Patching GRUB

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
neonek
Member
Member
Posts: 38
Joined: Thu Aug 28, 2008 1:53 pm
Location: Białystok - Podlasie, Poland

Patching GRUB

Post 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
Please correct my English. If you'll find mistake please tell me about it so I can improve my English.
User avatar
xenos
Member
Member
Posts: 1118
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: Patching GRUB

Post 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.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
neonek
Member
Member
Posts: 38
Joined: Thu Aug 28, 2008 1:53 pm
Location: Białystok - Podlasie, Poland

Re: Patching GRUB

Post 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
Please correct my English. If you'll find mistake please tell me about it so I can improve my English.
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: Patching GRUB

Post 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.
neonek
Member
Member
Posts: 38
Joined: Thu Aug 28, 2008 1:53 pm
Location: Białystok - Podlasie, Poland

Re: Patching GRUB

Post 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. :cry: :evil:
Please correct my English. If you'll find mistake please tell me about it so I can improve my English.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Patching GRUB

Post 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 :roll:
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Patching GRUB

Post 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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Patching GRUB

Post by Love4Boobies »

The advantage of the kludge is that it's Multiboot compatible.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
Post Reply