Building a Hackintosh from A to Z

happy-mac-icon

Before we resume this tutorial, let’s take a moment of silence in memory of PirateBay.
*Half Second Pause*

Continuing On – Boot 132 Installation

One of the weird things about the tools available to get OS X running properly on x86 hardware is that they are all written for the OS X. A bit a of a chicken and the egg problem: how do you exactly use those tools if you can’t install in the first place? This was also one of the first oddities I encountered in the primary guide I used for my installation: the guide calls for you to install a hacked installation disc of OS X prior to doing a Boot-132 installation. And in retrospect; it makes sense: the hacked discs are easy to install are just used as a bootstrap/failsafe/utility in case your actual Boot-132 installation goes awry. The reason I am bringing this up, is so that the prerequisites to the installation make more sense.

Step 0: Prerequisites

  • Two hard drives – It must be two hard drives, not two partitions. The installation will involve installing both the hacked install CD as well as a Boot-132 installation. Boot-132 involves creating and tweaking the aforementioned modified EFI boot partition. So if something goes wrong with the boot partition, using two partitions to do the installation would just result in two busted installations. So, that is why you should have two hard drives for this process; one hard drive will contain a backup installation and boot partition. Use the slower/cheaper/crappier hard drive for your hacked CD installation, and the good one as the target of the Boot-132 installation.
  • Patience – You will need a lot of this later on in this guide.

Step 1: Hardware Setup

Make sure both of your hard drives are connected to your PC. Have your crappier hard drive as the second one in the boot order. Remember that there will be be two OS X installations, and we are starting out by installing the hacked installation, which goes on the crappier drive. We don’t want to boot into this one automatically because once everything is said and done, this will not be the primary installation.

Step 2: Installing iDeneb v1.4 (OS X 10.5.6) [3]

Here is the guide I used to do my iDeneb installation. Much of my information came from here. I recommend also reading through that as it comes with pretty helpful pictures and such. But be mindful to follow the instructions regarding partitioning on this section of the blog, as the final setup will be different from the linked guide.

Download iDeneb 1.4 torrent off of PirateBay (if it is still around) and make a CD from the ISO.

Boot off the iDeneb CD. Hopefully you will not see the “waiting for root device” problem during boot that some people get. I personally ran into it on one installation. The issue resolution varies from computer to computer. For me, I resolved it after much hair pulling by hooking up my CD-ROM to the SATA-0 connector.

Once iDeneb is loaded, keep hitting Continue/Agree until you get to the point where you choose an installation disk. From the menu, choose Disk Utility. Verify both of your hard drives are visible in the list. Partition both drives with the following:

GUID Partition Table (this can be found under Options). The first/installation partition of each drive should be Mac OS Extended (Journaled). [0]

Name the crappy partition “Recovery”. Name the good partition that will have your retail installation “System”. Well, you can name them what you want, but that is what I called them and how I will refer to them in this guide.

After partitioning both disks, choose the crappier disk as the installation target, and continue. You should now see a OS X disk with an arrow pointing to a hard drive. Don’t press Continue yet! First press customize. At this step, you need to choose the .kexts that you will add in as part of the installation process. Make sure you choose the appropriate ones for your motherboard, video card, and network card. Don’t worry about sound and any other random peripherals; it doesn’t matter if those do not work. Keep in mind that this step is just to get a booting OS X installation, preferably with working internet access (if not, a USB drive to transfer stuff over from another computer works too).

My Personal Computer Setup [1]:

  • Core i7 920 Processor
  • Gigabyte EX58-UD3R Motherboard
  • NVidia 9800GT Video Card
  • 6GB RAM
  • 2 SATA Hard Drives
  • 1 SATA CD-ROM

In my case, I chose the following from Customize:

  • JMicron ATA (motherboard)
  • Realtek R1000 (network)
  • NVInject 512MB (video)
  • Voodoo Kernel
  • Fonts
  • Applications

Once you have chosen the proper setup for your machine, press continue to finish up the installation. At the end of this, you should a working OS X installation that will be used to bootstrap the actual installation. Do not ever run the Apple Update software on this installation. It will break it.

Step 3: Installing from the Mac OS X Retail Disc

As I mentioned in the previous post, you must have a retail disc. You probably can’t install off an OEM disc because that is a stripped down version of the installation tailored to a MacBook/MacPro.

Insert the disc into your Hackintosh running iDeneb. It might automatically start up the Installation Menu. Close that out. You don’t want to run that as it will try to restart your computer and install, which will fail miserably. Instead we will install retail OS X on a separate disk from under the current running OS X installation. To do this, open Terminal from Applications and type the following [2]:

cd ‘/Volumes/Mac OS X Install DVD/System/Installation/Packages’

Now type:

open OSInstall.mpkg

The menus should look familiar, as they will be very similar to the previous iDeneb installation. Choose the good hard drive for the retail installation. Don’t worry about formatting/partitioning it, as you already did that during the iDeneb installation. And once again, choose customize before starting the installation. But this time, you will not be presented a list of drivers and tweaks for your computer like you were with iDeneb. Instead you will see the list of OS X installation options. I recommend unselecting all the printer drivers (they are all selected by default and total to an extra 3GB). This will make the installation go much faster. Now continue on with the installation.

Boot-132 on your EFI partition

You might be tempted to reboot now into your OS X installation on your main hard disk. But don’t! It won’t even boot, because there is no boot loader set up on that disk yet!

Download the EFI Boot Installer. Credits to Wolfienuke for writing this; don’t download the v3 version from his post though: there were several bugs that made the scripts not work properly for me. I ended up patching them, notifying him of the fixes, and then uploading the fixed/linked version to my site.

When you unzip the EFI Boot Installer, there are two things of interest:

  • Extensions – This folder contains the .kexts for your machine. The download currently contains the .kexts I use for my setup. They probably won’t work for you unless you have the exact same hardware. Typically you will want to download the .kexts that work for your hardware.
  • install.command – Run this to set up your EFI boot partition. Don’t do this yet though.

Step 4: Extensions

First, delete or move all the Extensions that I provided. You will probably want to start from scratch, unless you are using my motherboard.

Ok, above I mentioned that installing OS X requires patience. And that is because finding the .kexts that work for you can be very tedious and induce insanity.

Basically, first start off by googling and downloading the .kexts for your motherboard, video card, and network card. Don’t worry about peripherals at first; let’s just get a working retail installation. That’s all the advice I have for you: Google wisely and dig through the search results on the InsanelyMac forums.

Step 5: Using the EFI Boot Installer Tool

Now that you have the proper .kexts, it’s time to set up your boot partition.

  1. Double click the install.command, and you will be asked for your administrator password.
  2. It will ask you which disk your OS X installation is on. Choose your “System” partition.
  3. When prompted whether you are choosing Installing or Updating, always choose Install. There seem to be bugs in the script with the Update, which I did not bother to fix.
  4. When asked if you would like to edit com.apple.boot.plist, once again, always choose yes and select the following:
    • mach_kernel
    • Press enter for boot flags, but you may want to tweak this if you don’t have an i7 920 processor. If you don’t have an i7, simply use “-v”. If you have an i7 better than the 920 or are overclocking, you will need “-v busratio=X” where X is the clock multiplier you are using for your processor. You can look this up in the BIOS.
    • Press enter for timeout.
    • Press enter for EFI String. More on this later.
  5. Press enter (no) for increasing version numbers. I have tried this, and this just caused problems. Not sure what it is for.
  6. Press “y” to continue.
  7. Before rebooting, first peruse through the install.log and see if there are any glaring errors. There generally shouldn’t be.
  8. Now confirm the reboot.

Up until now, you have been choosing your second hard drive from the boot menu. You can now finally choose your first hard drive. If you have the proper .kexts, your retail installation will boot properly.

Step 6: More on Extensions

Hopefully your retail installation is working (somewhat). In which case, you will want to set up the rest of your connected devices. Navigate to your Recovery disk, and find your EFI Boot Installer folder. You will need to go searching for .kexts for your Sound card, power/sleep fixes (maybe), and whatever else you may have. Rerun the EFI Installer in the same fashion after updating your Extensions directory with the new .kexts, and reboot. Keep doing this until you have a working system. :) [4]

If at any time your retail installation stops working, simply reboot into your Recovery disk and undo whatever change you made to the EFI Boot Installer, and rerun it to recover it! (Now you should understand why you need that second install, haha.)

Extra Credit:

EFI Strings

Another method discussed on InsanelyMac for getting OS X to recognize your hardware is the usage of EFI strings. I’m not really sure how it works beyond that. Although my video card (NVidia 9800 GT) worked for the most part when my retail install, dragging windows left some strange transparency related artifacting. I fixed this by using this guide to find the EFI string for my video card. Once I got the EFI string, I placed it into the efistring.txt found in the EFI Boot Installer and reran the tool.

Using VMWare and Parallels

If you want to run VMWare and Parallels to run Windows, it will probably cause your system to kernel panic due to using a custom kernel which is found in the EFI boot partition, and not at the usual /mach_kernel in normal installs. I fixed this by copying the custom kernel to the expected location by doing the following:

  • cd /
  • sudo mv mach_kernel mach_kernel.old
  • sudo cp /path/to/efi/installer/Kernels/mach_kernel .
  • sudo chmod 644 mach_kernel
  • sudo chown root mach_kernel

This got Parallels working for me I haven’t tried VMWare, but that should work for it too. If not, you can also try running:

  • sudo /Library/Application\ Support/VMware\ Fusion/boot.sh –restart

Done!

Well, that’s it. I realize the guide probably won’t give you an exact set of steps that will for-sure get OS X running on your PC hardware. There’s no magical way to get a retail OS X install without some blood sweat and tears towards finding your perfect .kext combination. But hopefully the information found in these two posts helped you understand how things work, so you aren’t just poking in the dark twiddling random settings praying something works. :)

And, feel free to run Apple Update on your retail install; unlike the hacked installation, it will continue working properly and not break because your critical system files are on a partition that Apple does not touch.

 

 

[0] You can not install OS X on a case sensitive partition.

[1] The .kext files I will provide at the end of this tutorial will apply to only my computer. Though if you have similar setup, you can probably scavenge some of them.

[2] The blog is munging my quotes. Both quotes are single quotes, the button to the left of Enter.

[3] If you have problems installing iDeneb, you can also try iPC, iAtkos, or Kalyway. One of those is bound to work well enough. You only need it to be able to boot and read your CD-ROM and ideally have network access.

[4] I still have not managed to get sound working on my motherboard, Gigabyte EX58-UD3R. I don’t really care though, as my headphones are hooked up to my laptop anyways.

13 comments:

Leon said...

Do you think it's possible to use a USB disk as the second hard drive?

Koush said...

I've heard of people doing that, so that should be possible. I personally tried installing iDeneb on a USB memory stick, but it was not detected by the installer, so it did not work for me. But an actual may work.

plastiswafer said...

I was going to read this article but I noticed that you have two postings of this particular subject under the same title.. wouldn't it have made more sense for you to name part one "Building a Hackintosh from A to L", followed by "Building a Hackintosh from K to Z" for part two?
Maybe if you spent a few less hours staring into your glowing monitor, you'd be able to think clearly without making such embarrassing mistakes.

Ben said...

I have only a single 1TB drive. Is there any way of installing the retail without going and purchasing another crappy drive?

Koush said...

Ben:
I actually got rid of my recovery drive recently, and my EFI partition got messed up, hosing my install. I ended up using the iDeneb CD to boot into a command prompt and manually fixed my EFI partition that way.

So, yes, you can install onto two partitions, rather than two drives, but if something gets messed up, you would need to know how to fix your system from the command line.

Ben Kraus said...

I think I could do it, though I might need help. How did you do it?

DCL said...

hey clock! hahahah funny i ran into your blog from googling. I just did this a week ago and yesterday had issues with my vmware fusion install (postflight script). Searched this morning and here your post was. I'll try what you suggested, but I'm not seeing a kernel panic as I did in Parallels, but if I can get Parallels working, that'd be fine too. Btw, did you ever get your sound working? I have the same mobo (ex58-ud3r with ich10 alc888 audio), and if you haven't gotten the right kext files yet for your sound, I can help you. I'm just not sure if it'll be more than stereo, b/c I can't check that. oh and in case you're wondering, this is bevo.

Koush said...

Yo Bevo, no I never managed to get sound working. Can you link me the kexts?

DCL said...

This was tough, download HDA_888.zip, and used HDA_888_v0.2 (i think, not .1).
forum link After restart, if you see it listed on the System Profiler as Intel High Definition Audio, then go to System Preferences -> Sound -> Output Tab and click on Internal Speakers. Then your sound should work. I'm pretty sure finding these working kext took me about 6 hours, it was a real pain. Should work for you too since we have the same mobo. Now time to get my vmware/parallels working. Good luck, let me know if you have any problems with it.

DCL said...

Hm... I think it was the ALC_888, both the ALCinject.kext & AppleHDA.kext, not the one I mentioned before, let me know if that works. I did this really late at night, so when I was documenting what I was doing, I probably screwed up. Sorry for the trouble. I just redid mine to test it. Oh and I got the ethernet off of my VMWare working, thnx. Btw, let me know if your sound works.

Koush said...

Awesome, thanks Bevo! I will give this a shot tomorrow.

DreamTheEndless said...

I'm guessing that this only works with EFI motherboards... I have an older dell p4 that has been sitting unused. I want to turn it into an itunes media server and a hardware firewall, but it has a BIOS and not EFI. Are MSI, Gigabyte, etc manufacturing EFI boards yet, or are they still using BIOS? I have friends that work for Intel who were swearing up, down, and sideways that EFI would replace BIOS in the next year, but that was like 6 years ago...

Ok - sorry - enough of my hypercaffeinated rambling - does this method work on boards that have a BIOS?

emartinez said...

OEM DVDs don't work. Confirmed. It gives an error message to reboot and try again