Jump to content

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


Fred30w
 Share

77 posts in this topic

Recommended Posts

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.c...VarUefiTest.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.

EmuVariableUefi1 -> Freezes at AppleRTC after touchpad usage. (mouse still does not move) If I don't touch the touchpad, OS X boots fine. Windows 7 boots fine.

EmuVariableUefi2 -> Still freezes at AppleRTC after touchpad usage. (still no mouse movement) Windows 7 BSOD's (bios not ACPI compliant) on this version.

EmuVariableUefi3 -> Again, freezes at AppleRTC. (seems at random) Windows 7 again BSOD's for the same reason above.

 

The 2nd emuvariableuefi (post #23) can also hang at AppleRTC. Extremely strange, it also gave a BSOD with Windows 7. (and I thought it didn't)

 

EmuVariableUefi1 seems to be the best version here so far. It may freeze at AppleRTC at times, but Windows 7 has no problems with it.

 

It seems like Clover is sensitive to how I navigate between the options. For example, OS X may hang if I use my arrow keys to go all the way to the left (UEFI boot) and back to OS X and everything inbetween. OS X can also hang if I attempt to use the touchpad (most of the time, not always) while in the Clover boot menu. Windows boots regardless if I use the EmuVariableUefi1.

Link to comment
Share on other sites

Ok, so it's not working properly after all.

 

It's strange that you get BSOD again. All versions I sent you have the code to return real RT var services for Windows. But you must use CloverX64.efi and BootX64.efi I sent you in post #21 (or the ones I am attaching below).

 

Well, I can offer you one more test - Clover with disabled mouse stuff: https://dl.dropbox.c...overNoMouse.zip

Just to see if this mouse/touchpad code is making problems. So, you need to replace CloverX64.efi and BootX64.efi and EmuVar.

 

If this does not work, I'll have to stop since I have no more ideas. :(

 

If you will still want to install Clover to HDD you can do it like this:

1. Copy Clover to EFI partition

2. Register Clover as a firmware boot option so that it appears in boot selection

 

In details:

 

1. Copy Clover to EFI partition

- use Terminal:

diskutil list

to see where your EFI partition is: diskXs1 and then mount it:

mkdir /Volumes/efi

sudo mount -t msdos /dev/diskXs1 Volumes/efi

where diskXs1 is proper name for your EFI partition

- and then copy EFI folder from your USB key to /Volumes/efi volume

- you should then have /Volumes/efi/EFI/ folder on that EFI partition

- you can delete /Volumes/efi/EFI/Boot/Bootx64.efi - will not be needed when booting from HDD

 

2. Register Clover as a boot option

- important: remove temporarily EmuVariableUefi.efi from USB stick /EFI/drivers64UEFI - to allow Clover to have access to boards original RT var services

- boot into Clover from USB stick

- since there is now /EFI/Boot/CloverX64.efi file on HDD efi partition, you should get new "Clover Boot Options" in the tools menu (second row of icons)

- choose that "Clover Boot Options" and you should get new screen with option "Add as UEFI boot option"

- select "Add as UEFI boot option" and this should register Clover from HDD Efi partition as a boot option to your firmware

- you can also later come to the same screen and select "Remove ..." to remove it

- now you should be able to remove USB key and boot directly from HDD

- and you can add back EmuVariableUefi.efi to USB key

 

Procedure for Clover upgrade:

- always install new version on USB key and check if works

- if all is ok, then use above procedure to copy it to EFI partition

- no need for "Register Clover as a boot option" again, since it's already added

  • Like 1
Link to comment
Share on other sites

Ok, so it's not working properly after all.It's strange that you get BSOD again. All versions I sent you have the code to return real RT var services for Windows. But you must use CloverX64.efi and BootX64.efi I sent you in post #21 (or the ones I am attaching below).Well, I can offer you one more test - Clover with disabled mouse stuff: https://dl.dropbox.c...overNoMouse.zipJust to see if this mouse/touchpad code is making problems. So, you need to replace CloverX64.efi and BootX64.efi and EmuVar.If this does not work, I'll have to stop since I have no more ideas. :(If you will still want to install Clover to HDD you can do it like this:1. Copy Clover to EFI partition2. Register Clover as a firmware boot option so that it appears in boot selectionIn details:1. Copy Clover to EFI partition- use Terminal:diskutil listto see where your EFI partition is: diskXs1 and then mount it:mkdir /Volumes/efisudo mount -t msdos /dev/diskXs1 Volumes/efiwhere diskXs1 is proper name for your EFI partition- and then copy EFI folder from your USB key to /Volumes/efi volume- you should then have /Volumes/efi/EFI/ folder on that EFI partition- you can delete /Volumes/efi/EFI/Boot/Bootx64.efi - will not be needed when booting from HDD2. Register Clover as a boot option- important: remove temporarily EmuVariableUefi.efi from USB stick /EFI/drivers64UEFI - to allow Clover to have access to boards original RT var services- boot into Clover from USB stick- since there is now /EFI/Boot/CloverX64.efi file on HDD efi partition, you should get new "Clover Boot Options" in the tools menu (second row of icons)- choose that "Clover Boot Options" and you should get new screen with option "Add as UEFI boot option"- select "Add as UEFI boot option" and this should register Clover from HDD Efi partition as a boot option to your firmware- you can also later come to the same screen and select "Remove ..." to remove it- now you should be able to remove USB key and boot directly from HDD- and you can add back EmuVariableUefi.efi to USB keyProcedure for Clover upgrade:- always install new version on USB key and check if works- if all is ok, then use above procedure to copy it to EFI partition- no need for "Register Clover as a boot option" again, since it's already added
Thank you very much for your help. Unfortunately, OS X still hangs at AppleRTC occasionally, but I will see if there is a fix for that. Clover is now on the EFI partition and OS X can now boot dirrectly from HDD. :) I will post back if I find a fix for AppleRTC hang.EDIT: Ah, I think I found the problem. I had to remove a few kexts that I used for Chameleon. ElliottForceLegacyRTC and EvOreboot were removed. NullCPUManagement and SleepEnabler are still needed, otherwise I get a KP from AppleIntelCPUManagment. Now OS X no longer hangs at AppleRTC.

 

I noticed on app store update, there is a firmware update for Macbook EFI, is this safe to get, or should I ignore it?

 

Also is there a way to hide specific boot options? I used the option to "nolegacy" to hide legacy Windows options. Can I hide "Boot UEFI boot menu from"? (it shows up twice in the list) Basically I only want Windows and OS X to be the boot options available, even hiding the options on the bottom. (the shutdown option is broken for me anyway)

Link to comment
Share on other sites

Ok, so what is the status now? Is OSX boot and Windows boot from Clover working? Did Clover version with mouse disabled made any difference, or is the same as with previous version? I would like to include those changes to Clover, but I'm not sure any more what works for you. Can you give me some details on files you are using? From which posts?

 

Firmware update: do not install it. Ignore it. It will probably not even execute if you install it, specially since you are using RT vars emulation, but no need to try that. You can right-click on it and hide it.

 

Regarding hiding volumes and other common Clover related stuff, better ask on Clover thread - may be interesting to others also.

Link to comment
Share on other sites

Ok, so what is the status now? Is OSX boot and Windows boot from Clover working? Did Clover version with mouse disabled made any difference, or is the same as with previous version? I would like to include those changes to Clover, but I'm not sure any more what works for you. Can you give me some details on files you are using? From which posts?

 

Firmware update: do not install it. Ignore it. It will probably not even execute if you install it, specially since you are using RT vars emulation, but no need to try that. You can right-click on it and hide it.

 

Regarding hiding volumes and other common Clover related stuff, better ask on Clover thread - may be interesting to others also.

OS X and Windows 7 and Windows 8 boot perfectly. There is no more AppleRTC hang. I am using your no mouse version from post #27. I don't think disabling mouse support helped because I'm pretty sure either ElliottForceLegacyRTC.kext or EvOreboot.kext were the cause of the AppleRTC hang. I removed both of those kexts and now OS X no longer hangs. If you need more details, I'm happy to post them.
Link to comment
Share on other sites

Thank you TimeWalker75a for pointing out this thread. And thank you dmazar for the nomouse version of clover. I can confirm that UEFI booting windows 8 from the nomouse version of clover works for me. Both windows 8 and the Mac OS X installer are bootable from my clover USB stick. Next step will be to install clover to my hard disk, but before I want to install Mac OS X correctly in UEFI.

 

I am now struggling to make the OS X install correctly (I think I copied some wrong kext or forgot to delete some).

 

After that I will follow dmazars guide for installing clover on my hdd :)

Link to comment
Share on other sites

So far, Clover seems to work great with Windows and OS X. I haven't had a single hang when booting either Windows or OS X. The only problem I have been getting so far, is that OS X and Clover hang on shutdown. Restart and sleep work fine in OS X, restart works fine in the Clover boot loader. If I select shutdown in OS X or Clover, my laptop hangs with power leds and fans running. Is there a special driver for Clover needed to fix shutdown?

Link to comment
Share on other sites

Ok. Thanks for reporting.

 

About shutdown issue: I have no idea. There is no special driver in Clover for that. Maybe TimeWalker and guys with similar laptops could give you some hints.

Understood. Well, for anyone who has Lenovo Ideapad or another Phoenix UEFI based laptop, can you use the shutdown option in the Clover bootloader. When I try to, my laptop hangs with screen off, and lights on. OS X hangs on shutdown occasionally, mostly after working in Safari and immediately shutting down. Sleep and restart work fine. Restart works in the Clover bootloader, but not shutdown.
Link to comment
Share on other sites

Also I can't confirm the touchpad *tap* behavior with any of prior version I have tried since v771. I have yet to try windows in uefi mode with the new emuvar driver, but I believe it wont be aproblem for my machine, at least Dell has bothered to fix WMI for it. <br /><br />Huge props for new fixes, @dmazar. Keep it up .. maybe some day our crippled Phoenix SCT2.0 will arise from its ashes ..<br />

Link to comment
Share on other sites

I have an idea, once my laptop finishes its battery calibration cycle, I will try the old EmuVarRuntime (the one that BSOD'd Windows) to see if shutdown works on that version. It's strange though, Clover will not shutdown. (just to clarify, the Clover bootloader itself will not shutdown, which I think is my problem for OS X)

 

EDIT: I think I found something. When I use my Clover USB (this has NO EmuVariableUefi installed), selecting shutdown sends me to a screen that says "boot0:" and then Clover (from USB) shows up again. If I select shut down a second time, I get a screen that looks like this:

 

post-525665-0-60347400-1354496895_thumb.jpg

Link to comment
Share on other sites

@Fred30w

Looks like DUET, or in Clover's case rEFIt. Strange you can get there,

Strange thing is, with EmuVarUEFI, using shut down hangs. Without EmuVarUEFI, the first time I use shutdown, I am sent back to Clover boot menu. The second time, that menu appears.
Link to comment
Share on other sites

Well, I'll try to explain ...

 

Shutdown from Clover does not do shutdown, but actually just exits Clover application. This means that control returns back to UEFI firmware.

 

It works like this:

- you select to boot from USB stick

- firmware detects /efi/boot/bootx64.efi (Clover) on the stick and does UEFI boot - starts Clover in UEFI mode and you get Clover GUI

- you select shutdown in Clover, but that just returns back to firmware

- firmware then continues by trying next boot option. and that is USB key again, but in BIOS mode

- since you have BIOS bootable USB key (boot0, boot1h2, boot = CloverEFI), firmware starts BIOS booted Clover (standard Clover boot) and you see boot0 message

- but this BIOS booted Clover installs it's own version of UEFI on top of BIOS - we call it CloverEFI, UEFI based on tianocore Duet

- CloverEFI starts /efi/boot/cloverx64.efi and you get GUI again

- when you select shutdown from this, Cloverx64.efi exits, and control is returned back to CloverEFI firmware

- CloverEFI firmware presents you with boot manager that is on your screenshot

:)

 

This does not help you much, but shows that you can boot standard BIOS Clover boot (CloverEFI) by just removing /efi/boot/bootx64.efi from USB stick and then booting from it. You may try that and see if shutdown works from there. To get UEFI boot back from USB stick, you just need to return /efi/boot/bootx64.efi.

 

Regarding shutdown from OSX: I'm not 100% sure, but I think that OSX does not use UEFI services for shutdown. I think that your shutdown issue is not related to Clover, but maybe caused by something in your DSDT. You are using the same DSDT as for Chameleon, right? But there is no guarantee that original DSDT for BIOS boot is the same as original DSDT for UEFI boot. They usually are, but ... Meaning: it's possible that you are injecting invalid DSDT when doing UEFI boot. Just my guess.

 

You can extract and compare BIOS ACPI tables and UEFI ACPI tables by:

1. do UEFI Clover boot (GUI start) from USB stick and press F4 - this will dump UEFI ACPI tables to /efi/acpi/origin. Move those tables to another place.

2. do BIOS Clover boot from USB stick (by removing /efi/boot/bootx64.efi) and press F4 to dump BIOS ACPI tables to /efi/acpi/origin.

3. compare UEFI and BIOS DSDT (and other ACPI tables) to see if there are any differences

4. if there are differences, then try to apply your DSDT fixes from your moded BIOS DSDT onto UEFI DSDT and try UEFI boot with that new one

Link to comment
Share on other sites

Well, I'll try to explain ...

 

Shutdown from Clover does not do shutdown, but actually just exits Clover application. This means that control returns back to UEFI firmware.

 

It works like this:

- you select to boot from USB stick

- firmware detects /efi/boot/bootx64.efi (Clover) on the stick and does UEFI boot - starts Clover in UEFI mode and you get Clover GUI

- you select shutdown in Clover, but that just returns back to firmware

- firmware then continues by trying next boot option. and that is USB key again, but in BIOS mode

- since you have BIOS bootable USB key (boot0, boot1h2, boot = CloverEFI), firmware starts BIOS booted Clover (standard Clover boot) and you see boot0 message

- but this BIOS booted Clover installs it's own version of UEFI on top of BIOS - we call it CloverEFI, UEFI based on tianocore Duet

- CloverEFI starts /efi/boot/cloverx64.efi and you get GUI again

- when you select shutdown from this, Cloverx64.efi exits, and control is returned back to CloverEFI firmware

- CloverEFI firmware presents you with boot manager that is on your screenshot

:)

 

This does not help you much, but shows that you can boot standard BIOS Clover boot (CloverEFI) by just removing /efi/boot/bootx64.efi from USB stick and then booting from it. You may try that and see if shutdown works from there. To get UEFI boot back from USB stick, you just need to return /efi/boot/bootx64.efi.

 

Regarding shutdown from OSX: I'm not 100% sure, but I think that OSX does not use UEFI services for shutdown. I think that your shutdown issue is not related to Clover, but maybe caused by something in your DSDT. You are using the same DSDT as for Chameleon, right? But there is no guarantee that original DSDT for BIOS boot is the same as original DSDT for UEFI boot. They usually are, but ... Meaning: it's possible that you are injecting invalid DSDT when doing UEFI boot. Just my guess.

 

You can extract and compare BIOS ACPI tables and UEFI ACPI tables by:

1. do UEFI Clover boot (GUI start) from USB stick and press F4 - this will dump UEFI ACPI tables to /efi/acpi/origin. Move those tables to another place.

2. do BIOS Clover boot from USB stick (by removing /efi/boot/bootx64.efi) and press F4 to dump BIOS ACPI tables to /efi/acpi/origin.

3. compare UEFI and BIOS DSDT (and other ACPI tables) to see if there are any differences

4. if there are differences, then try to apply your DSDT fixes from your moded BIOS DSDT onto UEFI DSDT and try UEFI boot with that new one

Thank you for the detailed explanation, I understand the differences between Clover UEFI and Bios boot now. :) I did compare the BIOS and UEFI DSDT, both looked identical. I even used a clean, non-edited DSDT (other than errors were fixed) and OS X still did not shutdown.

Try this emuvariableruntime - fixed my shutdown issues on osx.

 

Now, if only someone could only explain why clover freezes when handing over to legacy win8/mint on easybcd

Unfortunately, this driver didn't work, are you using the nomouse version of Clover or a different version?

 

This is extremely odd. Now sleep is broken, it hangs too. Only reboot works.

Plus, if I just startup OS X, then shutdown, the laptop turns off fine. If I start Safari browsing and such, shutdown/sleep hangs.

 

EDIT:

 

 

dmazar, I think I misunderstood your last post. I did disable the bootx64.efi to force bios boot of OS X. So far, I think that's the perfect solution. At the moment, Sleep and Shutdown work great. I will keep an eye on it and report if this fix truly worked. If this solution does work, how would I force bios through Clover on the HDD?

Link to comment
Share on other sites

 

- 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.)

hi there ,

where can i get those drivers OsxAptioFixDrv-64.efi, OsxFatBinaryDrv-64.efi, HFSPlus.efi ?

Link to comment
Share on other sites

If this solution does work, how would I force bios through Clover on the HDD?

Well, I do not know. TimeWalker told me about his laptop that if he have GPT disk, then he can boot only UEFI from it. And if the disk is MBR, then he can only BIOS boot from it. If the same situation is with your laptop, then you can not install BIOS Clover to HDD. By the way, your first tries to run it from HDD did not work although everything looked ok. You also did not managed to get Chameleon to boot from HDD. This looks like TimeWalker's case to me.

 

where can i get those drivers OsxAptioFixDrv-64.efi, OsxFatBinaryDrv-64.efi, HFSPlus.efi ?

OsxAptioFix and OsxFatBin comes with Clover installer. Link to HFSPlus is in the post you quoted.

Link to comment
Share on other sites

Well, I do not know. TimeWalker told me about his laptop that if he have GPT disk, then he can boot only UEFI from it. And if the disk is MBR, then he can only BIOS boot from it. If the same situation is with your laptop, then you can not install BIOS Clover to HDD. By the way, your first tries to run it from HDD did not work although everything looked ok. You also did not managed to get Chameleon to boot from HDD. This looks like TimeWalker's case to me.

 

Could the problem be from the EmuVarUEFI? jkbuha on Post #41 posted an EmuVarRuntimeDxe that worked to fix shutdown on their laptop (which did not work for me), is there a modification to it that may work for my laptop?

Link to comment
Share on other sites

Which problem? HDD BIOS Clover boot or your shutdown problem in OSX?

I do not think that EmuVar has anything to do with it, although can not be 100% sure, of course.

The shutdown problem in OS X. Here is the post from above.

 

Try this emuvariableruntime - fixed my shutdown issues on osx.

 

Now, if only someone could only explain why clover freezes when handing over to legacy win8/mint on easybcd

 

As for Clover bios boot, is there a way to force Clover use Clover EFI instead of Phoenix UEFI? I noticed Clover Boot Manager (in bios moot menu) is pointing to Cloverx64.efi, is there a way to keep that boot option in bios, but force Clover to use Clover EFI?

Link to comment
Share on other sites

No.

Your Bios -> starts CloverEFI -> which starts CloverX64.efi

Your UEFI -> starts CloverX64.efi

 

CloverX64.efi can not start CloverEFI.

 

You can use CloverEFI only by booting it in BIOS mode. And it seems you can not BIOS boot from HDD is HDD is GPT.

 

Your options are listed in the previous post: http://www.insanelymac.com/forum/topic/284363-how-to-boot-os-x-mountain-lion-with-uefi-and-gpt-hdd/#entry1867104

Except that it looks like third option is not possible from HDD.

Link to comment
Share on other sites

No.

Your Bios -> starts CloverEFI -> which starts CloverX64.efi

Your UEFI -> starts CloverX64.efi

 

CloverX64.efi can not start CloverEFI.

 

You can use CloverEFI only by booting it in BIOS mode. And it seems you can not BIOS boot from HDD is HDD is GPT.

 

Your options are listed in the previous post: http://www.insanelym...d/#entry1867104

Except that it looks like third option is not possible from HDD.

Understood, thanks for clearing that up. In that case I have no idea why OS X will not completely shut off my computer after about 2-3 mins of usage in UEFI boot.
Link to comment
Share on other sites

  • 2 weeks later...
 Share

×
×
  • Create New...