Jump to content

How to boot OS X Mountain Lion with UEFI and GPT HDD


Fred30w
 Share

77 posts in this topic

Recommended Posts

Hello everyone. I'm triple booting Windows 7, Windows 8, and Mac OS X Mountain Lion on my laptop. The HDD is formatted in GUID, and my bios is UEFI. I can only boot my OS X via the usb stick. I've tried using ###### to install the chameleon (or chimera) bootloader. Upon restart, I'm greeted with the Windows Boot Manager. I have checked my bios boot list, Windows Boot Manager is on the top of the list, but changing it to boot from HDD still sends me back to the Windows Boot Manager. I have even tried easyBCD, but that gives me an autogrub0.mbr could not load OS. (something like that) Is there a special way to either get easyBCD (prefered to use Windows Boot Manager screen) or Chameleon to boot OS X off the HDD?

 

BTW, I'm using an app store bought version of ML with the ###### method, not a distro.

Link to comment
Share on other sites

you need to install chameleon to your EFI partition for you GUID table Disk

Thanks for replying so fast.

 

2 Questions.

 

1. Do I install Chameleon to the EFI partition via the OS X side or Windows? (if there is a guide for how to install Chameleon I would most appreciate it)

2. Will I be able to use the Windows Boot Manager or just Chameleon for the boot selection. (I don't mind either or)

 

EDIT: I'm seeing a guide here, http://tonymacx86.bl...-chameleon.html , I no longer have the 200 mb EFI partition OS X made, I only have the one from Windows, do I reformat that EFI partition? Also I've being reading that Chameleon is incapable of booting an EFI aware Windows OS. Is this still true or has an update fixed that?

Link to comment
Share on other sites

Thanks for replying so fast.

 

2 Questions.

 

1. Do I install Chameleon to the EFI partition via the OS X side or Windows? (if there is a guide for how to install Chameleon I would most appreciate it)

2. Will I be able to use the Windows Boot Manager or just Chameleon for the boot selection. (I don't mind either or)

 

EDIT: I'm seeing a guide here, http://tonymacx86.bl...-chameleon.html , I no longer have the 200 mb EFI partition OS X made, I only have the one from Windows, do I reformat that EFI partition? Also I've being reading that Chameleon is incapable of booting an EFI aware Windows OS. Is this still true or has an update fixed that?

You should format your disk in OSX either when installing or using OSX which is already installed.

You can type "diskutil list" to check whether you have this 200mb partition. It usually is disk0s1.

As for boot selection, I can use either one that I like. Basically, after you install chameleon, you are using chameleon for boot selection. :D

Link to comment
Share on other sites

You should format your disk in OSX either when installing or using OSX which is already installed.

You can type "diskutil list" to check whether you have this 200mb partition. It usually is disk0s1.

As for boot selection, I can use either one that I like. Basically, after you install chameleon, you are using chameleon for boot selection. :D

Awesome. I have 2 system partitions. One is called EFI (disk0s1) 104.9MB, the other is Microsoft Reserved (disk0s2) 134.2MB. Now how do I get Chameleon onto the EFI partition, the only problem I can see is my EFI Windows 7 and Windows 8 OS's might not work if Chamaleon is still not able to boot EFI. (for example, I can't boot Windows from my USB stick, but I can boot OS X from it) I believe the EFI partition was created from Windows (windows was first, i had to repair bootloader after os x install through windows 7 dvd)
Link to comment
Share on other sites

Awesome. I have 2 system partitions. One is called EFI (disk0s1) 104.9MB, the other is Microsoft Reserved (disk0s2) 134.2MB. Now how do I get Chameleon onto the EFI partition, the only problem I can see is my EFI Windows 7 and Windows 8 OS's might not work if Chamaleon is still not able to boot EFI. (for example, I can't boot Windows from my USB stick, but I can boot OS X from it) I believe the EFI partition was created from Windows (windows was first, i had to repair bootloader after os x install through windows 7 dvd)

You'd better format the disk with disk utility for osx.

  • Like 1
Link to comment
Share on other sites

It looks like you have UEFI installed Windows.

 

I do not think reformat is needed, and install of Chameleon to EFI partition is also not needed - would not help you. Plus, EasyBCD does not support UEFI installed Windows (from their FAQ) - so you can not do much with it.

Also, I do not know if Windows boot manager supports booting of "legacy" (Chameleon -> OSX) systems if Windows are installed in UEFI.

 

I would say:

- either reinstall both wins in BIOS mode and use Chameleon to boot all of them

- or try Clover boot manager which may be able to boot Wins and OSX from UEFI (depends if your laptop is supported)

- or Clover in legacy BIOS mode (standard Clover with boot sectors, can be installed to OSX partition) which should be able to boot Wins and OSX

 

Tests of boot options from USB stick is highly recommended.

Link to comment
Share on other sites

It looks like you have UEFI installed Windows.

 

I do not think reformat is needed, and install of Chameleon to EFI partition is also not needed - would not help you. Plus, EasyBCD does not support UEFI installed Windows (from their FAQ) - so you can not do much with it.

Also, I do not know if Windows boot manager supports booting of "legacy" (Chameleon -> OSX) systems if Windows are installed in UEFI.

 

I would say:

- either reinstall both wins in BIOS mode and use Chameleon to boot all of them

- or try Clover boot manager which may be able to boot Wins and OSX from UEFI (depends if your laptop is supported)

- or Clover in legacy BIOS mode (standard Clover with boot sectors, can be installed to OSX partition) which should be able to boot Wins and OSX

 

Tests of boot options from USB stick is highly recommended.

Alright, I'll give Clover a try. My USB stick can NOT boot into my UEFI Windows. It gives me a bootmgr not found.

 

EDIT: Installed Clover to the Mac OS X partition, nothing happens. I still get sent to the Windows Boot Manager regardless of my HDD being first on boot menu. I did read the instructions here: http://www.insanelym...80#entry1864061 and used option 3. Am I supposed to install Clover onto my actual EFI partition (which is not mounted)?

 

Also, can you explain your third option a little more? I would prefer not to touch my EFI partition if I can prevent it.

 

EDIT 2: I've hit another wall. I can finally see the Clover menu, but now when I try to boot OS X, my laptop immediately restarts. When I install EmuVariableRuntimeDxe.efi for Phoenix UEFI, it gives me a frozen Apple boot screen. (no spinning wheel) Windows also BSOD's at this pc is not ACPI complainant. I had to revert my bootloader back to Windows default.

 

Side note: My touchpad doesn't move the pointer, despite me putting in the PS2 and USb Drivers into driver64 folder.

Link to comment
Share on other sites

Sorry, missed your post. Can you boot to OSX and make DarwinDump? Choose all "Disk*" options, "Bootloader config", "Firmware log" (just to see current boot setup) and post the result.Which laptop is it?
I've attached the requested DarwinDump. I'm using a Lenovo Ideapad Z570 1024DMU running bios/efi version 38.

I am using a DSDT at the moment, in case that may affect the results of the DarwinDump.

DarwinDumper_2.5.4_Chimera_1.5_ML.zip

Link to comment
Share on other sites

Ok, I can see from there what's going on. It would be better if you tested Clover from USB stick - just plain MBR (not GPT) stick with one FAT32 partition. Installer can install Clover to such stick and then it can be used for BIOS and UEFI Clover boot tests. But since you already installed it to your HDD, let's fix that one.

 

Look:

post-789965-0-52282900-1353704531_thumb.png

 

USB boot is ok: boot0 -> boot1h -> boot (Chimera), and you have /Extra folder there with org.chameleon.Boot.plist and smbios.plist - all ok

 

HDD boot is not ok: boot0md (ok) -> boot1h (not ok) -> boot (Clover)

- the problem is that Clover needs modified version of boot1h, called boot1h2 - version that loads bigger boot file

 

To fix HDD (and Clover BIOS boot), you can run Clover installer:

- follow screens and

- click "Change install location" and choose your "Mac OS X" volume from HDD

- click "Customize" and choose:

--- Clover EFI: "BIOS MBR boot0hfs" + "Install & start 64bit boot first"

--- Themes: choose desired theme

--- Drivers64UEFI: OsxAptioFixDrv-64, OsxFatBinaryDrv - not needed for BIOS Clover boot which you will test first, but will be needed later for UEFI boot

- click Install to install it

 

Post install:

- Put your patched DSDT and/or SSDTs to /EFI/ACPI/patched/ folder, if you have them

- Remove /EFI/OEM folder to avoid confusion with config files

- Edit /EFI/config.plist to customize it for your system

- Here is config made from your Chimera files, I think it should be ok for the start: config.plist.zip

- Note: to make it compatible with your Chimera boot, you should make Clover booted OSX and Chimera booted OSX to have the same Hardware UID. Boot with Chimera, open Launchpad/Other/System Information/Hardware and copy Hardware UUID to config.plist into "CustomUUID" value field.

 

Then try to boot from HDD. If it does not work, make DarwinDump again for check.

Link to comment
Share on other sites

Ok. I tried to enable you BIOS boot from HDD, not UEFI boot. It looks good now, but obviously not working. Your system refuses to do BIOS legacy boot from HDD and then defaults to Win Boot options.

 

I remember one similar case to this one: TimeWalker told me once that when he enable UEFI on his Dell Vostro laptop, then he can not do legacy BIOS boot from GPT HDD disk, just UEFI boot. Is this the case here? How come that you do not have Chimera installed to HDD? BIOS boot of Chimera/Chameleon from USB drive obviously works, right?

 

If this is the case, then the only option for HDD boot is Clover UEFI boot, when Clover is installed to EFI partition and registered as boot option in the firmware. The easiest way to get there and to test if it will work is through USB stick. So my suggestion to you is to get another USB stick (and leave current Chimera stick working - this is your only option for boot OSX now) and do it like it should have been done from the beginning:

 

- Format that new stick as MBR, with one FAT32 partition. You can do this from Windows or from OSX - does not matter.

- Then just run Clover installer like it's written in my previous post, but change location to that USB stick.

- copy your current Clover config.plist to USB stick (to /EFI folder) and do other post install stuff mentioned above

- add "slide=0" to config.plist like this (required for UEFI boot of ML when using OsxAptioFixDrv driver):

<key>SystemParameters</key>
<dict>
   <key>boot-args</key>
   <string>-v slide=0</string>
   ...
</dict>

- add HFSPlus.efi driver from here (link to file) to USB stick /EFI/Drivers64UEFI/ folder - needed for access to HFS volumes

- add EmuVariableRuntimeDxe.efi driver from here to USB stick /EFI/Drivers64UEFI/ folder - needed on similar laptops to overcome original runtime services issues (if boot will work, you can test without that one)

- you should then have following in Drivers64UEFI folder (drivers for UEFI boot): FSInject.efi, OsxAptioFixDrv-64.efi, OsxFatBinaryDrv-64.efi, HFSPlus.efi, EmuVariableRuntimeDxe.efi

- and in Drivers64 folder (drivers for BIOS Clover boot): FSInject.efi

 

This stick should then be ready for BIOS Clover boot and UEFI Clover boot. Try to do both boot methods from that stick and see what's happening.

BIOS boot looks like this: USB stick boot0 -> boot1h2 -> boot (Clover) -> /EFI/Boot/Cloverx64.efi -> OSX (tou should see boot0 messages on the screen in this case)

UEFI boot looks like this: USB stick /EFI/Boot/Bootx64.efi (Clover) -> OSX

 

I hope you will get lucky with this. And it will work, then I'll show you how to install Clover to HDD for UEFI boot.

(And I just hope that writing legacy boot records to that USB want stop you from doing UEFI boot on your laptop.)

Link to comment
Share on other sites

My laptop does not have an option to force either UEFI or BIOS only boot, it uses a feature called "MultiBoot" where it automatically chooses. Chimera was installed to the Mac OS X partition from Mutlibeast, but now its replaced with Clover (according to your diagram). The EFI partition currently only has the Windows Boot Loader. I made the USB stick, and I think it does boot to BIOS mode. I get "waiting for root device" when booting, here is a picture.

 

post-525665-0-61196700-1353807025_thumb.jpg

 

The white box is a no symbol with some lettering in it.

Link to comment
Share on other sites

Regarding your Chimera install on HDD: I saw in DarwinDump that "boot" file is there, but there is no Chameleon's config in /Extra folder. Are you sure that Chameleon/Chimera worked previously?

 

Regarding Chameleon/Chimera boot from USB: It looks to me that you are not booting with kernelcache. Is this true? Do you have FakeSMC and other kexts in USB /Extra folder or subfolders? If yes, put those kexts to USB Clover /EFI/Kexts/Other folder and then try to boot. But it would be even better to put them to ML /System/Library/Extensions with other kexts and then just do normal boot with kernelcache.

 

Regarding boot from USB: here, on my board, I can press F8 during POST screen on startup to get the list of drives for boot. For my USB key I get 2 options:

1. <the name of the key> - if I choose this one, then I do legacy boot (MBR boot0 -> PBR boot1h -> boot ...)

2. UEFI: <the name of the key> - this one appears if USB key is MBR formatted with FAT32 partition and if there is file /EFI/Boot/BootX64.efi on it - if I choose this one, then it does UEFI boot

 

Do you have similar stuff? How can you select to do UEFI boot from that Clover USB stick?

Link to comment
Share on other sites

Chameleon was installed previously, but my bios would not boot it directly from the HDD. Your right, there is no config file in my extra folder, but FakeSMC and that are all install into my S/L/E folder. The Chameleon (not clover) USB key does have FakeSMC and everything in its own /Extra/Extensions folder. As far as I know, KernelCache is being used. My laptop has a boot menu by pressing F12, but it only gives the different drives, no UEFI or bios specific options are given. As for the Clover USB stick, I will try to boot UEFI into Windows to see if it's truely using UEFI or not.

 

I get the option to Microsoft boot UEFI, but Windows throws a Blue Screen stating my bios is not ACPI complaint.

 

post-525665-0-68985800-1353879488_thumb.jpg

 

EDIT: I fixed the BSOD, I just had to remove the EmuVariableRuntimeDxe.efi driver, now Windows boots UEFI fine off the Clover USB stick. OS X still hangs on waiting for root device, but I will double check to make sure all needed kexts from my Chameleon USB drive are installed onto the Clover USB stick.

Link to comment
Share on other sites

I do not know man. You do not have "UseKernelCache" key in Chimera's org.chameleon.Boot.plist and and as far as I saw Chimera does not load kernelcache without that option. I think that your Chimera is loading additional drivers from /Extra/Extensions which Clover does not use. You can check that by typing "bdmesg" in Terminal to see Chimera boot log - it should say if it loads kernel and drivers or if it loads kernelcache.

 

My advice is to use KextWizard and install those kexts to /S/L/E to your Mountain Lion. And then check booting with Clover.

 

You can also try to type "UseKernelCache=Yes" to Chimera boot prompt and see if this works. If yes, then add it to your org.chameleon.Boot.plist.

 

About UEFI or BIOS boot: boot to Clover GUI, and when you get the main menu with volumes press F2 - this will save file preboot.log into Clover USB /EFI/misc/ folder. Give me that file and I'll be able to tell you how you are booting.

Link to comment
Share on other sites

I do not know man. You do not have "UseKernelCache" key in Chimera's org.chameleon.Boot.plist and and as far as I saw Chimera does not load kernelcache without that option. I think that your Chimera is loading additional drivers from /Extra/Extensions which Clover does not use. You can check that by typing "bdmesg" in Terminal to see Chimera boot log - it should say if it loads kernel and drivers or if it loads kernelcache.

 

My advice is to use KextWizard and install those kexts to /S/L/E to your Mountain Lion. And then check booting with Clover.

 

You can also try to type "UseKernelCache=Yes" to Chimera boot prompt and see if this works. If yes, then add it to your org.chameleon.Boot.plist.

 

About UEFI or BIOS boot: boot to Clover GUI, and when you get the main menu with volumes press F2 - this will save file preboot.log into Clover USB /EFI/misc/ folder. Give me that file and I'll be able to tell you how you are booting.

I did get Clover to boot OS X, I just had to copy everything from the Chimera USB to Clover USB. The problem is, my trackpad and keyboard do not work, despite the PS2 kexts installed into my S/L/E folder. I do use KextUtil by the way. Clover boots my OS X much slower than the Chimera USB, but that might be because of the -v or just since it's an old thumbdrive.

 

Using "bdmesg", it shows a bunch of read HFS+ ... .kext -> so perhaps kernel cache is not being used.

 

EDIT: OS X boots from Clover USB fine now, and with UseKernelCache=Yes on Chameleon USB. Only problem, trackpad and keyboard still doesn't work with Clover boot loader. I did install kexts from Chameleon USB onto S/L/E for PS2 controls, but they don't load properly.

preboot.log.zip

Link to comment
Share on other sites

Ok, this now sounds much better then before. From your pre boot.log:

Starting rEFIt rev 825:826 on Phoenix Technologies Ltd. EFI

Above means that your are booting in UEFI mode. It would say Starting rEFIt rev 825:826 on Clover EFI if booted from BIOS mode.

 

Regarding slow boot: do you have -v option added in config.plist SystemParameters/boot-args ? If not, please add it. And then, when you start booting OSX, does it say "loading mach_kernel" and then prints lot of dots? If that's the case, then you maybe need to fix permissions on the disk (Disk Utility, select OSX volume and then Repair Disk permissions) and rebuild kernelcache (Terminal: touch /System/Library/Extensions/).

 

Or, it loads kernelcache (not with lot of dots), starts kernel quickly (start printing kernel logs on the screen), and then it get's very slow? If this is the case, try putting EmuVariableRuntimeDxe.efi back to /EFI/Drivers64UEFI

 

Regarding trackpad and keyboard: maybe above stuff will resolve it.

Link to comment
Share on other sites

Ok, this now sounds much better then before. From your pre boot.log:

Starting rEFIt rev 825:826 on Phoenix Technologies Ltd. EFI

Above means that your are booting in UEFI mode. It would say Starting rEFIt rev 825:826 on Clover EFI if booted from BIOS mode.

 

Regarding slow boot: do you have -v option added in config.plist SystemParameters/boot-args ? If not, please add it. And then, when you start booting OSX, does it say "loading mach_kernel" and then prints lot of dots? If that's the case, then you maybe need to fix permissions on the disk (Disk Utility, select OSX volume and then Repair Disk permissions) and rebuild kernelcache (Terminal: touch /System/Library/Extensions/).

 

Or, it loads kernelcache (not with lot of dots), starts kernel quickly (start printing kernel logs on the screen), and then it get's very slow? If this is the case, try putting EmuVariableRuntimeDxe.efi back to /EFI/Drivers64UEFI

 

Regarding trackpad and keyboard: maybe above stuff will resolve it.

It's good to hear Clover is actually booting EFI on my laptop. I've re-added EmuVariableRuntimeDxe.efi and Mac OS X boots and operates great with my DSDT, mouse and trackpad included. Now the problem is, why is Windows BSODing when trying to boot it with the Clover USB? (screenshot of BSOD posted above)
Link to comment
Share on other sites

UEFI boot on Phoenix UEFI I've seen so far does not work properly. There is some problem with original UEFI runtime (RT) variable services when used with OSX. That's why you need that EmuVariableRuntimeDxe.efi for OSX UEFI boot.

 

But, although I can UEFI boot Win7 here with that EmuVariableRuntimeDxe.efi driver fine, you can not (or is it Win8?). And booting Win with that driver is also not a good idea in general - because you do not have problems with original RT var services with Win.

 

Please try with this version here: https://dl.dropbox.com/u/17629062/EmuVarUefi.zip

Contains:

- modified CloverX64.efi and it's copy BootX64.efi - put them to Clover USB stick into /EFI/Boot/

- modified EmuVariableRuntimeDxe.efi, now called EmuVariableUefi.efi - put it to /EFI/Drivers64UEFI/

- and remove previous /EFI/Drivers64UEFI/EmuVariableRuntimeDxe.efi

 

This version should return back original RT var services when booting Win or Linux, but will continue to use RT var emulation for OSX boot.

 

Try booting OS and Win with this new files.

Link to comment
Share on other sites

UEFI boot on Phoenix UEFI I've seen so far does not work properly. There is some problem with original UEFI runtime (RT) variable services when used with OSX. That's why you need that EmuVariableRuntimeDxe.efi for OSX UEFI boot.But, although I can UEFI boot Win7 here with that EmuVariableRuntimeDxe.efi driver fine, you can not (or is it Win8?). And booting Win with that driver is also not a good idea in general - because you do not have problems with original RT var services with Win.Please try with this version here: https://dl.dropbox.c.../EmuVarUefi.zipContains:- modified CloverX64.efi and it's copy BootX64.efi - put them to Clover USB stick into /EFI/Boot/- modified EmuVariableRuntimeDxe.efi, now called EmuVariableUefi.efi - put it to /EFI/Drivers64UEFI/- and remove previous /EFI/Drivers64UEFI/EmuVariableRuntimeDxe.efiThis version should return back original RT var services when booting Win or Linux, but will continue to use RT var emulation for OSX boot.Try booting OS and Win with this new files.
Yes, Windows 7 is the OS that BSOD's when using the previous EmuVariableRuntimeDxe.efi driver. I haven't tried Windows 8, but Windows 7 no longer BSOD's with your new driver. There is a bug that prevents OS X from booting properly. OS X boots fine if I don't touch the touchpad, which doesn't move the mouse. If I try to move the mouse, OS X hangs at AppleRTC, which is the same symptom that happened without the old EmuVariableRuntimeDxe.efi. As I said, the mouse pointer does not move, and if I attempt to move it, OS X hangs, but Windows 7 boots fine. Thank you again btw for helping me this far. :)
Link to comment
Share on other sites

Well, to be honest I thought it would be easier. And now you are the only one available for testing improvements to this EmuVariable stuff.

 

I have no idea what went wrong with this new one. Can you test this one: https://dl.dropbox.com/u/17629062/EmuVariableUefi.efi

When you start Clover, press F2 to generate /efi/misc/preboot.log and post it here, please.

 

Also, when you boot OSX with it, please make DarwinDump with Ioreg option selected. Want to see if runtime services and platform uuid injection works.

Link to comment
Share on other sites

Well, to be honest I thought it would be easier. And now you are the only one available for testing improvements to this EmuVariable stuff.I have no idea what went wrong with this new one. Can you test this one: https://dl.dropbox.c...ariableUefi.efiWhen you start Clover, press F2 to generate /efi/misc/preboot.log and post it here, please.Also, when you boot OSX with it, please make DarwinDump with Ioreg option selected. Want to see if runtime services and platform uuid injection works.
Sure thing, I will get the DarwinDump and Preboot.log here later, but Windows and OS X finally boot together great. I still cannot move the mouse pointer in the Clover boot loader (in OS X touchpad works fine), but that can be fixed later. OS X no longer hangs at AppleRTC, so I think that problem is solved. :)

 

EDIT: I've uploaded the requested items. Also OS X sometimes hangs on shutdown, the screen will go blank after the verbose stuff, then the power light will remain on. I am using NullCpuMManagement with SleepEnabler.

DarwinDumper_2.5.4_Phoenix_Technologies_Ltd._ML.zip

preboot.log.zip

Link to comment
Share on other sites

Cool. Logs look good now. I will then add this to Clover package to be available for future.

 

But before that, I would like to identify why it did not work in the first place. Can you please try following 3 versions of that driver: https://dl.dropbox.com/u/17629062/EmuVarUefiTest.zip

Try each one, and use only one version of EmuVariableUefi for each test. No need for any logs, I just want to know for each one: does it work properly or not.

Link to comment
Share on other sites

 Share

×
×
  • Create New...