[Guide] Booting the OS X installer on LAPTOPS with Clover UEFI


One of the first challenges you'll face in installing OS X to your laptop will involve getting the OS X installer to boot from USB. This guide is for those wishing to use Clover UEFI. Although some of the information and files contained here could be used for Clover legacy (just different selections in the Clover installer), one of the main advantages of Clover is UEFI booting, so I'll focus on that here.

Using Clover has several advantages over older legacy bootloaders:
- faster UEFI boot
- simpler bootloader configuration in normal files away from "boot records"
- no boot0 problems with 4k/AF HDDs
- no issues with BIOS implementations that refuse to boot legacy to GPT drives
- no wierd issues with bootloader lockups when large drives are connected
- central location for bootloader configuration files
- automatic patching for common kernel problems (XCPM, "Local APIC")
- automatic patching for common kext problems (AppleIntelCPUPowerManagement)
- ability to provide custom patches for any kext
- ability to update to major versions by running the app from the App Store
- ability to setup the system such that little or no post-upgrade tasks need to be done
- updates are easier (and more like a real Mac) because of all of the above
- support for creating the Recovery partition during installation
- support for booting the Recovery partition
- pure GPT, so no hassles associated with hybrid GPT/MBR schemes used in dual-boot scenarios
- ability to boot UEFI installs of Windows (very common on new computers)
- active development

That said, Clover is new and almost always in a state of change. It is also complex and more difficult to setup when you are not familiar with all the components and the abundance of options that can be used to configure the bootloader.

The purpose of this guide is to show how to install Clover and the OS X installer to a USB which can be used to install OS X. In addition, the same instructions apply to installing to your HDD after installation. In addition, Clover configurations are provided for common laptop hardware with Intel graphics capability.

Note: If you have config.plist files that are good for other graphics configurations, feel free to contribute.

Know your hardware

There is almost no chance of success if you don't know the main components inside your laptop. And when asking for help, the critical components should be listed in your profile.

This guide is primarily focused on Intel or Intel+Nvidia or Intel+AMD. Personally, I don't have any Radeon or Nvidia hardware, so I don't know much about booting the installer on those systems.

I will write this response to anyone who doesn't have the details in their profile:

Please provide complete details in your profile/signature
(Profile/Settings link in upper right corner of this site)

System: manufacturer/model
CPU: detailed CPU model + motherboard chipset
Graphics: all graphics devices + laptop internal screen resolution

For example, typical Ivy laptop:
System: HP ProBook 4540s + bootloader(Clover/Chameleon/Chimera)
CPU: i5-3320m/HM76
Graphics: HD4000, 1366x768

Use CPU-Z on Windows to find CPU (Core iX-xxx) and motherboard chipset (HMxx), and graphics capabilities. For a laptop, these details are important and affect critical installation procedures.
Obviously, you can use programs other than CPU-Z, but it does work for four of the five details above. And your screen resolution is easily discovered from graphics properties on Windows. Please do everyone a favor and update your profile prior to asking a question.

Installing Clover UEFI to USB

It is best to use a simple USB2 8GB drive for this purpose. Larger drives and even USB3 drives can be used, but you are more likely to have problems.

Use Disk Utility to partition your USB. Partition format can be MBR or GPT but beware that some computers will not boot UEFI to a GPT USB. First partition 200MB (or larger) "MS-DOS" (FAT32), and another for the OS X installer in HFS+J format. Name the first FAT32 partition "CLOVER EFI" -- this is where you will install the Clover bootloader. Name the second partition "install_osx".

Note: Some BIOS implementations require GPT, some require MBR (many allow both). If you can't get BIOS to recognize your USB for booting, try GPT instead of MBR as above. The only difference with a GPT setup is that you create only one partition. The Clover install options remain the same, although Clover ends up installing to the hidden EFI partition on the USB.

Download the Clover installer. Current builds are availabe on sourceforge: http://sourceforge.net/projects/cloverefiboot/

Personally, I build my own Clover using CloverGrowerPro: https://github.com/JrCs/CloverGrowerPro

After obtaining the Clover installer, first task is to install to the USB "CLOVER EFI" partition:
Run the Clover Installer package:
- select the target of the install to "CLOVER EFI" using "Change Install Location"
- select "Customize" (the default is a legacy install -- we need to change it)
- check "Install for UEFI booting only", "Install Clover in the ESP" will automatically select
- check "Bluemac" from Themes (the config.plist files I provide use this theme)
- check "OsxAptioFixDrv-64" from Drivers64UEFI

Notes on HDD install:
- if you were installing to your HDD, you might want "EmuVariableUefi-64.efi", but it would depend on whether native NVRAM works for you
- if you were installing to your HDD, you would want "Install RC scripts on target volume" and/or "Install all RC scripts on all other boot volumes", but not for USB
- if you were installing to your HDD, you could select "Install Clover Preference Pane"
- there are aslo some "Optional RC Scripts" you might want to read about

After making your selections you can continue to "Install" the Clover bootloader to your USB.

Finally, we need one EFI driver not included in the Clover installer, HFSPlus.efi:
- it can be downloaded from here: https://github.com/JrCs/CloverGrower...64/HFSPlus.efi.
- copy it to /EFI/Clover/drivers64UEFI

Note: Please, DO NOT forget HFSPlus.efi. Without it, you won't see any HFS+ partitions, including the HFS+ partition that the OS X installer is on.

Now you have the Clover bootloader on the USB, but you still need to configure it correctly.

Preparing essential kexts

Remove EFI/CLOVER/kexts/10.6, 10.7, 10.8, 10.9, 10.10, leaving just 'Other'

Copy essential kexts to the 'Other' directory (FakeSMC, GenericUSBXHCI, VoodooPS2Controller). You only need the kexts that allow you to boot and operate the installer. Other kexts that you might use in the final installation can wait.

I always use my own versions of these kexts:
FakeSMC.kext: https://github.com/Riz/OS-X-FakeSMC-kozlek
VoodooPS2Controller.kext: https://github.com/Riz/OS-X-Voodoo-PS2-Controller
GenericUSBXHCI.kext: https://github.com/Riz/OS-X-Generic-USB3

Note: Please READ the README at each link so you know where pre-built binaries are located. Copy only the kext to Clover/kexts/Other (usually the kext is found in the Release folder inside the ZIP).

Note: GenericUSBXHCI.kext is optional if your USB3 ports work with AppleUSBXHCI.kext.

Unlike installing kexts to /System/Library/Extensions, where a kext installer (such as Kext Wizard) must be used, for EFI/Clover/kexts/Other, it is simple copy/paste with Finder.

If your SATA is in RAID mode, you'll need an injector kext. I built one a while back:
HPRAIDInjector.kext: http://www.tonymacx86.com/attachment...ector.kext.zip

If you want to have Ethernet (note Ethernet is wired networking, and is not the same as WiFi), you can also install your Ethernet kext.

For example:
RealtekRTL8111.kext: https://github.com/Riz/OS-X-Realtek-Network
RealtekRTL8100.kext: http://www.insanelymac.com/forum/top...hernet-series/
AppleIntelE1000e.kext: http://www.insanelymac.com/forum/top...-108107106105/

Choosing a config.plist

The Clover installer places a default config.plist at /EFI/Clover/config.plist. It is almost universally wrong and most likely will not work at all for most laptops.

You should choose one that matches your hardware from this repository: https://github.com/Riz/OS-X-Clover-Laptop-Config. As you can tell by looking at the listing of files, the configs vary by graphics hardware configuration. If your screen is 1366x768, pick one of those. If your system is mixed (eg. HD3000 on 7-series, or HD4000 on 6-series) be sure to take that into account. If your screen is 1600x900 (or greater) use one of the 1600x900 config files. Haswell graphics are not dependent on screen resolution.

Note: Clover cannot read HTML (config.plist is a plist/xml), so make sure to download from the "Raw" link or download the entire ZIP to get all files: https://github.com/Riz/OS-X-Clo...ive/master.zip

In any case you may need to change the ig-platform-id that is used at /Graphics/ig-platform-id. But these configurations work most of the time.

Common ig-platform-ids:
0x01660003: HD4000 1366x768
0x01660004: HD4000 1600x900, 1920x1080
0x01660008, 0x01660009: HD4000 1600x900, 1920x1080

0xa260006: HD4400/HD4600/HD5000
Other Haswell ig-platform-id values: 0xa260005, 0xa260000, 0xa160000, 0xa2e0008, 0xa2e000a

Always use a plist editor such as Xcode when making changes to config.plist.

Note: HD4200, HD4400, and HD4600 on Yosemite needs special patches/injections, thus the separate config_HD4600_4400_4200.plist. If you're installing Mavericks, use the config_HD5xxx.plist instead even for HD4200, HD4400 and HD4600.

Copy your selected configuration file, and paste it to /EFI/Clover, make sure it is re-named as config.plist. Clover will only load configurations from /EFI/Clover/config.plist.

Building the OS X installer

There are three ways to copy the OS X installer to USB:
- Unibeast method (NOT recommended)
- 'createinstallmedia' method (recommended)
- BaseBinaries clone method (use when 'createinstallmedia' is not available)

Unibeast method

You can use Unibeast to create the installer partition. Unibeast will also install Chimera as a legacy bootloader, so both Clover UEFI and Chimera legacy will be available.

Since Unibeast installs Chimera, you'll have both Chimera (legacy) and Clover (UEFI) installed to the USB. This can lead to confusion over which bootloader you're actually using, especially when you are not familiar with either. As a result, the Unibeast method is NOT recommended. I only include it here for completeness.

createinstallmedia method

This is the same mechanism you would use to create a USB installer for a real Mac.

It is a single line, executed in Terminal:
sudo "/Applications/Install OS X Yosemite.app/Contents/Resources/createinstallmedia" --volume  /Volumes/install_osx --applicationpath "/Applications/Install OS X Yosemite.app" --nointeraction
Then change the name to be less unwieldy...
sudo diskutil rename "Install OS X Yosemite" install_osx
You can also copy the Mavericks installer in the same way:
sudo "/Applications/Install OS X Mavericks.app/Contents/Resources/createinstallmedia" --volume  /Volumes/install_osx --applicationpath "/Applications/Install OS X Mavericks.app" --nointeraction
sudo diskutil rename "Install OS X Mavericks" install_osx
This method is not available in ML, Lion, SL.

Using 'createinstallmedia' is the only method that results in the creation of a Recovery partition.

BaseBinaries clone method

You can do the following steps manually via Disk Utility and the Finder, but it is slightly more concise and clear when written in Terminal:
mkdir /tmp/install_esd
hdiutil attach "/Applications/Install OS X Yosemite.app/Contents/SharedSupport/InstallESD.dmg" -readonly -mountpoint /tmp/install_esd -nobrowse
asr restore -source /tmp/install_esd/BaseSystem.dmg  -target /Volumes/install_osx -erase -format HFS+ -noprompt
diskutil rename "OS X Base System" install_osx
rm /Volumes/install_osx/System/Installation/Packages
cp -a /tmp/install_esd/Packages /Volumes/install_osx/System/Installation
cp -a /tmp/install_esd/BaseSystem.dmg /tmp/install_esd/BaseSystem.chunklist /Volumes/install_osx
hdiutil detach /tmp/install_esd
rmdir /tmp/install_esd
You are now ready to eject your USB device.

BIOS settings

In order to boot the Clover from the USB, you should visit your BIOS settings:
- "VT-d" (virtualization for directed i/o) should be disabled if possible (the config.plist includes dart=0 in case you can't do this)
- "DEP" (data execution prevention) should be enabled for OS X
- "secure boot " should be disabled
- "legacy boot" optional
- "CSM" (compatibility support module) enabled or disabled (varies)
- "boot from USB" or "boot from external" enabled

Booting the Installer

After you create you USB, it is ready to go...

Generally, you will need to use a special button to turn the laptop on or press some special keys to access the boot menu, where you can choose to boot the USB.

If you used the Unibeast option, note that you may see it listed twice (depending on setting of legacy boot). Choose the listing that is UEFI.

You can press the spacebar in Clover to select various options. It is a good idea to use this to boot verbose (the config.plist files I provide do not have verbose turned on by default). In verbose mode you have a better idea of the booting process and get better information in the case of a crash.

After you install, don't forget the second post (this thread) on using the OS X installer itself and installing Clover to your HDD: [Guide] Booting the OS X installer on LAPTOPS with Clover UEFI

More Clover documentation

It is a good idea to become familiar with the software you are using and read the documentation.

Clover wiki: http://clover-wiki.zetam.org/Home

Providing Feedback

Do not treat this thread as your private troubleshooting thread. If you have a specific problem with your specific laptop, open a separate thread. If you see something here that is in error, or wish to make a contribution, please reply to this thread.

Post a Comment