Dr. Dov Bulka wrote:
> I downloaded the sources and built a grub executable. The code has
> many references to ELF32 structures and, not surprisingly, I'm unable
> to load an OS image whose format is x86_64.
>
> The machine is running Linux 2.6.18-8.el5.
> Grub version is 0.97
>
Grub Legacy is abandonded project. We switched to grub2 now and code in
grub2 is more readable than in legacy
> "uname -a" tells me that this is an x86_64 architecture.
>
> Looking at the source code for "load_image" in stage2/boot.c I find
> code like:
>
>  /* ELF loading supported if multiboot, FreeBSD and NetBSD.  */
>   if ((type == KERNEL_TYPE_MULTIBOOT
>        || pu.elf->e_ident[EI_OSABI] == ELFOSABI_FREEBSD
>        || grub_strcmp (pu.elf->e_ident + EI_BRAND, "FreeBSD") == 0
>        || suggested_type == KERNEL_TYPE_NETBSD)
>       && len > sizeof (Elf32_Ehdr)
>       && BOOTABLE_I386_ELF ((*((Elf32_Ehdr *) buffer))))
>     {
>
> Which tells me that this code is meant for i386 (32-bit).
>
> What have I done wrong?
>
GRUB Legacy unlike GRUB2 supports only 32-bit *BSD
On i386 linux isn't loaded as ELF but as own image format (compressed
ELF with some startup code and own headers).

> Did I download an old version of Grub not capable of handling x86_64
> (64-bit)? Or...
> Did I "configure" it wrong? What am I missing?
>
> Thanks,
> Dov
>
> <http://www.DoveRealEstate.biz>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Bug-grub mailing list
> Bug-grub@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-grub
>   


-- 
Regards
Vladimir 'phcoder' Serbinenko
Personal git repository: http://repo.or.cz/w/grub2/phcoder.git 



_______________________________________________
Bug-grub mailing list
Bug-grub@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to