Saturday, January 12, 2008

Hack Attack: Build a Hackintosh Mac for Under $800
Tech tricks, tips and downloads for getting things done.
SAN DIEGO, 11:50 AM, SAT JAN 12
12 POSTS IN THE LAST 24 HOURS | RSS
EDITED BY GINA TRAPANI | tips@lifehacker.com
« || next »
Hack Attack

Build a Hackintosh Mac for Under $800

hackintosh-head.png
If the high price tag for Apple hardware has kept you from buying a Mac but you're willing to roll up your sleeves and get adventurous, you can build your own "Hackintosh"—a PC that runs a patched version of OS X Leopard. What?!, you say. Apple's move to Intel processors in 2006 meant that running OS X on non-Apple hardware is possible, and a community hacking project called OSx86 launched with that goal in mind. Since then, OSx86 has covered major ground, making it possible for civilians—like you and me!—to put together their own Hackintosh running Mac OS 10.5. Today, I'll show you how to build your own high end computer running Leopard from start to finish for under $800.

Right now the cheapest Mac on sale at the Apple store is a $600 Mac Mini sporting a 1.83GHz proc, 1GB of RAM and an 80GB hard drive. For $200 more, your Hackintosh can boast a 2.2GHz proc with 4GB of RAM, a 500GB drive, and a completely upgradeable case for expanding your setup in the future.

Building a DIY Mac requires some work on your part, so be ready to dedicate time to this project. To make things as easy as possible, I'm going to lay out how I built my Hackintosh from start to finish, from the hardware I used to the final patches I applied to the Leopard install. If you can build a Lego set and transcribe text, you've got all the basic skills required.

The Hardware

There's no definitive best bet for a Hackintosh hardware configuration, so you may be able to experiment and come up with a better selection of parts than I did. However, I can guarantee that Leopard will (or at least has) run successfully on this hardware setup.

build-parts.JPGTo make things easy, I've put together my entire hardware setup as a wish list on Newegg. (You may notice that the total price is listed at around $850, but I knocked $110 off the price tag due to a couple of mail-in rebates—so "Under $800" it remains, however fudgingly.)

The build consists of a 2.2GHz Intel Core 2 Duo processor, a total of 4GB of RAM (four sticks at 1GB each), an ASUS P5W DH Deluxe motherboard, a GeForce 7300GT (the same basic video card that comes installed in the default Mac Pro configuration), a 500GB hard drive, a DVD burner, and an Antec Sonata case (which I've always liked for its looks and quiet fans). The motherboard is the most important element, since the patches we'll apply later are tailored specifically for this motherboard. You could probably tweak a lot of the other hardware without many complications, but if you stick with this motherboard and follow the installation instructions, you shouldn't see any major complications.

The Build

Now that you've got all the parts, it's time to start putting your Mac together. We've detailed every step of the computer building process at one point or another in the past here on Lifehacker, so rather than cover that ground again, I'll outline the process with links to our previous instructions. As always, be sure to read your hardware manuals before you begin—particularly from the motherboard—to get to know your hardware before you start the installation. Also, always remember to be careful of static electricity and always keep yourself grounded and your board unpowered until you're finished.
  1. Install the motherboard and CPU: You can follow these instructions almost without variation, but the heatsink and fan installation, in particular, is a touch different. Rather than hooking the heatsink to your motherboard, the included Intel heatsink pops into place. For a more detailed description of how this works, consult your motherboard's manual and the manual included with your processor.
  2. Install your RAM: The only thing you need to keep in mind when you're installing the RAM is that you should install the matched pairs—that is, the pairs that come in the same package—in like colored slots. This isn't strictly necessary, but it's a good practice and generally means better performance.
  3. Install the video card: These instructions actually detail how to install a PCI card, which is just a more general way of looking at your video card. The card we're using is a PCI Express card and should be installed in the top (orange) PCI slot.
  4. Install the hard drive and DVD drive: Your hard drive is an SATA drive, which is not the type of drive installed in the instructions (though they do address SATA drives). Just connect one of the power supply's SATA power cables to the drive and then connect the drive to the red SATA connector on your motherboard (it's labeled on the board as SATA1). Follow the same basic instructions to install your DVD drive but plug the drive into one of the other SATA ports (I used the SATA4 port).

When you've finished putting everything together, your open case should look like the nearly completed image below. In that picture, I've yet to install the hard drive and DVD drive and I still need to connect the case power and other connectors to the motherboard. (You may install other features of the motherboard if you prefer, like the FireWire connector for the back of the case).

To make sure everything's working properly, close it up, plug it into a monitor and keyboard and power it up. If the computer boots into the BIOS (by pressing Delete when prompted), you're ready to move on. If the computer won't boot, you may have to open the case back up and double-check your installation. Among other things, be sure that your RAM is properly seated.

nearly-finished-build.JPGI should note that at this point of my installation, I ran into a bum power supply unit (PSU) in my case. Unfortunately that meant that I didn't know whether the PSU was bunk or my motherboard was fried, and since I don't own a voltage meter it took an extra trip to Fry's and some troubleshooting to get to the bottom of it. The point is that when you're building a PC yourself, you can and should be prepared to run into snags, so if you're not ready to troubleshoot if a problem arises, you may want to think twice before trying this. That said, I've built several PCs in the past and this was my only major snag in the course of a build, so it's also very likely that your build could go off without a hitch.

Either way, as soon as you're able to boot into the BIOS, you're ready to get started with the pre-installation.

Pre-Installation

There are two things you need to tackle to prepare your computer for installation. First, you'll need to tweak your BIOS settings to properly work with the Leopard install. Second, you need to patch the Leopard DVD to install on your newly built Hackintosh computer.

Tweak your BIOS: The first thing I did once my build was finished was update my BIOS, since the default BIOS wasn't properly recognizing my processor. Luckily doing so is pretty simple. Just head over to the ASUS download site, narrow down, and then download the latest BIOS for your motherboard. Once downloaded, just stick the file on a USB flash drive. Then boot up your build and enter the BIOS setup. Like I said above, power on your computer and hit Delete when prompted to boot into the BIOS.

Once you're there, arrow to the Tools tab of the BIOS, select EZ Flash2, and then hit Enter. Now choose your flash drive by tabbing to the appropriate drive, find the BIOS file you downloaded, and install it. When the BIOS has updated, your computer should automatically restart.

Now that you've updated your BIOS, you're ready to get into some nitty gritty preparation. If you plugged in your drives like I suggested during your build, you should see your hard drive and DVD drive listed in the BIOS as Third IDE Master and Fourth IDE Slave. (Don't worry about the fact that your hard drive isn't listed as the Primary IDE Master.) Arrow down to IDE Configuration and hit Enter.

ide-config.JPGIn the IDE config, you want to set "Configure SATA As" to AHCI. Next hit Escape once to go back to the Main screen. Now hit the right arrow key to move to the Advanced tab. In the Advanced section go to "Onboard Devices Configuration" and set "JMicron SATA / PATA Controller" to Disabled.

Now you need to arrow over to the Boot tab to configure the boot priority (which tells your computer what order you want to boot off devices in your computer). Go to "Boot Device Priority" and set your DVD drive as priority one and your hard drive as priority two.

Done? Then you're ready to move onto patching your Leopard DVD.

Patch Leopard for your Hackintosh: There are a couple of different ways one could go about creating a patched Leopard DVD. The easiest is probably to download an already patched version using BitTorrent (I can attest to having seen the patched version floating around before Demonoid went under, but it's probably available elsewhere as well). The second method requires patching a Leopard DVD yourself, which isn't really as hard as it sounds.

If you decide to go the first route and you find a pre-patched version off BitTorrent, you can skip to the next section. Otherwise, let's get down to work. To patch the Leopard install disc, you'll need a Mac and a pre-patched image of the Leopard installer on your desktop. You can get this in two ways: Either by downloading the image—again with BitTorrent—or by buying and then ripping a Leopard DVD to your hard drive. Either way you choose, when you're finished you should place the ripped installer on your desktop and make sure that it's named osx-leopard105.dmg.

Now it's time to get patching. To do so, you need to grab the patch files (created by the resourceful OSx86 forum member BrazilMac, who bundled the patch files and whose instructions I followed for the installation), which you can download from one of many sources here under the "FILES FOR THIS GUIDE" section at the top of the page. After you've downloaded the zipped patch files, unzip the archive and drag all of the contents of the archive to your desktop (it should contain two files and three folders in total).

UPDATE: We've removed direct links to the forum post containing the patch files on the OSx86 Scene Forum.

Now open the 9a581-patch.sh shell script in your favorite text editor. At the top of the file, replace XXX with your username on your Mac (so that it reflects the path to your current desktop). For example, mine would look like:

APDIR=/Users/adam/Desktop
DMG="/Users/adam/Desktop/osx-leopard105.dmg"

While we're at it, let's edit the 9a581PostPatch.sh file as well. This time, edit the fourth and fifth lines at the top of the file to look like this:

PATCH="/Volumes/LeopardPatch/leopatch/" # path to the patched extensions
LEO="/Volumes/Leopard" # path to Leopard installation

Save and close both files.

Finally, it's time to patch the DVD. Open up Terminal, type sudo -s, then enter your administrative password (your login password). Then type cd Desktop and hit Enter. Now you're ready to apply the patch. Keep in mind that you'll need plenty of space on your hard drive to perform the patch. I had around 20GB of free space when I did it, though I'm sure you could get away with less. To execute the patch, type:

./9a581-patch.sh

and hit Enter. The patch will now execute, which means you've got some time on your hands. You've been working your ass off up until this point, though, so kick back and relax for a bit. I didn't have a clock on it, but I'm pretty sure the patch took at least an hour on my MacBook Pro.

If you have trouble with the patch and you've got less free space, try freeing up some hard drive space and trying again. When the patch has successfully completed, you should see a new file on your desktop: Leo_Patched_DVD.iso weighing in somewhere around 4,698,669,056 bytes. Now we've got to burn this image to a DVD.

burn-install-disc.pngLuckily the patch removes lots of unnecessary files so we've shrunk the almost 7GB install DVD to 4.38GB, just enough to fit on a single-layer DVD. To burn the image, insert a blank DVD, open up Disk Utility, select the Leopard_Patched_DVD.iso file in the sidebar, and then click the Burn button. Once it's finished, you're finally ready to proceed to the installation.

But just one more thing before you do. Copy the patch files that we just unzipped from your desktop to a USB thumb drive and name the drive LeopardPatch. We'll need these files for the post-installation patch that we'll apply later.

Installation

If you've followed all of the steps up to this point, you should now be ready to fire up the patched Leopard install DVD. So power on your Hackintosh, insert the DVD, and let the boot process begin (you did remember to set the DVD drive as the first boot device, right?). You'll be prompted to press any key to start the installation or hit F8 for options. Hit F8.

You'll now see the boot: prompt. Enter -v -x and press Enter. (Don't ask me why, but this is the only way the install DVD would boot for me. Not using these options caused the boot to hang indefinitely every time.) You should now see lots of text scrolling over your monitor. You may even see some daunting errors. Don't be alarmed; just let it continue. After several minutes, the graphical Leopard installer should be staring you in the face.

start-disk-utility.pngFormat the install drive: I know that you're raring to install now that you're finally here, but there's one thing we need to do first: Format our hard drive so that it's prepared to receive the Leopard installation. So go to Utilities in the menu bar and select Disk Utility (if you don't have a working mouse yet, you can still access the menu bar from the keyboard). Once Disk Utility fires up, it's time to format the drive. Here's how:

mbr.png

  1. Select your hard drive in the left sidebar.
  2. Click on the tab labeled Partition.
  3. Select a 1 partition Volume Scheme, name the volume Leopard, and choose Mac OS Extended (Journaled) as the format.
  4. Last, click the Options button and choose Master Boot Record as the partition scheme.

Now that your drive is ready, so are you.

Install Leopard: This really is the easiest part—just follow the on-screen instructions and choose your newly created Leopard partition as the install destination. Then, before you make that final click on the Install button, click Customize and de-select Additional Fonts, Language Translations, and X11. These components were removed so we could fit everything on the patched DVD, so we won't be installing them now.

Now you're ready. Click install and grab a quick drink. In around 10 minutes, Leopard should have installed, leaving you with just one more step before you're running with the Leopard.

Post-Installation

install-success1.pngAfter the installation completes, your computer will automatically restart. Unfortunately you're not ready to boot into Leopard just yet—you've got one thing left to do. So insert the thumb drive you copied the patches to and, just like last time, hit F8 when prompted by the DVD. Again, enter -v -x at the boot prompt and hit Enter. When the install disc finally loads, go to Utilities in the menu bar and select Terminal. It's time to apply the post-install patch.

post-patch.JPGWhen terminal loads, type cd /Volumes/LeopardPatch at the prompt and hit Enter to navigate to the patch directory. Now, just like when you patched the install disc, type:

./9a581PostPatch.sh

...and hit Enter. The script will move and copy files about (answer yes when prompted), and when it's finished, you'll be prompted to restart your computer. When your computer reboots this time, you're ready. It's time to boot into Leopard.

OSx86 on Your Hackintosh

Let your computer reboot, but be sure to leave the install DVD in the drive. When the DVD prompts this time, just let the countdown time out. When it does, your installation of Leopard will automatically boot up. You've done it!

about-my-mac.pngFrom this point forward, you're running Leopard on your PC just as though you were running Leopard on a regular Mac. You'll be jubilantly welcomed in a handful of languages as if Steve Jobs himself is shaking your hand for a job well done. All of your hardware should work exactly as you'd expect. Your sound, networking, and video will all work off the bat. (I haven't tested the motherboard's built-in wireless yet, but it reportedly works.) Your iPods will sync flawlessly, and CDs and DVDs read and burn just as you'd expect.

On the software front, Mail, Address Book, iTunes, and everything else I've tried so far work flawlessly. Firefox is browsing, Quicksilver is doing its thing, Spaces are rocking, Stacks are stacking, Cover Flow is flowing, and Quick Look is previewing. I haven't tried Time Machine yet, but the patch we used reportedly works with Time Machine as well.

UPDATE: After you complete your install the first go round, here's how to upgrade to OS X 10.5.1 (the first update to Leopard) in just a few simple steps.

But Really, How Does It Work?

http://lifehacker.com/assets/resources/2007/11/hackintosh-with-lifehacker%201-thumb.pngI'm still stretching my legs in this new build, and I'm planning on bringing some benchmarks to the table soon so you have a better idea how this machine matches up to its Mac counterparts, but so far it's running like a champ. UPDATE: I benchmarked my Hackintosh against a Mac Pro and MacBook Pro and it stood up very well. Check out the benchmarks here. The only problem with the install at the moment is that it won't boot without the Leopard DVD in the DVD drive at boot—meaning that every time you reboot you'll need to make sure that the Leopard DVD is sitting in the DVD drive. It's not a dealbreaker for me by any means, but it's an annoyance. I've found one post suggesting a workaround at the OSx86 forums (near the bottom of the first post in the thread), but I haven't tried it yet. If and when I do, I'll be sure to post an update.

And that's that. It's a chore to set up, to be sure, but it's also the most powerful Mac per dollar I've ever used. If you've got any experience building a Hackintosh of your own or you've got any questions, let's hear them in the comments.

Adam Pash is a senior editor for Lifehacker who loves a good hack and cherishes his Macintosh, so building a Hackintosh was a perfect fit. His special feature Hack Attack appears every Tuesday on Lifehacker. Subscribe to the Hack Attack RSS feed to get new installments in your newsreader.

No comments: