First of all let me say that there are numerous guides and plenty of advices and all kinds of forums out there that deal with installing OSX Lion on your PC. However I have noticed that a lot of those are really way to technical and frightening for an average user who just wants to fully understand what's going on and what all this "mambo jumbo" means.

So let me start with a simple guide that should shed some light on how to make a non-standard PC config prepared and made to work 100% fully with the retail OSX Lion installation.

Let's first touch on what specific terms mean so you can get a better understanding what you are actually doing and what you are changing. A while back I started off with whole hackintosh adventure as many of you might and I was completely lost. So much weird code, messing around and I didn't understand squat. But eventually, slowly but surely I started to understand every aspect of this process and that's why I want to share it with you.

Let's start with the terms.

You will see a lot of talk mentioning EFI, strings, device IDs, kexts, repairing permissions, apple boot plist files, chameleon, dsdt files etc. So let's first address all of these so you can feel confident what you are actually doing.

EFI Strings:

example of EFI strings in plist file

The way OSX works is somewhat different from Windows. EFI strings are specific set of settings, xml list items that describe your specific hardware. Be it, ethernet or graphics card or even audio cards EFI strings are internal configuration elements that describe how that device should work and it tells OSX what capabilities of that device are. EFI Strings are generated in a few ways and I will show you later in this guide how and what apps you will use to create your EFI Strings if you need to (usually you need to do this for graphics cards - especially if you have dual cards in your machine) because at boot OSX needs to know how to address these devices in proper order and to understand what their capabilities are.

EFI Strings are usually formatted inside an XML text file and are files that end with the extensions .plist. In some cases they are enough to stay in .plist text format, however sometimes you have to run your custom .plist files through a specific terminal based apps in order to get the output in hexadecimal format. This hexadecimal output is the one you put in a specific boot files on OSX in order for OSX to do it's thing and recognize devices properly. I will show you simple example of this procedure as we go along.

DEVICE IDs:

Device id syntax:

As in any computer, every component you put in your computer will have to be enumerated by it's specific PCI address so the OS (OSX or Windows) knows how to address them. These device IDs differ from motherboard to motherboard and basically describe PCI-E slot 1 and PCI-E slot 2 addresses, then ethernet PCI address etc. Most of the time you don't necessarily have to take care of these as the OS will do it's job but when you are doing OSX on your PC, you might have to know these device ids for your components inside the computer because OSX runs of off EFI bios and EFI bios is in charge of describing these devices to the OSX on a mac. Since you really don't have a real Mac and your PC is using different type of bios, sometimes you have to enter these device ids manually into your EFI Strings in order to let OSX know their addresses and properly recognize them.

KEXTS:

List of system kext files:Kexts are basically DLL files in the Windows world. They are basically "drivers" that are in charge of specific things in OSX. Some deal with Graphics Cards, some deal with power management, some deal with how OSX prioritizes certain things etc etc.

Unlike DLLs in Windows though, you can actually open KEXTs inside OSX to see their contents. They are structured as zip files really and usually contain a Info.Plist file inside that describes all the subfolders and files contained within or a specific configuration elements that make OSX tick.

Some guides will mention that you have to edit that Info.plist or some other .plist file inside these kexts in order to adjust (add/remove) certain strings so your custom PC hardware might work that wouldn't otherwise work automatically with OSX.

There are also .kext files made by the OSx86 community that act as patches to the OSX system in order to make certain things work that are not included in OSX by default. One such .kext you might see often mentioned is ATY_Init.kext (by Netkas). This kext basically describes some ATI and Nvidia cards not usually supported by OSX and helps those cards in your custom PC to be recognized by System Profiler in OSX. Naturally, this is just one example, but kexts are basically meant to add functionality to OSX and enable/modify devices and system to work you need it to work.

In case of newer ATI cards, you might see specific kext sets people share with each other (from Apple Mac Book Pro for example) because those kexts add support for some newer ATI cards that older macs might not have that you can use on your Hackintosh to enable the latest cards etc.

I hope you are getting the picture.

REPAIRING PERMISSIONS / REBUILDING SYSTEM CACHES:

Unlike Windows, every time you mess around with specific kexts, you change the .plist files in them or just overwrite some system kexts with the modified ones you ALWAYS have to repair permissions and rebuild system cache so the OSX knows something has changed and basically syncs caches and permissions to the way it likes so it can work. Failure to do this, in many cases, will cause kernel panics, blue screens or just end up with blank screen and your computer will keep rebooting. So make this a habit and every time you change a .plist file, or copy/overwrite/change kexts in the system folders, you have to run a specific app/procedure that will rebuild caches and repair user permissions.

FILE LOCATIONS, BOOT FILES and what S/L/E means:First time I started messing around with this a while back I always thought S/L/E meant something like Snow Leopard extensions or something . But naturally I was wrong about that. If you are total noob you will see a lot of people using S/L/E shortcut for actually describing the path to the specific system files folder. This is a path to System/Library/Extensions folder in OSX.

Now, I see a lot of people having issues finding this folder on their fresh installed OSX, or have trouble finding com.apple.Boot.plist. The reason behind this is because OSX Lion by default hides these folders from you. What you have to do is enable full hard drive view and make that a starting point for your Finder and not the default user folder which OSX Lion defaults to every time you open the Finder.

Here's how to do that:

Go to preferences in Finder

Check under DEVICES your name of the machine (in my case at the bottom you will see Boz's Mac Pro):

you can also enable your hard drives and other things to show on your desktop

Now if you notice, where it says New Finder windows show "All My Files". You should make that to your computer's name so every time you open Finder it will default to the root of your computer instead of user folder.

I'm talking about this simply because a lot of users ends up looking in their user folder where there isn't Library folder anymore and they say they can't find S/L/E or Library folder. Well this way you will see it.

When you open the Finder on your computer and you click on the OSX Lion installation drive you will see this:

Extra folder you see there is something we will talk about later and how that folder appears there. But for now, it is important to note that location of LIBRARY and SYSTEM are here. Now, don't be confused, inside System folder, there will a Library folder AGAIN. That's fine and that's why the shortcut is S/L/E.. the Library at the root holds somewhat different files and you will see the the distinction being made clearly.

Now let's address a few important paths you will need to know/remember:

1. com.apple.Boot.plist (this is the main descriptor file for OSX when it boots. Usually here is where people who install OSX on PC modify and add specific <key> tags with <string> element so OSX can look and recognize hardware, specific OS related attributes when it boots as PC needs some settings there in order for you computer to boot properly. Important to note is that this file doesn't have much of a role if you install Chameleon Boot Loader. When you install Chameleon your boot file is located in a different place and com.apple.Boot.plist doesn't really mean a lot but instead you have to make the mods you would normally do in com.apple.Boot.plist, you would do it in chameleon boot plist file.

2. OS Lion Drive > System/Library/Extensions - this is where you will be dealing with kexts (if you ever need to)

4. OS Lion Drive > Extra (this is where Chameleon puts it's org.chameleon.Boot.plist which is basically a replacement for the com.apple.Boot.plist and where OSX will look for first instead of default com.apple.Boot.plist)

CHAMELEON:If you don't know what Chameleon is.. I will try to quickly explain here. It's basically a boot loader for OSX that will allow you to boot the OSX directly from the hard drive as it will emulate some EFI Bios functions and trick OSX that it's running on a real mac. Chameleon also allows you to dual boot and do some command line stuff if you need to troubleshoot OSX startup. The way it works is that it puts itself between the native OSX files and your hardware and tells OSX what it needs in order for it to boot properly. This is why it's using it's custom org.chameleon.Boot.plist that serves as native com.apple.Boot.plist file.

DSDT files:DSDT files are basically mostly used to describe your motherboard functionality to OSX. Without it, it gets a lot trickier and requires hacking because a lot of interrupt codes and device IDs and whole bunch of other functionality needs to be described and some other mambo jambo has to be put in there and compiled into it for all motherboards working on the PC. It's pointless to get into modifying and creating/editing DSDTs because if you have to do that, it can become complicated very quickly and you will most likely screw something up

Without DSDT, you can still install OSX in most cases but it becomes a bit more problematic as the generic DSDT files made by people like Netkas, TonyMacx86 and others might not work with your board so it's trial really.

The first thing you look for when you want to install OSX on your PC is the existence of DSDT file for your motherboard. If you can't find you can still try to go with alternate procedure (I will briefly touch upon later) but it will be uncertain whether or not everything will work as it should.

BASIC INFO WRAP UP:So, when we addressed most of the things you need to understand if you never really dabbled with OSX on PC or whatever, it should at least make it a bit less frightening for you to try setting things up.

Below I will show you the procedure on how to install OSX Lion 10.7.2 on a ASUS P6T motherboard with it's own built-in ethernet and Realtek ACL 1200 audio chipset as well as dual graphics cards (GTX 580 1536mb and GTX 275 as a secondary). I will include all the files you will need for this guide in case you have a similar configuration or just want to take a peak at the files and get the utilities I used.

This guide will basically cover a complex scenario (dual cards) and getting all this to work as it should. You can apply this guide to your own setup even if it's not the same.

Thank god we have OSX86 community going so strong. Some of the brilliant guys like Netkas (http://netkas.org/), TonyMac (http://tonymacx86.com/), the guys from iAtkos, Kakewalk and others and especially InsanelyMac forums who helped me a lot in debugging some things I had with my initial installations and helping me understand what was going on.

Before you start your installation, make sure you read up a few other sources that will help you decide what would be the best route for you installation or whether or not there are DSDT files for your motherboard and your graphics card etc. My personal opinion is that at this time, the least painful route, with legit vanilla OSX 10.7.2 install is to use TonyMacx86 Unibeast (USB Drive installer for OSX Lion 10.7.2), TonyMacx86 Multibeast 4.2.1 (post installation utility) or above for Lion 10.7.2 and then just add your own kexts for ethernet, audio and if you have dual cards to enter EFI strings for your devices as a hexadecimal format into the chameleon boot plist.

Sometimes TonyMac won't have it but you can look google, insanely mac forums to see if someone has a DSDT file for you motherboard. I did the same thing and found a DSDT for my ASUS P6T motherboard.

So assuming you looked around a bit at these forums and wikipedias here is what you will need to get started:

Unfortunately the easiest way to prepare your OSX Lion installation is to have access to a Mac and follow TonyMac's Unibeast procedure in creating a nice USB Installer with vanilla OSX Lion 10.7.2 you downloaded from an app store.

What's great about this approach is that it will allow you to have a USB drive you can boot from and everything will be much faster when installing but it makes it much easier to put additional files on the USB stick in addition to the installation files.

Once you have prepared the USB stick, you want to put a few additional files on it so they are always accessible to you.

Your motherboard DSDT.aml file. Now, keep in mind, you might see some DSDT files in .dsdt format. These are human readable files. You need DSDT.aml file for your motherboard. TonyMac has a list of DSDTs as mentioned previously here: http://www.tonymacx86.com/dsdt.php

Put KextBeast app on the USB from TonyMac as well from here: KextBeast

Try to find your ethernet and audio kexts online (in my case it was ALC1200_1063 kext and RealtekR1000SL.kext - I found those on InsanelyMac forums). If you can't find them, Multibeast comes with VoodooHDA universal kexts for Audio and has 3 different "universal" kexts for Ethernet.

Now, VoodooHDA might be flakey and is really a gamble. You will have least trouble if your motherboard has one of the Realtek audio chipsets. That's why Gigabyte boards are so popular for OSX installs. It's because they have the ALC 8xx audio chipsets.

For ethernet these are the choices that come with Multibeast:

In any case.. It's best not to pick anything here and just use UserDSDT install and then locate the appropriate kexts yourself. Picking the wrong ones from Multibeast install might cause kernel panics and you might have to reinstall everything again. If you are absolutely sure what you have you can pick it but be careful there.

Next we will put OSX86Tools and gfxutil files on the USB stick as well. (OSX86Tools and gfxutil help you create EFI Strings for your video cards, ethernet and also gfxutil allows you to see your video cards or ethernet cards device IDs in the system). It will all be clear when I show you my installation.

Next thing you need to put on a USB drive is GTX5xx enabler if you have GeForce 5xx card. You can download it here: http://www.osx86.net...xx_enabler.html (you don't need CUDA version only the regular one)

Last software you want to put on your USB is PListEditPro. Take it from here: http://www.fatcatsof...m/plisteditpro/
This app allows you to easy edit plist files when you want to create your configuration plist you will enter into com.chameleon.boot.plist as a hexadecimal string. It will all makes sense later

Okay.. now when you put all these files on the USB you are ready to start installation.
ON TO THE INSTALLATION:

First let's try to make sure you BIOS settings are set properly.
In the beginning, you had to be careful with all kinds of BIOS settings. These days it's a bit less problematic. The 2 most important things are that your hard drives are set to AHCI and that your Power Management is set to S3. Make sure you turn off anything you don't really need like Firewire or 3rd party controllers if you don't use them. If you are using Gigabyte boards and you are using dual cards you might have to set your card order to boot from PEG2 in BIOS and set your primary graphic card into second PCI-E slot. Set your machine to boot from USB you created with Unibeast

One you set BIOS, save and let the system boot up from USB.

You should see the installation procedure begin from OSX and you want to make sure that the drive you will be installing the OSX on is on one of the primary SATA connectors.

Before you install OSX, run Disk Utility from the installer (from the top bar) and make sure you partition your drive as a single partition and click advanced to set it to be GUID partition type.

When you did that, you can close the Disk Utility and continue installation.

When the installation is done, you should reboot, and when the USB boot screen starts again you will pick OSX drive from it you installed it on (you will see there USB, maybe additional drives, and the OSX drive). You pick OSX drive to boot into the fresh installation of OSX. Why you need to boot from USB in this case is because you still need those memory hacks for EFI Bios for OSX to boot. So USB serves that purpose until you have Chimera/Chameleon installed as a boot loader. Then Chameleon will do that job and you won't need the USB stick anymore.

Okay, now you have first time setup for your OSX happening and you can enter your details there. Once you are done it should show you the desktop. Keep in mind that if you have multiple cards, they won't work and you will only see the single monitor output and probably 1024x768 resolution.

Okay.. at this point you want to copy your motherboard DSDT.aml file on your desktop, also if you have additional kexts like audio and ethernet kexts you want to put them on your desktop too. The reason we put them on the desktop is when you run Multibeast, it will read DSDT.aml from the desktop and KextBeast will also take those kexts from desktop and install them by just clicking on KextBeast.

Okay, now at this point, I ran the Multibeast like this:

UserDSDT Install (it will pick up my DSDT from the the desktop and do some necessary patching)

System Utilities (Repair Permissions)

3rd Party SATA kext installation

OpenCL Enabler for 10.7.2 from Graphics

Bootloaders>Chimera (this is the installation of Chameleon)

Mac Pro 5.1 profile install

I chose Chameleon theme

OSx86 Software (this is Kext Utility, ShowAllFiles utilities) - Kext Utility is helping you repair system caches and permissions for the System/Library/Extensions folder

If you have questions feel free to ask. I'll try to explain questions you might have about this procedure.

I hit CONTINUE and wait for a while for Multibeast to do it's thing. When it's done.. DO NOT restart.

Now, it's time to get these Audio and Ethernet kexts installed. Very simple. Just run KextBeast from your USB drive. it will do the thing.

Okay.. At this point you want to run Multibeast again, but this time just select SYSTEM UTILITIES and nothing else. Hit Continue to repair permissions. Once it's done, go to Applications and run Kext Utility. Kext Utility should repair system cache too.

Okay.. great.. so you made it so far..and we are getting there. Now, in my case, since I have 2 graphic cards, In order for OSX to recognize your EFI strings you need to create .plist for your graphic cards with appropriate device ids and settings for the cards (DVI and all that) and then export/convert that with gfxutil to hexadecimal string. Now, when you have that, we will put that hexadecimal string in the org.chameleon.boot.plist with a device-properties key.

To save on typing, I will link you to a great guide how to edit the PLIST, and add your graphic card stuff and if you have multiple cards. This guide is only dealing with the com.apple.boot.plist file instead of org.chameleon.boot.plist. DO NOT, put hex code from that guide you created into com.apple.boot.plist. You will put it in org.chameleon.boot.plist. You just have to make sure you save your generated hex string so we can add it later into org.chameleon.boot.plist in a format like this:

<key>device-properties</key>
<string>YOUR HEXADECIMAL STRING HERE YOU GENERATED FROM THE GUIDE</string>

But in essence, here's what you are doing here. You are using gfxutil -f display to read the device ID of your motherboard PCI-E slot address where your primary graphic card is located. Now, you can't do it with 2 cards plugged in. So the most annoying thing is that you will have to keep 1 card plugged in, run gfxutil -f display when you boot up write down the PCI id, then powered down, take the card out, put the other card in (but in the PCI-E slot it will be in permanently) and then do the same thing, boot up, run gfxutil -f display and write down that device ID. They should be different.

One important thing here to note if you are dealing with GTX 580 or GTX 275 is the VRAM id.

then i generated hex file by using gfxutil and put that hex string into my org.chameleon.boot.plist.

It is VERY VERY important if you have 2 video cards to change device-type inside the plist when you are creating it to be NVDA,Parent for the primary card and NVDA, Child for the secondary card. You need to do this because if you don't your system will either blank out on start or it will kernel panic. This is what I'm talking about if you read that guide I linked to in point 15.

Okay.. after we generated the HEX file as that guide helped you with and you are ready to add it to your org.chameleon.boot.plist, this is what your org.chameleon.boot.plist should look like:

If you have GTX 5xx card, we want to run GTX5xx Enabler now from USB drive. Important to note is that this installer will require you have some parameters in com.chameleon.boot.plist file and we will make sure that's in there after you install it. You also want to remove AppleUpstreamClient.kext from System/Library/Extensions before you install it. Now, go ahead and install the the GTX5xx enabler.

If you don't have GTX 5xx you don't need to install GTX5xx installer but it won't hurt because it will patch some files that will basically add specific GTX5xx card descriptions in appropriate system kexts and modify a few things to get CI/QE working (CI = Core Image, QE - Quartz Extreme)

What we want to do is make sure that all of your parameters are properly set in org.chameleon.boot.plist. To do this, you will go to OS Drive>Extra and open with TextEdit org.chameleon.boot.plist. It should look like this (look at that line that says npci=0x2000 and Graphics Enabler YES. You might not have PCIRootUID=1 in there so you want to make it look like mine below:

Okay.. after all this.. you should be set. You need to run Multibeast as before with SYSTEM UTILITIES only set to repair permissions and run Kext Utility to redo system cache and then you can reboot.

At this point, you should have both cards running, recognized in the System Profiler, monitors working and your resolutions native to your screens. If you installed GTX5xx enabler you should also have CI/QE working (you can know that right away if you look at the OSX task bar and you see it transparent)

A few screens of installed machine with dual GPUs and everything working.