Page 1 of 1

Grub2 finally fixed for ELF64

Posted: Wed Mar 28, 2012 10:49 am
by AlfaOmega08
Well, I'm not a grub2 developer/mantainer/whatever, just a angry user (until now). Basically when loading an ELF64 with multiboot2 (probably multiboot too) grub2 just returned an error about some sections. So to load an ELF64 you had to put the an Address Tag and an Entry Point Tag, just how we did for the AOUT_KLUDGE in grub legacy. This wasn't working all the time too. :evil:

It has finally been fixed! You still won't find a release (the official stable version 1.99 do not include the fix), but you have to dowload the source code from bazaar. Just because I have some spare time now, I'll tell you what to do (you need some packages first):

Code: Select all

sudo apt-get install bison flex autogen
bzr branch http://bzr.savannah.gnu.org/r/grub/trunk/grub
cd grub
chmod +x autogen.sh
./autogen.sh
./configure
make all -j4
sudo make install
Then you should use

Code: Select all

grub-mkrescue --output=file.iso iso
to create your iso file (remember the grub.cfg in /boot/grub, and double check braces).

And that's it. You can now get rid of that ugly Address Tag :P

Hope you find this useful.

Re: Grub2 finally fixed for ELF64

Posted: Sat Apr 07, 2012 12:05 pm
by brain
This is great news :-) how long do you think till it appears in a stable release? Would simplify osdev on 64 bit a lot...

Re: Grub2 finally fixed for ELF64

Posted: Mon Apr 09, 2012 11:50 am
by Qeroq
Due to that bug I had switched to the multiboot 1 module of grub2, that happened to be able to read my ELF64 kernel binaries. Good to hear this bug has finally been fixed, I'm looking forward to give it a try after finishing the A level exams...