Jump to content

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


  • Please log in to reply
76 replies to this topic

#41
jkbuha

jkbuha

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 195 posts
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

Attached Files



#42
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

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?

#43
wesamer

wesamer

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts

- 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 ?

#44
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 256 posts
  • Gender:Male

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.

#45
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

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?

#46
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 256 posts
  • Gender:Male

Could the problem be from the EmuVarUEFI?

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.

#47
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

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?

#48
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 256 posts
  • Gender:Male
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.

#49
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

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.

#50
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 256 posts
  • Gender:Male
Guys, just to let you know, Clover rev 938 finally contains some changes mentioned in this thread. Some details here.

#51
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

Guys, just to let you know, Clover rev 938 finally contains some changes mentioned in this thread. Some details here.

Awesome, thank for the update. Is this version one we already have or is the one you posted newer?

#52
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 256 posts
  • Gender:Male
It's the new one. Will be in installer soon, when Slice publish it. In the meantime, take it here:
https://dl.dropbox.c...r/Clover940.zip

#53
04152viki

04152viki

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 774 posts
@dmazar
thank you!

#54
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts
Thanks dmazar, this release works great. I still get the shutdown hang, which is pretty annoying. I did notice that the sound card gets shutoff properly, because I heard the speakers pop. (I am using AppleHDA). Anyway, it might be your EmuVariableUefi.efi, is there anyway for it to be "temporarily" disabled during shutdown?

#55
TimeWalker75a

TimeWalker75a

    InsanelyMac Legend

  • Gurus
  • 918 posts
  • Gender:Male
Using build 957 at the moment and the newest emuvar. I was wondering if clover can screw up the real nvram? I had a problem with brightness control keys suddenly stopped working and I thought that a vbios I had flashed has caused this. I have reverted to a more stable one and did reflash the onchip BIOS with /cvar option to reset nvram. Brightness keys started working again. Today I was updating Clover on my USB drive from 949 to 957 and forgot to unmount the efi partition properly.. the flashdrive got corrupted and refused to boot. I loaded up windows 8 legacy through its native bootloader to check what was left on the flashdrive.. well, some files gone missing .. themes were gone completely and so did drivers64uefi .. so I had to pull out a flashdrive with XPC bootloader and repair the clover USB by using an installer of some recent version, replaced configuration & acpi with my and off I went. After booting OSX with Clover I was logged off iMessages which no longer work (that's because of xpc presumably) and also I lost the brightness controls again (which I'm dead positive worked with XPC for ages). So could Clover had written something into nvram? I have attached dump from DD in Clover UEFI thread over at AppleLife. Will try reflashing with /cvar again to see if it fixes the issue again ..

OH, and happy New Years, @dmazar!

#56
TimeWalker75a

TimeWalker75a

    InsanelyMac Legend

  • Gurus
  • 918 posts
  • Gender:Male
This time even /cvar doesn't help. It simply doesn't work...
I've reflashed the BIOS at least 5 times with different roms and VBIOSes .. none of them seems to help. Brightness keys stop working with XPC {censored} well. And what I've noticed is that after using Clover I can't even set brightness in BIOS or Boot Manager.. it doesn't react to keypresses, which is totally odd. So it has something to do with EmuVar and such.. I guess I can try booting without it and wait 10 minutes just to check is the keys will respond?

UPD:
I've tried reverting Clover back to rev 904 nomouse, I've tried booting without EmuVar and waiting for 10 minutes to be able to utilize PS/2 devices .. nada. Nothing brings brightness controls back.. so it's something related to AptioFix and how it interacts with real UEFI?

UPD2:
Fn+F2 which is Wi-Fi toggle combination no longer works as well..

#57
04152viki

04152viki

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 774 posts
@dmazar
I use your EmuVariableUefi-64.efi. I have a problem with shutdown. Is it EmuVariableUefi-64.efi problem? Do you have an idea?
With CloverEFI BIOS there are no problems with shutdown.

Dell XPS L502x moddet BIOS
Clover UEFI Boot

#58
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

@dmazar
I use your EmuVariableUefi-64.efi. I have a problem with shutdown. Is it EmuVariableUefi-64.efi problem? Do you have an idea?
With CloverEFI BIOS there are no problems with shutdown.

Dell XPS L502x moddet BIOS
Clover UEFI Boot

Don't worry, your not the only one with the shutdown problem. I've had it since day one. If I use Clover EFI from a usb, there is no shutdown hang. If I Phoenix UEFI boot with EmuVariableUefi-64.efi, my laptop hangs with power led and fans on.

#59
TimeWalker75a

TimeWalker75a

    InsanelyMac Legend

  • Gurus
  • 918 posts
  • Gender:Male
I'm in the same boat. When booting from hdd with new emuvar it always freezes upon shutdown, with older the rate is lower but freezing still occurs. When booting from USB install it shuts off properly, but still freezes once in a while.

#60
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

I'm in the same boat. When booting from hdd with new emuvar it always freezes upon shutdown, with older the rate is lower but freezing still occurs. When booting from USB install it shuts off properly, but still freezes once in a while.

Timewalker, do you use AppleHDA.kext for sound or VoodooHDA? Sometimes I hear my speakers pop as if the soundcard is turned off during shutdown. Usually as the pop occurs, the laptop shuts off. When the freezing happens, I still hear the pop, but the laptop power is stuck on.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy