EFI Boot on MacPro
I'm trying to get grub2 working on a Mac Pro using pure EFI.
So, I've mucked around a bit and grub is loading. I can have it load the linux image as well, but it freezes soon after.
Output is:
Booting 'Gentoo'
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]
Video mode: 180x1050-32@0
Video frame buffer: f0000000
-- Then it freezes --
I seeded a bunch of grub_printf statements to see where it dies, and it seems like it calls grub_machine_fini() (grub_loader_noreturn) is set to 1. However, it doesn't seem to get back to grub_cmd_boot, which is calling grub_loader_boot.
Anybody know what this is doing?
I've heard that people have successfully gotten non rEFItted makes to boot Linux, can anybody confirm this?
I compiled the grub2 stuff with "./configure --with-platform=efi --target=i386", this is grub trunk.
Signature · 1 line
~Ziling Zhao
Hi,
The kernel vesion may be the bug there, I have found grub.efi needs 2.6.26 or later, configured with EFI enabled, else the result is similar to yours.
I have had a grub.efi test package built from vesion 1913, running in ubuntuforums.com (apple intel) for a while, a number of people tried it.
grub.efi it would load and run for Apple MacBook2,1, Apple mini2,1 MacBook pro 2,2 or earlier , i.e. none of the current Apple MacBooks, but no
reports for Apple xserver, Imac or Mac Pro.
It is therefore very interesting that grub.efi loads and runs on the Mac Pro, I would like to know what your the Model version is.
peter cros
Quoted 42 lines · Ziling Zhao
I'm trying to get grub2 working on a Mac Pro using pure EFI.
So, I've mucked around a bit and grub is loading. I can have it load the linux image as well, but it freezes soon after.
Output is:
Booting 'Gentoo'
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]Video mode: 180x1050-32@0
Video frame buffer:f0000000-- Then it freezes --
I seeded a bunch of
grub_printfstatements to see where it dies, and it seems like it callsgrub_machine_fini()(grub_loader_noreturn) is set to 1. However, it doesn't seem to get back togrub_cmd_boot, which is callinggrub_loader_boot.Anybody know what this is doing?
I've heard that people have successfully gotten non rEFItted makes to boot Linux, can anybody confirm this?
I compiled the grub2 stuff with "./configure --with-platform=efi --target=i386", this is grub trunk.
--
~Ziling Zhao_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 5 lines · peter cros
Hi,
The kernel vesion may be the bug there, I have found grub.efi needs 2.6.26 or later, configured with EFI enabled, else the result is similar to yours.
Quoted 7 lines
I have had a grub.efi test package built from vesion 1913, running in ubuntuforums.com (apple intel) for a while, a number of people tried it.
grub.efi it would load and run for Apple MacBook2,1, Apple mini2,1 MacBook pro 2,2 or earlier , i.e. none of the current Apple MacBooks, but no
reports for Apple xserver, Imac or Mac Pro.
Later models have switched to 64-bit firmware, you need to use x86_64-efi version of grub2.
Signature · 1 line
Bean
Quoted 10 lines · On Tuesday 06 January 2009 21:14:48 Bean wrote:
Quoted 9 lines · peter cros
Hi,
The kernel vesion may be the bug there, I have found grub.efi needs 2.6.26 or later, configured with EFI enabled, else the result is similar to yours.
I have had a grub.efi test package built from vesion 1913, running in ubuntuforums.com (apple intel) for a while, a number of people tried it.
Quoted 6 lines
Quoted 3 lines
grub.efi it would load and run for Apple MacBook2,1, Apple mini2,1 MacBook pro 2,2 or earlier , i.e. none of the current Apple MacBooks, but
no reports for Apple xserver, Imac or Mac Pro.Later models have switched to 64-bit firmware, you need to use x86_64-efi version of grub2.
Which models switched to 64bit firmware? Form the looks of it, all of them are still using EFI 1.x, does Grub2 support EFI 1.x with x86_64?
I believe the kernel version that I am running is 2.6.27.
I'll try again with the x86_64 version of Grub2 tomorrow.
~Ziling Zhao
Quoted 18 lines · Ziling Zhao
Quoted 10 lines · On Tuesday 06 January 2009 21:14:48 Bean wrote:
Quoted 9 lines · peter cros
Hi,
The kernel vesion may be the bug there, I have found grub.efi needs 2.6.26 or later, configured with EFI enabled, else the result is similar to yours.
I have had a grub.efi test package built from vesion 1913, running in ubuntuforums.com (apple intel) for a while, a number of people tried it.
Quoted 6 lines
Quoted 3 lines
grub.efi it would load and run for Apple MacBook2,1, Apple mini2,1 MacBook pro 2,2 or earlier , i.e. none of the current Apple MacBooks, but
no reports for Apple xserver, Imac or Mac Pro.Later models have switched to 64-bit firmware, you need to use x86_64-efi version of grub2.
Quoted 6 lines
Which models switched to 64bit firmware? Form the looks of it, all of them are still using EFI 1.x, does Grub2 support EFI 1.x with
x86_64?I believe the kernel version that I am running is 2.6.27.
I'll try again with the
x86_64version of Grub2 tomorrow.
Hi,
The new ""Santa Rosa" generation of macbook is 64-bit. Although I double that it's the problem. If the firmware doesn't match, you can't load grub2 at all.
Oh btw, you shouldn't load 64-bit linux kernel in 32-bit firmware, and vice verse.
Your problem could be caused by 2.6.27. I only test 2.6.26, perhaps you can try that and see how it goes.
Signature · 1 line
Bean
I am using ubuntu 810, kernel 2.6.27 no problem with grub.efi i386 MacBook2,1.
Quoted 37 lines · Ziling Zhao
Quoted 5 lines · On Tuesday 06 January 2009 21:14:48 Bean wrote:
Quoted 4 lines · peter cros
Hi,
The kernel vesion may be the bug there, I have found grub.efi needs 2.6.26 or later, configured with EFI enabled, else the result is
similar
Quoted 4 lines
Quoted 4 lines
to yours.
I have had a grub.efi test package built from vesion 1913, running in ubuntuforums.com (apple intel) for a while, a number of people tried
it.
Quoted 3 lines
Quoted 3 lines
grub.efi it would load and run for Apple MacBook2,1, Apple mini2,1 MacBook pro 2,2 or earlier , i.e. none of the current Apple MacBooks,
but
Quoted 4 lines
Quoted 1 line
no reports for Apple xserver, Imac or Mac Pro.
Later models have switched to 64-bit firmware, you need to use x86_64-efi version of grub2.
Which models switched to 64bit firmware? Form the looks of it, all of them are
still using EFI 1.x, does Grub2 support EFI 1.x withx86_64?I believe the kernel version that I am running is 2.6.27.
I'll try again with the
x86_64version of Grub2 tomorrow.~Ziling Zhao
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 25 lines · Ziling Zhao
Quoted 5 lines · On Tuesday 06 January 2009 21:14:48 Bean wrote:
Quoted 4 lines · peter cros
Hi,
The kernel vesion may be the bug there, I have found grub.efi needs 2.6.26 or later, configured with EFI enabled, else the result is
similar
Quoted 4 lines
Quoted 4 lines
to yours.
I have had a grub.efi test package built from vesion 1913, running in ubuntuforums.com (apple intel) for a while, a number of people tried
it.
Quoted 3 lines
Quoted 3 lines
grub.efi it would load and run for Apple MacBook2,1, Apple mini2,1 MacBook pro 2,2 or earlier , i.e. none of the current Apple MacBooks,
but
Quoted 4 lines
Quoted 1 line
no reports for Apple xserver, Imac or Mac Pro.
Later models have switched to 64-bit firmware, you need to use x86_64-efi version of grub2.
Which models switched to 64bit firmware? Form the looks of it, all of them are
still using EFI 1.x, does Grub2 support EFI 1.x withx86_64?
Quoted 6 lines
I believe the kernel version that I am running is 2.6.27.
I'll try again with the
x86_64version of Grub2 tomorrow.~Ziling Zhao
I haven't been able to get the x86_64 version of grub2 to boot yet. However, I did try a x86 kernel vs. the x86_64 one i was using before, and it stalled at the same point that the x86_64 kernel.
It is, still a 2.6.27 kernel though, I still need to test with 2.6.26 and see what happens.
Is there a .config I can look at?
Signature · 1 line
~Ziling Zhao
Quoted 39 lines · Bean
Quoted 3 lines · peter cros
Hi,
The kernel vesion may be the bug there, I have found grub.efi needs
2.6.26
Quoted 1 line
or later, configured with EFI enabled, else the result is similar to
yours.
Quoted 6 lines
I have had a grub.efi test package built from vesion 1913, running in ubuntuforums.com (apple intel) for a while, a number of people tried it.
grub.efi it would load and run for Apple MacBook2,1, Apple mini2,1 MacBook pro 2,2 or earlier , i.e. none of the current Apple MacBooks, but
no
Quoted 2 lines
reports for Apple xserver, Imac or Mac Pro.
Later models have switched to 64-bit firmware, you need to use x86_64-efi version of grub2.
--
BeanThanks, I tried a --target =x86_64, using multilib, compiled on the MacBook2,1 in i386, built OK, but could not run it on the macbook2,1. (I dont have a later model )
So does that mean I need to build another package for
x86_64and put that up for test on later version Mac, quite a few people interested, especially for external drive booting.peter cros
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 3 lines · On Wednesday 07 January 2009 06:54:47 peter cros wrote:
grub.efi it would load and run for Apple MacBook2,1, Apple mini2,1 MacBook pro 2,2 or earlier , i.e. none of the current Apple MacBooks, but
no reports for Apple xserver, Imac or Mac Pro.
I have a clean xserve 8-core. I havent installed any service on it, yet. So i can test grub2, x86_64-efi etc.
I tried to use steps at http://grub.enbug.org/TestingOnEFI address. But xserve doesnt accept my usb stick as a bootable media. (at startup, i hold option key, there is only my harddisks)
If you tell me more way about testing grub2 on efi, i can do these tests.
Türker Sezer
Quoted 5 lines · Türker SEZER
Quoted 3 lines · On Wednesday 07 January 2009 06:54:47 peter cros wrote:
grub.efi it would load and run for Apple MacBook2,1, Apple mini2,1 MacBook pro 2,2 or earlier , i.e. none of the current Apple MacBooks, but
no reports for Apple xserver, Imac or Mac Pro.
Quoted 8 lines
I have a clean xserve 8-core. I havent installed any service on it, yet. So i can test grub2, x86_64-efi etc.
I tried to use steps at http://grub.enbug.org/TestingOnEFI address. But xserve doesnt accept my usb stick as a bootable media. (at startup, i hold option key, there is only my harddisks)
If you tell me more way about testing grub2 on efi, i can do these tests.
Hi,
You can use rEFIt as the primary boot loader, and place grub.efi at directory like /EFI/grub/grub.efi. rEFIt will find it and show a menu item to load grub2.
Signature · 1 line
Bean
If not using refit, but using 'bless' from macosx - then grub.efi needs to be in an hfsplus partition on the usb stick.
The built grub efi i386 tarball I use for macbook2,1 is on the ubuntu forum site, should suffice to show if you need x86_64.
grub2 EFI boot loader
http://ubuntuforums.org/showthread.php?t=995704
Quoted 25 lines · Türker SEZER
Quoted 3 lines · On Wednesday 07 January 2009 06:54:47 peter cros wrote:
grub.efi it would load and run for Apple MacBook2,1, Apple mini2,1 MacBook pro 2,2 or earlier , i.e. none of the current Apple MacBooks, but
no reports for Apple xserver, Imac or Mac Pro.I have a clean xserve 8-core. I havent installed any service on it, yet. So i
can test grub2, x86_64-efi etc.I tried to use steps at http://grub.enbug.org/TestingOnEFI address. But xserve
doesnt accept my usb stick as a bootable media. (at startup, i hold option key, there is only my harddisks)If you tell me more way about testing grub2 on efi, i can do these tests.
Türker Sezer
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 2 lines · On Thursday 08 January 2009 02:46:55 peter cros wrote:
If not using refit, but using 'bless' from macosx - then grub.efi needs to be in an hfsplus partition on the usb stick.
Hmm, thats insteresting point. I used bless but didnt create hfsplus partition. I will try it tomorrow.
Türker
Quoted 6 lines · On Thursday 08 January 2009 03:52:09 Türker SEZER wrote:
Quoted 2 lines · On Thursday 08 January 2009 02:46:55 peter cros wrote:
If not using refit, but using 'bless' from macosx - then grub.efi needs to be in an hfsplus partition on the usb stick.
Hmm, thats insteresting point. I used bless but didnt create hfsplus partition. I will try it tomorrow.
I tried this now. Formatted usb with disk utility and then bless it again. It shows "EFI Boot" at startup, but when i choose this option, it opens OS X. There is no grub menu, different screen etc. It boots with normal way.
I added a grub.cfg for test. I add distro files to usb and create cfg file as below[1].
note: There is 2 harddisk on machine (at slot1 and slot2). They are mirrored with soft-raid.
Türker
[1]: grub.cfg
----------------
timeout=10
#menuentry "MacOSX" {
# # Set the root device for Mac OS X's loader. # root=(hd0,0) # # Load the loader. # chainloader /usr/standalone/i386/boot.efi
#}
menuentry "GNU/Linux" {
set root=(hd2,0)
#search --set /boot/vmlinuz
# Load the kernel and initrd.
linux /boot/2.6.25.20-114 root=/dev/sdc1 gpt
initrd /boot/initramfs-2.6.25.20-114
}
--EOF--
Quoted 42 lines · Türker SEZER
Quoted 6 lines · On Thursday 08 January 2009 03:52:09 Türker SEZER wrote:
Quoted 2 lines · On Thursday 08 January 2009 02:46:55 peter cros wrote:
If not using refit, but using 'bless' from macosx - then grub.efi needs to be in an hfsplus partition on the usb stick.
Hmm, thats insteresting point. I used bless but didnt create hfsplus partition. I will try it tomorrow.
I tried this now. Formatted usb with disk utility and then bless it again. It
shows "EFI Boot" at startup, but when i choose this option, it opens OS X. There is no grub menu, different screen etc. It boots with normal way.I added a grub.cfg for test. I add distro files to usb and create cfg file as
below[1].note: There is 2 harddisk on machine (at slot1 and slot2). They are mirrored
with soft-raid.Türker
[1]: grub.cfg
----------------
timeout=10
#menuentry "MacOSX" {# # Set the root device for Mac OS X's loader. # root=(hd0,0) # # Load the loader. # chainloader /usr/standalone/i386/boot.efi#}
menuentry "GNU/Linux" {
set root=(hd2,0)
#search --set/boot/vmlinuz
# Load the kernel and initrd.
linux/boot/2.6.25.20-114root=/dev/sdc1 gpt
initrd/boot/initramfs-2.6.25.20-114
}
--EOF--
Quoted 5 lines
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
I haven't had much success with testing directly on the XServe that I have here, but I was able to get as far as getting grub to show up. However, it stalls after:
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]
Video mode: 180x1050-32@0
Video frame buffer: f0000000
Just as far as I can get the Mac Pro. I don't exactly have a macbook to test on, so I don't know if I'm just doing something wrong, or the Mac Pro/XServes are just different. Of course, using refit works on the mac pros, but applying the same process to the XServes didn't work.
I've attached my .config just in case someone wants to look it over, I believe I have all the EFI stuff in there.
Signature · 1 line
~Ziling Zhao
Quoted 8 lines · Ziling Zhao
I haven't had much success with testing directly on the XServe that I have here, but I was able to get as far as getting grub to show up. However, it stalls after:
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]Video mode: 180x1050-32@0
Video frame buffer:f0000000
Quoted 7 lines
Just as far as I can get the Mac Pro. I don't exactly have a macbook to test on, so I don't know if I'm just doing something wrong, or the Mac Pro/XServes are just different. Of course, using refit works on the mac pros, but applying the same process to the XServes didn't work.
I've attached my .config just in case someone wants to look it over, I believe I have all the EFI stuff in there.
Hi,
The video mode line doesn't seem to be valid, so I guess xserver is indeed different.
Fedora also have efi loader, which is basically some hacking with grub legacy. Perhaps you can try that and see if it works.
Signature · 1 line
Bean
Quoted 17 lines · On Thursday 08 January 2009 22:36:27 Bean wrote:
Quoted 8 lines · Ziling Zhao
I haven't had much success with testing directly on the XServe that I have here, but I was able to get as far as getting grub to show up. However, it stalls after:
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]Video mode: 180x1050-32@0
Video frame buffer:f0000000Quoted 7 lines
Just as far as I can get the Mac Pro. I don't exactly have a macbook to test on, so I don't know if I'm just doing something wrong, or the Mac Pro/XServes are just different. Of course, using refit works on the mac pros, but applying the same process to the XServes didn't work.
I've attached my .config just in case someone wants to look it over, I believe I have all the EFI stuff in there.
Quoted 7 lines
Hi,
The video mode line doesn't seem to be valid, so I guess xserver is indeed different.
Fedora also have efi loader, which is basically some hacking with grub legacy. Perhaps you can try that and see if it works.
Sorry, that output is actually for the macpro. I don't have the Xserve's output.
~Ziling Zhao
It all seems a bit strange,
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]
Size=50 MB - very big kernel if it is true.
Quoted 37 lines · Bean
Quoted 1 line · Ziling Zhao
I haven't had much success with testing directly on the XServe that I
have
Quoted 1 line
here, but I was able to get as far as getting grub to show up. However,
it
Quoted 7 lines
stalls after:
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]Video mode: 180x1050-32@0
Video frame buffer:f0000000Just as far as I can get the Mac Pro. I don't exactly have a macbook to
test
Quoted 6 lines
on, so I don't know if I'm just doing something wrong, or the Mac Pro/XServes are just different. Of course, using refit works on the mac pros, but applying the same process to the XServes didn't work.
I've attached my .config just in case someone wants to look it over, I believe I have all the EFI stuff in there.
Hi,
The video mode line doesn't seem to be valid, so I guess xserver is indeed different.
Fedora also have efi loader, which is basically some hacking with grub legacy. Perhaps you can try that and see if it works.
--
Bean_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 46 lines · peter cros
It all seems a bit strange,
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]
Size=50 MB - very big kernel if it is true.Quoted 28 lines · Bean
Quoted 1 line · Ziling Zhao
I haven't had much success with testing directly on the XServe that I
have
Quoted 1 line
here, but I was able to get as far as getting grub to show up. However,
it
Quoted 7 lines
stalls after:
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]Video mode: 180x1050-32@0
Video frame buffer:f0000000Just as far as I can get the Mac Pro. I don't exactly have a macbook to
test
Quoted 6 lines
on, so I don't know if I'm just doing something wrong, or the Mac Pro/XServes are just different. Of course, using refit works on the mac pros, but applying the same process to the XServes didn't work.
I've attached my .config just in case someone wants to look it over, I believe I have all the EFI stuff in there.
Hi,
The video mode line doesn't seem to be valid, so I guess xserver is indeed different.
Fedora also have efi loader, which is basically some hacking with grub legacy. Perhaps you can try that and see if it works.
Quoted 9 lines
--
Bean_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 6 lines
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
I've just checked the kernel's size, and nothing is 50MB.
After fiddling, now it says. (for x86 kernel) 3.5MB
[Linux-bzImage, setup=0x3000, size=0x367f70]
Video mode: 1280x1024-32@0
Video frame buffer: f0000000
The x86_64 kernel has:
[Linux-bzImage, setup=0x2c00, size=0x2ff470]
Video mode: 1280x1024-32@0
Video frame buffer: f0000000
Signature · 1 line
~Ziling Zhao
Those numbers look better.
Hanging at that stage can be due to incorrect boot command - trying to boot a kernel which requires an initrd. (not the only possibility).
In my case I use -
linux /vmlinuz root=/dev/sda3 video=efifb
initrd /initrd.img
If I try to boot without initrd I get your result.
Quoted 80 lines · Ziling Zhao
Quoted 47 lines · peter cros
It all seems a bit strange,
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]
Size=50 MB - very big kernel if it is true.Quoted 29 lines · Bean
Quoted 1 line · Ziling Zhao
I haven't had much success with testing directly on the XServe that I
have
Quoted 1 line
here, but I was able to get as far as getting grub to show up. However,
it
Quoted 7 lines
stalls after:
[Linux-bzImage, setup=0x2c00, size=0x2ff4701]Video mode: 180x1050-32@0
Video frame buffer:f0000000Just as far as I can get the Mac Pro. I don't exactly have a macbook to
test
Quoted 6 lines
on, so I don't know if I'm just doing something wrong, or the Mac Pro/XServes are just different. Of course, using refit works on the mac pros, but applying the same process to the XServes didn't work.
I've attached my .config just in case someone wants to look it over, I believe I have all the EFI stuff in there.
Hi,
The video mode line doesn't seem to be valid, so I guess xserver is indeed different.
Fedora also have efi loader, which is basically some hacking with grub legacy. Perhaps you can try that and see if it works.
Quoted 9 lines
--
Bean_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-develQuoted 6 lines
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-develI've just checked the kernel's size, and nothing is 50MB.
After fiddling, now it says. (for x86 kernel) 3.5MB
[Linux-bzImage, setup=0x3000, size=0x367f70]Video mode: 1280x1024-32@0
Video frame buffer:f0000000The
x86_64kernel has:[Linux-bzImage, setup=0x2c00, size=0x2ff470]Video mode: 1280x1024-32@0
Video frame buffer:f0000000--
~Ziling Zhao_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 12 lines · Türker SEZER
Quoted 6 lines · On Thursday 08 January 2009 03:52:09 Türker SEZER wrote:
Quoted 2 lines · On Thursday 08 January 2009 02:46:55 peter cros wrote:
If not using refit, but using 'bless' from macosx - then grub.efi needs to be in an hfsplus partition on the usb stick.
Hmm, thats insteresting point. I used bless but didnt create hfsplus partition. I will try it tomorrow.
I tried this now. Formatted usb with disk utility and then bless it again. It shows "EFI Boot" at startup, but when i choose this option, it opens OS X. There is no grub menu, different screen etc. It boots with normal way.
Quoted 5 lines
I added a grub.cfg for test. I add distro files to usb and create cfg file as below[1].
note: There is 2 harddisk on machine (at slot1 and slot2). They are mirrored with soft-raid.
Hi,
If the grub menu doesn't show at all, it's probably because efi firmware is 64-bit, perhaps you can try the x86_64-efi version.
Signature · 1 line
Bean
Quoted 2 lines · On Friday 09 January 2009 08:39:49 Bean wrote:
If the grub menu doesn't show at all, it's probably because efi firmware is 64-bit, perhaps you can try the x86_64-efi version.
I couldnt compile grub2 with x86_64-efi parameter. It gives error like 'configure: error: platform "x86_64-efi" is not supported for target CPU "i386"' or 'CPU "x86_64"' etc.
I tried to use
./configure --with-platform=x86_64-efi and ./configure --with-platform=x86_64-efi --target=x86_64-apple
I have
32 bit Pardus Linux installed on Intel Core 2 Duo T 5750, 32 bit Pardus Linux installed on Intel Pentium Dual CPU E2180, 64 bit Fedora Linux installed on AMD Athlon 64 Proccessor 3000+ and 64 bit MacOS X Server Leopard installed on 8-core Intel Xserve.
Could you tell me how can i compile grub2 as usable and which machine is suitable to compile grub2 with these parameters.
I wanna test grub2 on 64bit efi firmware and give you feedback about it. May be i can also help developing of grub with this work.
Türker
Quoted 21 lines · Türker SEZER
Quoted 2 lines · On Friday 09 January 2009 08:39:49 Bean wrote:
If the grub menu doesn't show at all, it's probably because efi firmware is 64-bit, perhaps you can try the x86_64-efi version.
I couldnt compile grub2 with x86_64-efi parameter. It gives error like 'configure: error: platform "x86_64-efi" is not supported for target CPU "i386"' or 'CPU "
x86_64"' etc.I tried to use
./configure --with-platform=x86_64-efi and ./configure --with-platform=x86_64-efi --target=x86_64-apple
I have
32 bit Pardus Linux installed on Intel Core 2 Duo T 5750, 32 bit Pardus Linux installed on Intel Pentium Dual CPU E2180, 64 bit Fedora Linux installed on AMD Athlon 64 Proccessor 3000+ and 64 bit MacOS X Server Leopard installed on 8-core Intel Xserve.
Quoted 6 lines
Could you tell me how can i compile grub2 as usable and which machine is suitable to compile grub2 with these parameters.
I wanna test grub2 on 64bit efi firmware and give you feedback about it. May be i can also help developing of grub with this work.
Hi,
You can find more information in the following wiki page:
http://grub.enbug.org/TestingOnMacbook
Signature · 1 line
Bean
Successfully booting linux 2.6.27 on MacBook2,1 - details.
i386 grub.efi, SVN version 1913.
ubuntu 810, kernel version 2.6.27-7-generic (installed today).
2244272 2008-10-24 19:29 vmlinuz-2.6.27-7-generic 8177710 2009-01-08 16:48 initrd.img-2.6.27-7-generic
grub.cfg - (sym links, /vmlinuz-> /initrd.img-> )
menuentry "search-vmlinuz root=sda3" {
search --set /vmlinuz linux /vmlinuz root=/dev/sda3 video=efifb
initrd /initrd.img
}
disabled agp modules using blacklist (intel_agp, agpgart) and xorg.conf change to Driver "fbdev". (Also possible to get to X gui desktop without disabling agp, but with no virtual console display).
Can load and start 64bit kernel and initrd, but initialization hangs after initscript starts, (somwhere round acpi steps?), before mounting root, (ubuntu amd64 package).
configfile extracts - (generic ubuntuconfig)
EFI (same as 2.6.26)CONFIG_EFI=yCONFIG_EFI_PARTITION=yCONFIG_EFI_VARS=yCONFIG_FB_EFI=y
AGPCONFIG_AGP=mCONFIG_AGP_ALI=mCONFIG_AGP_AMD=mCONFIG_AGP_AMD64=mCONFIG_AGP_ATI=mCONFIG_AGP_EFFICEON=mCONFIG_AGP_INTEL=mCONFIG_AGP_NVIDIA=mCONFIG_AGP_SIS=mCONFIG_AGP_SWORKS=mCONFIG_AGP_VIA=m
Attached full /boot/config-2.6.27-7-generic
Will test --with-platfrom=efi --target=x86_64 soon when I have the later version Mac.
peter cros
iMac8,1 - grub.efi x86_64 hangs.
built and run on the imac81 --with-platfrom=efi --target=x86_64 version 1913 and 1940 (current).
Host ubuntu 810 amd64 kernel Linux im64 2.6.27-9-server #1 SMP Thu Nov 20 22:56:07 UTC 2008 x86_64 GNU/Linux
grub.efi appears to be accepted by the firmware (started), but hangs immediately without any message.
Tried with macosx bless, and with rEFIt, on HD and external usb.
This differs from the 64/32 mismatch behaviour with the refit message
'unsupported while loading grub.efi') or the apple boot default to MacOSX.
The x86_64 reult is different - bug in the start up?
I will try to get some debug info.
typo --with-platform=efi
Quoted 19 lines · peter cros
iMac8,1 - grub.efi
x86_64hangs.built and run on the imac81 --with-platfrom=efi --target=x86_64 version 1913 and 1940 (current).
Host ubuntu 810 amd64 kernel Linux im64 2.6.27-9-server #1 SMP Thu Nov 20 22:56:07 UTC 2008
x86_64GNU/Linuxgrub.efi appears to be accepted by the firmware (started), but hangs immediately without any message.
Tried with macosx bless, and with rEFIt, on HD and external usb.This differs from the 64/32 mismatch behaviour with the refit message
'unsupported while loading grub.efi') or the apple boot default to MacOSX.The
x86_64reult is different - bug in the start up?I will try to get some debug info.
Quoted 12 lines · peter cros
iMac8,1 - grub.efi
x86_64hangs.built and run on the imac81 --with-platfrom=efi --target=x86_64 version 1913 and 1940 (current).
Host ubuntu 810 amd64 kernel Linux im64 2.6.27-9-server #1 SMP Thu Nov 20 22:56:07 UTC 2008
x86_64GNU/Linuxgrub.efi appears to be accepted by the firmware (started), but hangs immediately without any message.
Tried with macosx bless, and with rEFIt, on HD and external usb.
Quoted 6 lines
This differs from the 64/32 mismatch behaviour with the refit message
'unsupported while loading grub.efi') or the apple boot default to MacOSX.The
x86_64reult is different - bug in the start up?I will try to get some debug info.
Hi,
I only test the x86_64 version in macbook, which works nicely. Perhaps you can add some debug code in kern/main.c
voidgrub_main (void)
{
/* First of all, initialize the machine. */
grub_machine_init ();
+ grub_env_set ("debug", "all");
+ grub_printf ("init\n");
/* Hello. */
grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
grub_printf ("Welcome to GRUB!\n\n");
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);Also, the tsc code may has some effect, remove grub_tsc_init in kern/i366/efi/init.c:
voidgrub_machine_init (void)
{
grub_efi_init ();
-grub_tsc_init ();
}
Signature · 1 line
Bean
It is here - (return checked in refit efi shell and gui) Can't go any further until that is fixed.
kern/x86_64/efi/startup.S
-----------------------
This hangs -
codestart:
movq %rcx, EXT_C(grub_efi_image_handle)
movq %rdx, EXT_C(grub_efi_system_table)
+ret
call EXT_C(grub_main)
ret
-------------------------
This returns -
codestart:
+ret
movq %rcx, EXT_C(grub_efi_image_handle)
movq %rdx, EXT_C(grub_efi_system_table)
call EXT_C(grub_main) ret
--------------------------
Would really like to see the solution for the imac8,1.
peter cros
Quoted 60 lines · Bean
Quoted 8 lines · peter cros
iMac8,1 - grub.efi
x86_64hangs.built and run on the imac81 --with-platfrom=efi --target=x86_64 version 1913 and 1940 (current).
Host ubuntu 810 amd64 kernel Linux im64 2.6.27-9-server #1 SMP Thu Nov 20 22:56:07 UTC 2008
x86_64GNU/LinuxQuoted 6 lines
grub.efi appears to be accepted by the firmware (started), but hangs immediately without any message.
Tried with macosx bless, and with rEFIt, on HD and external usb.This differs from the 64/32 mismatch behaviour with the refit message
'unsupported while loading grub.efi') or the apple boot default toMacOSX.
Quoted 4 lines
The
x86_64reult is different - bug in the start up?I will try to get some debug info.
Hi,
I only test the
x86_64version in macbook, which works nicely. Perhaps you can add some debug code inkern/main.cvoid
grub_main(void)
{
/* First of all, initialize the machine. */
grub_machine_init();+
grub_env_set("debug", "all");
+grub_printf("init\n");/* Hello. */
grub_setcolorstate(GRUB_TERM_COLOR_HIGHLIGHT);
grub_printf("Welcome to GRUB!\n\n");
grub_setcolorstate(GRUB_TERM_COLOR_STANDARD);Also, the tsc code may has some effect, remove
grub_tsc_initinkern/i366/efi/init.c:void
grub_machine_init(void)
{
grub_efi_init();
-grub_tsc_init ();
}--
Bean_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 20 lines · peter cros
It is here - (return checked in refit efi shell and gui) Can't go any further until that is fixed.
kern/x86_64/efi/startup.S
-----------------------This hangs -
codestart:
movq %rcx,EXT_C(grub_efi_image_handle)
movq %rdx,EXT_C(grub_efi_system_table)
+ret
callEXT_C(grub_main)
ret
-------------------------This returns -
codestart:
+ret
Quoted 7 lines
movq %rcx, EXT_C(grub_efi_image_handle) movq %rdx, EXT_C(grub_efi_system_table) call EXT_C(grub_main)ret
--------------------------Would really like to see the solution for the imac8,1.
Hi,
This is quite strange, it might be caused by the compiler. You can try my version of grub.efi:
http://grub4dos.sourceforge.net/grub.zip
Signature · 1 line
Bean
I tried your 64bit grub.efi, same result - hangs at start (on current imac8,1).
I wonder if you have tested on the current MacBook or MacBook Pro, perhaps Apple have made another change. Also I dont have any info on previous Imac models.
I was able to get a return via grub_main() only by excluding both of the movq lines in the code before the call. Either one hangs it.
Looks to be a problem with grub_efi_image_handle and grub_efi_system_table?
-------------------kern/x86_64/efi/startup.S
codestart:
call EXT_C(grub_main)
ret
- movq %rcx, EXT_C(grub_efi_image_handle) - movq %rdx, EXT_C(grub_efi_system_table)
-----------------kern/main.c
voidgrub_main (void)
{
return;
}
---------------------
Is there anything else I can try?
peter cros
Quoted 45 lines · Bean
Quoted 20 lines · peter cros
It is here - (return checked in refit efi shell and gui) Can't go any further until that is fixed.
kern/x86_64/efi/startup.S
-----------------------This hangs -
codestart:
movq %rcx,EXT_C(grub_efi_image_handle)
movq %rdx,EXT_C(grub_efi_system_table)
+ret
callEXT_C(grub_main)
ret
-------------------------This returns -
codestart:
+retQuoted 7 lines
movq %rcx, EXT_C(grub_efi_image_handle) movq %rdx, EXT_C(grub_efi_system_table) call EXT_C(grub_main)ret
--------------------------Would really like to see the solution for the imac8,1.
Hi,
This is quite strange, it might be caused by the compiler. You can try my version of grub.efi:
http://grub4dos.sourceforge.net/grub.zip
--
Bean_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 22 lines · peter cros
I tried your 64bit grub.efi, same result - hangs at start (on current imac8,1).
I wonder if you have tested on the current MacBook or MacBook Pro, perhaps Apple have made another change. Also I dont have any info on previous Imac models.I was able to get a return via
grub_main()only by excluding both of the movq lines in the code before the call. Either one hangs it.Looks to be a problem with
grub_efi_image_handleandgrub_efi_system_table?
-------------------kern/x86_64/efi/startup.Scodestart:
callEXT_C(grub_main)
ret(quoted diff) +0
-3- movq %rcx, EXT_C(grub_efi_image_handle) - movq %rdx, EXT_C(grub_efi_system_table) -----------------
kern/main.c
Quoted 8 lines
void
grub_main(void)
{
return;
}
---------------------Is there anything else I can try?
Hi,
I have tested it on my macbook (brought last year) and it works without issue. I don't know about later modals, but they shouldn't be too different. Anyway, this looks like a memory problem, perhaps you can define some global variable in startup.S and main.c, and test if it halts when writing to it from within the same file.
BTW, is refit working ok ?
Signature · 1 line
Bean
2009/1/8 peter cros <[email protected]>:
Quoted 11 lines
Successfully booting linux 2.6.27 on MacBook2,1 - details.
i386 grub.efi, SVN version 1913.
ubuntu 810, kernel version 2.6.27-7-generic (installed today).
2244272 2008-10-24 19:29 vmlinuz-2.6.27-7-generic 8177710 2009-01-08 16:48 initrd.img-2.6.27-7-genericgrub.cfg - (sym links, /vmlinuz-> /initrd.img-> )
menuentry "search-vmlinuz root=sda3" { search --set /vmlinuz
Quoted 8 lines
linux /vmlinuz root=/dev/sda3 video=efifb
initrd /initrd.img
}disabled agp modules using blacklist (
intel_agp, agpgart) and xorg.conf change to Driver "fbdev". (Also possible to get to X gui desktop without disabling agp, but with no virtual console display).
FWIW I can boot Linux 2.6.28 (32bit only, the CPU probably does not do 64bit) on a Mac mini.
I load grub directly without rEFIt. The vesa framebuffer has wrong colours and both imacfb and intelfb produce distorted image (or they did with some 2.6.27 kernel at least).
However, X works with AGP and DRM with the alien coloured console intact - it's possible to switch between X and the console without any immediately visible additional problems.
The X driver works as nicely as it does on any other hardware, at least I do not see any glitches.
Thanks
Michal