grub.efi x86_64 on Apple 64bit efi models - status of testing
From:
Peter Cros
Subject:
grub.efi x86_64 on Apple 64bit efi models - status of testing
Date:
Mon, 9 Feb 2009 23:24:17 +1100
I have got to a standstill with this, some major stoppers found and could use some help to debug further. I hope someone can take a look at this please, its getting beyond my limited C code reading and hacking capabilities, but I do want to see grub.efi working on current Apple Intel Macs.
Apple Linux/OSX users can benefit from grub.efi major advantages over the Apple pc-bios emulation which cannot boot external drives and has other installation problems for Linux users. Apple Mac users multi-booting GNU/Linux and Mac OSX are a good testing ground for EFI booting. A number of people in the ubuntuforums have tested grub.efi x86 and x86_64 on Apple intel Macs from intel core2duo on. There have also been some recent reported problems posted on grub-devel list.
I have not seen anything for IA32/64 machines.
From early 2008, Macs have been using 64bit EFI, needing x86_64 grub.efi, and I have posted on ubuntuforums a full x86_64 grub.efi package with all modules and grub.cfg for people to try.
No one has been able to get x86_64 grub.efi to boot and run either Mac OSX (boot.efi) or ubuntu 810 2.6.27 kernels (configured for EFI). All this works well for x86 grub.efi on Intel Macs with the earlier 32 bit firmware.
-------------------------------
Three specific issues are stopping useful testing -
1. Mac models from imac8,1 early 2008 are unable to boot grub.efi 64bit when 4GB RAM is fitted. Dropping to 2GB RAM enables grub.efi to boot and display grub.cfg menu with fully functional command line. This leads to the next problems -
2. The grub.efi chainloader command fails to load /usr/standalone/i386/boot.efi, reporting ' error: cannot load image '
3. grub.efi successfully loads ubuntu x86 2.6.7-7 kernel ( or earlier debian 2.6.26 ) using command line or menuentry, but the boot fails.
After boot command, the boot screen goes to black and no further progress seen, except in one case some garbled video indicating possible boot but failure to init.
4. Finally, there was a problem getting ubuntu 810 amd64 to complete initialization after booting in earlier 32 bit grub.efi tests, and other issues with accelerated graphics and keyboard. - Not yet the issue here.
-------------------------
I got as far as locating the area in the grub2 code as shown in the attached diffs of commented files, and will continue to look throught the code, or can try any suggested debugging. I have some access to an Imac8,1 MacBook Pro 4,1 and a MacBook2,1.
( So far using set debug=all or selective, grub_printf(); grub_getkey(); asm volatile ("ret" : : ); )
But I am not a programmer and need help to go further. The x86 32 bit grub.efi functions very well on MacBook2,1 and other earlier 32 bit EFI Apples, but the later models need the x86_64 build, and at present it is not functional at all. The Apple firmware and EFI seems to need special treatment.
------------------------- Diffs - ( these are just grub2 rev 1972 commented 'pxwdebug' to show where I got to )