devroom.io/content/posts/2012-11-22-customac.md
2019-06-05 14:32:16 +02:00

195 lines
9.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

+++
date = "2012-11-22"
title = "CustoMac"
tags = ["osx", "hacks", "customac", "osx86"]
slug = "customac"
+++
Ever since Apple decided to put Intel processors in their Macs there have been attempts by enthusiasts to run Mac OS X on commodity hardware with mixed results.
The key to installing Mac OS X on a non-Mac computer is using the right hardware. If your hardware is a close to Apple kit as possible, you have the best chance to succeed.
The so-called *Hackintosh* community has come a long way the past few years in making it easy for "normal people" to install Mac OS X on their _PC_.
Since I was tired of using Debian Linux on my Desktop, dual booting to Windows to play the occasional game of _World of Warcraft_, I decided to give installing Mac OS X a try. But there was a problem.
## The hardware
My current PC is powered by an AMD processor (AMD Phenom II X6 1055T, to be precise). Simply put, installing Mac OS X on an AMD cpu is not going to work.
So, the first thing I did was go over to the [OSx86 Project Hardware Compatibility List][2] and see what hardware is most compatible with Mac OS X 1.8.2 (the most recent version of OS X at this time).
I already knew I'd need a shiny new Intel CPU, and thus also a new motherboard.
## Choosing a CPU
Choosing a CPU for your CustoMac is not very difficult, because you are limited to Intel. Since the release of the new MacBooks Apple officially supports the [Ivy Bridge][1] architecture, which means about a 50% lower power consumption and a 5-15% speed increase ([link][1]).
The main candidates were:
* Intel i5 3570
* Intel i5 3570K
* Intel i7 3770K
I won't go into to too much detail here, but I chose the _Intel i5 3570_.
The i7 offers [Hyper Threading][3] at a price bump of about € 100,-. For me, this was not worth the money.
Then there's the choice between the _3570_ or the _3570K_. The 'K' version has less features, but is _unlocked_, allow it to be easily over-clocked to higher speeds.
The price difference between the _3570_ and the _3570_ are minimal, but I'm not planning to over-clock my CPU, so I went for the slightly cheaper _Intel i5 3570_ processor.
## Choosing a motherboard
Next came a more difficult decision. The motherboard. Again, the [Hardware Compatibility List][2] was a great help here. In the end I chose the _Gigabyte Z77-DS3H_.
The pro's of this board are that it's well supported by Mac OS X and the OSx86 community. This board is special because it features Gigabyte's 3D UEFI Bios. This bios would make it easy to install Mac OS X _untouched_ on your machine.
I didn't end up using this UEFI feature, but nonetheless, support for this board is incredible.
## The full hardware list
So, recycling other parts of my current _PC_ I build the following CustoMac configuration:
* Gigabyte Z77-DS3H Motherboard ([But at Amazon][9])
* Intel i5 3570 CPU @3.4Ghz ([Buy at Amazon][8])
* 16GB RAM at 1333Mhz
* 1x 120 GB OCZ Agility 3 SSD
* 1x 1TB Western Digital HD
* 1x 2TB Western Digital HD
* XFX ATI Radeon HD 6870 1GB ([Buy at Amazon][10])
_Note 1: The above Amazon links are affiliate links._
_Note 2: I could have upgraded my memory to 1600Mhz units, which would be faster. But I have no use for the old memory, so I chose to re-use it for now._
## The preparation
Before you get started, you should prepare an installation USB drive on another Mac. You'll need at least 8GB of space on the drive.
* Buy Mountain Lion from the App Store on you Mac and download the installer. If you already purchased Mountain Lion, re-download it.
* Download [UniBeast][4] for Mountain Lion and follow step 1 and 2 from [this guide][5].
At this point you have a bootable USB drive with the Mountain Lion install on it.
To prepare the actual installation, remove any devices you don't need, like extra hard drivers, DVD/BluRay drives, etc. In my case I also pulled out the ATI 6870 and used the onboard Intel HD Graphics during installation.
Plug your USB drive into a USB 2.0 (black, not blue) port on the motherboard. Make sure to use one of the ports on the back of your computer, those are directly attached to the motherboard and have the greatest chance of succes.
Now, boot up the computer and enter the BIOS. There are two important changes you need to make.
* Set SATA to `AHCI` mode.
* Disable `VT-d`.
Then select the USB drive as the bootable device and boot.
## Booting the installer
You'll see the UniBeast boot screen which show a 'USB' option (and possibly other, depending on what's on your disks). Choose 'USB' - but don't press `ENTER` just yet. Instead, type `-x`, which will show up on the screen. Then, press `ENTER`.
After a few minutes you should have the Mac OS X Installer in front of you. Go ahead, install this baby.
## Notes on Fusion drive
It's possible to create a CustoMac Fusion Drive using an SSD and regular harddisk.
When you're in the installer, choose 'Terminal' to open a terminal window and follow the steps in [this fusion drive guide][6].
I was able to create and install Mac OS X on a Fusion Drive without problems. The only knack was that the custom bootloader you need is not Fusion Drive aware, which makes it difficult to use.
In the end I decided to not use a Fusion drive setup, and just install everything on the SSD.
## Completing the installation
Now comes the tricky part. The installation is done and you're CustoMac wants to reboot. Let it, but leave the USB drive connected.
Your machine will boot up with the same boot menu as before, but instead of 'USB' you should now be able to select 'Macintosh HD'.
Select that, enter `-x` followed by `ENTER`.
You'll now be taken through the final steps of installation, like setting up iCloud and creating a user account.
When finished, you should be on your new Mac desktop.
## Installing custom kexts
Now, your CustoMac can only boot with the USB drive. Let's change that by installing a bootloader and some kernel extensions.
* Download [MultiBeast][4] for Mountain Lion.
* Run the installer and select the following options:
** UserDSDT or DSDT-Free Installation
** Miscellaneous => FakeSMC
** Audio => Realtek ALC8xx => Without DSDT => Latest version for ALC8887/888b.
** Network => maolj's AtherosL1cEthernet
** Disk => TRIM fix for 1.8.1+
** Bootloaders => Chimera
That's all. Install that stuff. Now, you should be able to reboot your CustoMac and boot it without the USB drive.
If things don't work out (like a black or white screen, kernel panics, whatever), just plugin your USB drive again, boot from it and select your 'Macintosh HD'.
## Graphics
At this point, you should have a working CustoMac with sound and network working. The only thing missing is a proper graphics card.
You'll need to make some tweaks to the chameleon plist file. Then shutdown your computer and install the graphics card.
_Note: this works for my XFX ATI Radeon HD 6870 card. There may be subtle differences for different version and brands. Just use the Google to find hints, boot with the USB drive to get to your system and make updates as needed._
In `/Extra/org.chameleon.Boot.plist` make sure you have the following entries:
``` xml
<key>AtiConfig</key>
<string>Duckweed</string>
<key>AtiPorts</key>
<string>5</string>
<key>Graphics Mode</key>
<string>1920x1080x32</string>
<key>GraphicsEnabler</key>
<string>Yes</string>
<key>PciRoot</key>
<string>1</string>
```
Depending on which slot you used for your graphics card, you may have to set `PciRoot` to `0`.
I also had to add `npci=0x2000` to `Kernel Flags`, but you may or may not need it.
``` xml
<key>Kernel Flags</key>
```
## Boot up!
Now, reboot one last time and everything should go smoothly.
If your system comes up without any troubles, start attaching those others disks and drives you had disconnected during the installation. There shouldn't be any issues here.
## You're done!
Congratulations. You now have a CustoMac!
Keep in mind that you should not blindly install any update you see. Installing an update my change the bootloader or change kernel extensions that break your system.
A good tip is to create a full disk image of your SSD using a tool like [Super Duper][7]. In case of shit hitting the fan after an update, you can easily restore your disk to working order.
In my case, I've attached an old 500GB drive to store this disk image. It works great.
## Shiny and fast!
Just as a side-note, my CustoMac is blazingly fast. It's the combination of the fast _Ivy Bridge_ architecture, the i5 processor, and the SSD.
I've measured boot-up time from pressing the power button to the Mac OS X login screen at about 11 seconds.
[1]: http://en.wikipedia.org/wiki/Ivy_Bridge_%28microarchitecture%29
[2]: http://wiki.osx86project.org/wiki/index.php/HCL_10.8.2
[3]: http://en.wikipedia.org/wiki/Hyper-threading
[4]: http://www.tonymacx86.com/downloads
[5]: http://tonymacx86.blogspot.nl/2011/10/unibeast-install-mac-os-x-lion-using.html
[6]: http://jollyjinx.tumblr.com/post/34638496292/fusion-drive-on-older-macs-yes-since-apple-has
[7]: http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html
[8]: http://www.amazon.com/gp/product/B0087EVHTE/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B0087EVHTE&linkCode=as2&tag=ariejannet-20
[9]: http://www.amazon.com/gp/product/B007R21JWC/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B007R21JWC&linkCode=as2&tag=ariejannet-20
[10]: http://www.amazon.com/gp/product/B0047ZH7GE/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B0047ZH7GE&linkCode=as2&tag=ariejannet-20