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

#1
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 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.

#2
p.H

p.H

    InsanelyMac Legend

  • FAQ Team
  • 767 posts
  • Gender:Male
  • Interests:Hackintosh & NBA & COD4 promod
you need to install chameleon to your EFI partition for you GUID table Disk

#3
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

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?

#4
p.H

p.H

    InsanelyMac Legend

  • FAQ Team
  • 767 posts
  • Gender:Male
  • Interests:Hackintosh & NBA & COD4 promod

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

#5
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

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)

#6
p.H

p.H

    InsanelyMac Legend

  • FAQ Team
  • 767 posts
  • Gender:Male
  • Interests:Hackintosh & NBA & COD4 promod

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.

#7
dmazar

dmazar

    InsanelyMac Sage

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

#8
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

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.

#9
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 274 posts
  • Gender:Male
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?

#10
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

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.

Attached Files



#11
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 274 posts
  • Gender:Male
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:
Attached File  Boot.png   121.88KB   655 downloads

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: Attached File  config.plist.zip   1.01KB   120 downloads
- 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.

#12
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts
Thanks for the diagram. I followed your instructions, but I still get sent to the Windows Boot Manager when booting from the HDD (I have selected my HDD from bios boot option screen). I only get the options to boot Windows 7 and Windows 8, no Clover bootloader menu appears. I've attached the new DarwinDump.

Attached Files



#13
dmazar

dmazar

    InsanelyMac Sage

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

#14
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts
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.

Attached File  20121124_184419.jpg   118.66KB   170 downloads

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

#15
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 274 posts
  • Gender:Male
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?

#16
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts
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.

Attached File  20121125_153106.jpg   76.04KB   109 downloads

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.

#17
dmazar

dmazar

    InsanelyMac Sage

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

#18
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

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.

Attached Files



#19
dmazar

dmazar

    InsanelyMac Sage

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

#20
Fred30w

Fred30w

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts

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)





1 user(s) are reading this topic

0 members, 1 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