Sunday, April 19, 2009

OSX on the P5B-VM

Since I don't like learning things more than once, I've decided to write down all of my notes regarding the installation of Mac OSX on my PC.

WARNING: I do NOT, in any way, condone piracy!! If you want to run OSX, then you either need to own a Mac or buy the software separately. Otherwise, you will, more than likely, burn in hell. OSX (Aqua in particular) is pretty high-quality stuff and you need to ante up for it.

Hardware:
  • Motherboard: Asus P5B-VM
  • BIOS: AMIBIOS v1001 (7/25/07)
  • Processor: Intel Core2 Duo 2.66 GHz
  • Memory: 2 GB DDR2 RAM
  • Graphics: Nvidia Geforce 9600 GT (1 Gb RAM)
  • Controller #1: Southbridge SATA (comes on MB)
  • Controller #2: JMicron JMB363 PATA/SATA Controller (comes on MB)
  • Network: Integrated Realtek RTL 8168/8111 (comes on MB)
  • Sound: Integrated Sound MAX Digital HD AUdio (comes on MB)
  • Hard drives: Two Western Digital SATA 500GB hard drives
  • Optical: Two LG Internal/GH22 DVD-RAM drives
BIOS settings of note:
(At some point, I ran across folks on the interweb who said the following helped them out. I don't know which ones are required for my setup and which ones aren't, but it should provide you with things to look at when looking to get things working.)
  • SATA -> Enhanced
  • USB -> Legacy USB Support -> Auto
  • USB -> Port 64/60 Emulation -> Disabled
  • USB -> BIOS EHCI Hand-off -> Disabled
  • Graphics -> Initiate Graphics Adapter -> PCI/PEG
  • JMicron -> SATA/PATA Controller -> Enabled
  • JMicron -> Controller Mode -> AHCI
  • HD Audio Controller -> Front Panel Support Type -> HD Audio

NOTE: There may be other configurations that work. Mine is the way that I chose to set it up. I would have done it differently had I had a choice, but this is the way it ultimately ended up working on my box.

I purchased some licenses for Leopard 10.5.6. However, installing from those install media onto a bare-metal PC can be difficult. Feel free to check out something like Boot-132 if you're feeling bored. I ended up getting my hands on a copy of iDeneb 1.4 (Leopard 10.5.6). The OS will install from the iDeneb DVD and, therefore, your purchased Leopard discs are not needed for the install. You should buy them, regardless.

Before we begin, a little background knowledge to help with the learning curve. Drivers on OSX are handled just like kernel modules in linux. However, in this context, a kernel module is called a "kernel extension" (or, kext for short). Just like linux (modload, modprobe, etc), OSX has it's own commands that you can use at the CLI. The three that I became most intimate with were kextstat (list loaded extensions), kextload (load an extension), and kextunload (duh). The directory that you will want to pay attention to when loading/unloading kexts is /System/Library/Extensions. This is where the kexts are stored. Remember that a kernel extention will NOT be loaded unless there is some hardware that needs it. If you want to remove a kext from the filesystem to keep it from being loaded automatically on bootup:
  1. cd /System/Library/Extensions
  2. rm -rf
  3. cd ..
  4. rm -f Extensions.mkext (this is some cache file for extensions. don't forget this step)
(Often, just to be safe, I'd move the kext directory elsewhere instead, but still delete the cache file. I'm paranoid like that. )

NOTE: I am NOT a MacOS expert, by any means. This is my first endevor. I'm approaching this from the perspective of a die-hard Linux user. If these methods seem awfully hackish, it's because they ARE. :)

Some tips about the iDeneb boot disk:
I must have run that frig'in OSX installer 30 times or so trying to find the correct synergy between the hardware, the OS, and the BIOS. My advice, if your first install tanks and you find that it's due to a kernel panic, try to fix it manually! Don't just reinstall!! If you boot your install disc again, the Utilities menu will have a Terminal that you can open and use. Furthermore, the partition on that disc that you did the previous installation on should have already been mounted to /Volumes/System. Trying to fix it yourself as opposed to re-installing over and over again will familiarize yourself with the system a tad more. If you paid attention to the kernel panic and wrote down the details of what caused it, check out your kexts and see if it helps to remove the offender. Don't worry...if you do irreperable harm to the previous install, then you can always run the installer again.

If you are NOT seeing a kernel panic, but instead, getting stuck in "reboot hell" (the continuous rebooting of your box upon trying to load the OSX kernel), just do the re-install. Don't bother doing anything manually.

STEP 1: Hardware
Initially, I couldn't get this stuff to install on the hard drive that was connected to the internal SATA/PATA ports. I read several places that the boot drive needs to support AHCI. Unfortunately, in this version of my MoBo's BIOS, there is no way to explicitly set that. HOWEVER, the BIOS does allow you to set the mode on the single JMIcron controller SATA port to AHCI. Do it and make sure that your OSX boot drive is plugged into it.

I also read in various places that it helps to use SATA DVD drives. I don't know if this is required or not, but I made sure to have that in my setup.


STEP 2: Install from the iDeneb 1.4 media
Boot the iDeneb DVD. I'm not going to spend much time here because the tools should be simple enough for anyone to figure out how is saavy with this type of stuff. If you're not, then these notes are NOT for you.

Once you get to the part where you choose your install disk, go to the Utilities menu and open the Disk Utility. This will allow you to partition your drive as needed.

NOTE: I found one guy who claimed that his intalls never worked unless he formatted his install partition every time he ran the installer. I don't know about that, but I DID get into the habit of using the Erase button on that partition every time before I re-installed.

Once you get it partitioned, exit the Disk Utility and, hopefully, your drive will show up in the list. Select it and continue.

Do NOT simply continue from the next screen. YOU NEED TO CUSTOMIZE YOUR INSTALL FIRST.

NOTE: It's probably wise not to customize ALL of your stuff at this point. Figure out the minimum needed to get your machine booting and be happy if it does. DON'T select anything to do with audio or network.

Everyone whose posts I read said that the vanilla kernel should have worked on my MoBo/CPU. It never did. I always got stuck in reboot hell. Instead, use the plain Voodoo kernel. It kernel panic'd on me at first, but at least I could see the errors, boot the install disc, and fix the kexts manually.

Also, since the boot disc is on the JMicron controller, make sure to select that option.

Also, I used NVDarwin (1 GB RAM) option and my card works flawlessly with it.

Also, make sure to install some of the OSX apps in the list as well. I found OSx86Tools, BetterZip, and Kext Helper b7 to be vital.

When you're done, tell it to install. Keep your fingers crossed. Not crossing your fingers will cause it to blow up.

STEP 2: Booting up after the install
I didn't bother to have a master boot loader that boots into Vista AND Leopard. I simply have both installed on different physical discs and I use the F8 menu (you'd push F8 after reboot to see this menu) to boot whichever drive manually.

At this point, do the following:
  • If in reboot hell, change something and re-install. Rinse, repeat.
  • If kernel panic, record fault details, boot install disc, and attempt to fix manually. Rince, repeat
  • If boots into OSX, WOOHOO!!
From here, I'm going to assume that Leopard booted up fine. If it doesn't, then you need to do some digging and make sure that you paid attention to what I said up until now.

Once booted (and I'm skipping details about the setting of the date/time, registration, language, etc), you should have a functional OSX desktop. If you ABSOLUTELY have to have the cool effects with eye-candy right now, then open the OSx86Tools and enable Quartz. This will require a reboot. Other than that, you should have no sound, no ethernet, and no way to see any discs/drives that are attached to your non-JMicron SATA/PATA controller. Everything else should work, though.

A good trick is to open up the OSx86Tools app, select Download and Install Hardware Drivers, select Azalia if/when it prompts you for an audio codec, and let the app find some hardware details for you. This list may be incomplete, but have no worry. It was for me as well.

For the following portion, I downloaded the kexts (from the URLs supplied from the app) on another machine and copied them over via USB thumbdrive. Use Kext Helper to get them installed. Just drag the extracted kext directory into the KH GUI and it will install it for you after you supply your user password and tell it to install.

To get audio working:
Kext: http://osx86driverdb.co.nr/Azalia.zip
Notes: Everyone I read about said that the ALC883 kext should work. It never did for me. I downloaded and installed Azalia and it works fine.

To get network working:
Kext: http://osx86driverdb.co.nr/RTGMac2.zip
Notes: This was kinda weird. Everyone said I should use the Attansic L1 kext. Again, no-go for me. I ended up using the AppleRTL8169Ethernet kext. Works like a charm. This might actually already be installed. I ended up getting confused during my install at the point and it mysteriously showed up on my filesystem at one point. After that, ethernet was good-to-go. I've provided the link here just in case.

SATA/ATA:
Kext: http://osx86driverdb.co.nr/ApplePIIXATA.zip
Notes: The kext that this needs is already installed, but portions of it are missing. You need to download this file and use it instead. Backup and/or delete the IOATAFamily.kext directory from /System/Library/Extensions and replace it with the contents of that zip. After reboot, everything worked fine for me.

STEP N: Subsequent notes

I noticed that I had issues installing Leopard packages (.dmg files) after completing the above steps. Once I downloaded the dmg file and extracted it, the system would immediately kernel panic while referring to a problem with com.apple.security.seatbelt. As of writing this, I don't know what this is for. I delete the seatbelt kext and I can now install software. I've currently left it at that.

I'm sure that I will be adding more notes as time goes on.

2 Comments:

At 5:16 PM, Blogger Unknown said...

Thank you for this walk-through.
However, I can't get my install to boot.
I have a P5B-VM and a Celeron processor.
When I try to boot after install I get stuck at a grey screen HD activity LED blinking just a little and the grey screen flickering with black once in a while (coincides with a little more HD activity light).

Do you think my processor is the problem?
Do you think I should upgrade the CPU or go for a whole new setup?

 
At 10:09 AM, Anonymous Anonymous said...

Thanks for the review. Can you post something like that, with the P5B-VM and the Snow Leopard?

 

Post a Comment

<< Home