jwallace.us

tech, tunes, and other stuff

How to Install Mac OS X on a PC

Do you find yourself attracted to Apple’s Mac OSX operating system, but you don’t want to spend the money on Apple hardware? Do you just like to play around with different operating systems? Why not build a Hackintosh? Its easier than you might think.

Chameleon Boot Screen

First, I should mention the best place to learn about building and running a hackintosh can be found at Insanely Mac. It is THE forum for the hackintosh community.

You will need a retail copy of Apple’s new OSX Snow Leopard. Its only $25, so there really isn’t a reason not to support Apple.

Also you will need a good PC with compatible hardware. I suggest using Gigabyte mainboards. They are very OSX friendly. I have a GA-P35-DQ6 revision 1.0. Other mainboards will work, but it seems most people use Gigabytes.

I am providing the following instructions as an example of how easy it is to install OSX on your PC. These instructions were taken from tseung’s InsanelyMac guidehere):

Snow Leopard Vanilla Retail Guide for GA-P35-DS4 and other related boards

This is a guide for Gigabyte GA-P35-DS4. It may work on related boards so if it works for you, feel free to report it in this thread. I cannot test much on other motherboards as I only have GA-P35-DS4.

Success has been reported on the following related motherboards: GA-EP35-DS3P, GA-EP35-DS4, GA-EP45-DQ6, GA-X38-DS5, GA-P35-DS3R, GA-EP35-DS3L (ALC888), GA-P35-DS3L (ALC888), GA-EP45-DS3R, GA-P35-DQ6, GA-P35-DS3P, GA-EP45-DS5, GA-P35-DS3, GA-EP35-DS3

Might also work on other GA boards with Realtek ALC889A or ALC888 audio codec.

Success has been reported with the following graphics cards: NVidia 8800GT 512MB, NVidia 8600GT 256 MB, NVidia 9600GT 1024MB, Radeon X1950 PRO, NVidia 7600GT 256MB

Failure has been reported with the following graphics cards: ATI HD3870, ATI 4850 1024MB, NVidia GeForce 7100 GS

Graphics might also work on other NVidia cards without additional kexts added.

Boards with Realtek ALC888 audio codecs requires a different DSDT.aml and a different LegacyHDA.kext in /Extra. I’ve added an experimental installer for this, so let me know it it works. Check the guide to see when to apply it.

If you have a related board, try the DSDT generator first to ensure it can compile a DSDT.aml. Also ensure that there are no “Alias” strings in dsdt_fixed.txt. If so, report it and I will make a fix.

The main goal of this guide is to take most of the manual patching out of installing by providing you with an installer. I’m including the sources so if you are writing a guide and are comfortable with regular expression I invite you to check it out…

I’m also including a standalone DSDT patcher for your DSDT patching pleasure. It is specific for GA-P35-DS4 but I’ve tried to make it relatively easy to modify. It’s based on DSDT Patcher 1.0.1e source code by fassl et al. and How to patch DSDT with LAN and HDEF functions by tmongkol et al. Not all features of DSDT Patcher are implemented but feel free to play with it.

If you act now, I’ll include a script that will enable you to do a full system restore from Time Machine without booting from the retail DVD. That means you can have a separate snow leopard rescue installation. I suggest about 30 GB but it can be smaller if you like.

The boot loader used in the installer is based on Chameleon RC3.

Note that the installer use /var/log/install.log for logging.

This has been tested on a GA-P35-DS4 motherboard (rev 1.0) with the F14 BIOS, Q6600 Quad Core [email protected] GHz (G0 stepping), Nvidia 8800GT 512 MB, 2 GB RAM, SATA hard drive, SATA DVD drive and an Apple USB keyboard. The retail DVD version was 10.6.0 and the Chameleon Boot Loader version tested was 2.0-r640. Install time: approximately 1 hour

For details and screenshots of the BIOS settings go here.

Remember to support OS X by purchasing a genuine retail DVD

Known issues

  • Automatic sleep after a period of inactivity may not work. As a workaround install Please Sleep from here

To do

  • More explicit smbios.plist

Without further ado…

Without further ado…

Prerequisites:

  • A blank CD
  • A SATA DVD drive
  • USB mouse/keyboard
  • An empty SATA GUID partition
  • A retail Snow Leopard DVD
  • EFIStudio (optional) (Get it here)
  • The GA-P35-DS4 Snow Leopard Installer (Get it here)
  • If you have a motherboard with ALC888 audio codec (not needed for GA-P35-DS4), you will need the Snow Leopard ALC888 Installer too. (Get it here)
  • The Snow Leopard Boot CD (Get it here)
  • USB pen drive (optional)

Before you begin:

1) Save your BIOS settings by pressing F11 in the main BIOS screen. Booting from the boot CD will reset your settings. You can load your settings by pressing F12 in the main BIOS screen.

2) Burn the boot cd iso using your favorite ISO burning software.

3) Transfer the installer and optionally EFIStudio or other EFI string generator to the USB Drive. Alternatively, you can download them after installing OS X.

Install Snow Leopard:

1) Insert your newly burned CD into your drive, reboot and press F12 during POST, and choose CD-ROM as bootup device.

2) When Chameleon boots up, insert your Snow Leopard Retail DVD into your drive, then press F5. The Snow Leopard DVD should now show up. If it doesn’t, open and close the drive, and press F5 again. Select the DVD, press -v and press enter.

3) Install OS X. Grab a cup of coffee…

4) Restart. You need to load your saved settings in BIOS before proceeding. You should also exchange the retail DVD with your boot CD. Save your settings (F10) and restart. Press F12 to boot from your CDROM.

5) This time select your newly installed SL partition at the Chameleon main menu. Press -v and enter to get logging. Fill out the various forms. If you do not wish to register with Apple you can press cmd+Q when prompted for your Apple ID.

6) Install GA-P35-DS4 Snow Leopard Installer.

6.1) Only for ALC888 boards. Ignore this step if you own a mb with ALC889A such as GA-P35-DS4! Install Snow Leopard ALC888 Installer.

7) Restart. Again, load your saved BIOS settings and save them. This time, boot from the drive containing your newly installed SL partition.

If graphics works, you are done. Otherwise, move along…

8) Open /Extra/com.apple.Boot.plist in an editor. Remove

1
2
<key>GraphicsEnabler</key>
<string>y</string>

Also check the string under Kernel Flags. Remove -pci0 if present.

If you are using EFIStudio: add Display and then click “Hex String to Clipboard”. Add device-properties to com.apple.Boot.plist and paste the hex string in between tags below the device-properties line.

After this, the com.apple.Boot.plist should look similar to this:

com.apple.Boot.plist
1
2
3
4
5
6
7
8
9
10
11
12
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>Kernel</key>
   <string>mach_kernel</string>
   <key>Kernel Flags</key>
   <string>arch=x86_32</string>
   <key>device-properties</key>
   <string>f2030000010000000 ... A LOT OF NUMBERS ... 6172656e74</string>
</dict>
</plist>

If you’re using a graphic kext instead of an EFI string, your com.apple.Boot.plist should look similar to this:

com.apple.Boot.plist
1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>Kernel</key>
   <string>mach_kernel</string>
   <key>Kernel Flags</key>
   <string>arch=x86_32</string>
</dict>
</plist>

Add the graphics kext to /Extra/Extensions. Restart.

That’s it! You’re done. You should now be booting into Snow Leopard with the correct resolution, network and sound.

If you want your internal drives on your Desktop, click the appropriate checkbox in Finder Preferences.

OSx86 10.6.2 running on my Hackintosh

Alternative install method

If the Boot CD doesn’t work (some ATI graphics cards or IDE DVD drive, for example), you can restore an image of the Snow Leopard DVD to a partition or a USB thumb drive using Disk Utility. Before you can restore the DVD image, you need to scan it for restore (Images –> Scan Image for Restore in Disk Utility). Once the image has been restore to the target partition, run the installer with the target partition as target. You may have to modify com.apple.Boot.plist and add graphics kexts (look in step 8 above).


If something goes wrong…

As mentioned, take a look in /var/log/install.log. If the installer failed there is probably some errors around a “.rb” string. If anyone get errors from patcher.rb, download and install the standalone DSDT generator. This should bail out as well. Attach the output and the dsdt.dsl file to a post in this thread and I’ll look into it.


Details

The installer copies smbios.plist, generates DSDT.aml and adds extensions to /Extra. It also puts a modified ifconfig into /usr/local/bin and a launchd plist into /Library/LaunchDaemons. This is needed for Bonjour to work. It should work with the 64-bit kernel, but I still recommend using the 32-bit kernel.

At the moment, the installer installs these kexts to /Extra/Extensions:

LegacyHDA.kext — audio
NullCPUPowermanagement.kext — Disables AppleIntelCPUPowermanagement.kext
OpenHaltRestart.kext — Fixes restart/shutdown
PlatformUUID.kext — Fixes log warnings about missing UUID for root device
SleepEnabler.kext — Fixes Sleep when AppleIntelCPUPowermanagement.kext is disabled
fakesmc.kext — Simulates the SMC device on macs for decryption etc.

In addition, the Installer sets up GraphicsEnabler.

FAQ

1) My PCI WiFi card isn’t recognized.

Try switching the PCI card to another port. If that doesn’t work, try this: http://www.insanelymac.com/forum/index.php?showtopic=184367&st=240&p=1275952&#entry1275952

2) The boot CD doesn’t work

You either have an IDE drive or you’re using an unsupported graphics card. You’ll need to use the alternative install method in this guide

3) Some hard drives cannot be found in OS X

IDE hard drives are not supported. You may be able to find a kext that works for you on this site

4) My drives do not show up on the desktop

This can be changed in Finder Preferences

5) Can I upgrade to 10.6.1 with Software Update without trouble?

Yes

6) My drives are orange (OS X thinks they are external).

The DSDT sets the drives on the first SATA controller as internal but leaves the drives on the second SATA controller as external to support those of you who use E-SATA. This can be rectified in the DSDT if you want them to be internal but it’s purely cosmetic as far as I can tell. On the GA-P35-DS4, the first SATA controller connectors are yellow, and the second SATA controller connectors are purple

7) My PS/2 keyboard/mouse doesn’t work.

PS/2 is not supported. I believe there is a kext somewhere but USB should work. Make sure to enable USB keyboard in BIOS

8) How do I configure SMBIOS?

/Extra/smbios.plist. Details are out of scope for this guide, so you’ll need to Google. Don’t hesitate to report your findings, though

9) Can I migrate my applications and users from Leopard

*Yes. Use Migration Assistant (included in SL). If your Leopard installation contains extra kexts in /System/Library/Extensions, you may have to delete them in order for SL to work properly. If you’ve used my Leopard guide, you need to remove RealtekR1000.kext and HDAEnabler.kext. *

Sources