Pensieri di un lunatico minore

12 July 2009 Mac

It’s alive! Mac OS X on non-Apple hardware

I tried. I really tried to use Linux on the Desktop. I tried Ubuntu, I tried Fedora. I tried OpenSolaris, and I tried my favorite free OS, FreeBSD. In the end, I was dissatisfied. From each, I liked different things; but, that’s not what this post is about. This post is how I got Mac OS X running with 4 cores, hyper-threading and 12GB of RAM.

First, let’s set the stage of the hardware involved. This is what I discussed in a previous post, and the only thing that has changed is the HD.

If you have “identical” hardware, then this will get you through it. If you don’t, then hopefully this will at least share a few of the issues I ran into.

Before I start, I can’t thank enough everyone on the interwebs who have shared their experiences—both good and bad—because without those, I’d never have gotten this far. I also need to thank someone that goes by soniclmusic for this wonderful writeup that got me 98% of the way there.

Preparing Your Tools

Before you start, you’ll need the following software:

Let’s explain the first two. At least in my instructions, you won’t be using the copy you bought, that’s simply something you need to do to pay for the OS. If you just steal the OS without paying for it, you’re a dick, and we’ll leave it at that. Once you’ve bought it, place it lovingly on your desk and admire the packaging. Oooooo ahhhhhh.

The iDeneb distribution can be found somewhere on the interwebs, just search your favorite search engine or torrent site. It will make this much easier. Do not use the v1.4 iDeneb installer. I was never able to get it to boot on my machine, no matter what magical invocations I tried. We’ll get the system up to 10.5.7 soon enough.

Step 1 : BIOS configuration

The first thing we need to do is change a bunch of settings in the BIOS. If you don’t do this, the installation will never work. Period. Some of these may make creaky old operating systems, like Windows XP, go down in a flaming spiral, but then you weren’t running Windows XP, were you? Linux, OpenSolaris and FreeBSD all deal perfectly fine with the changes that we are going to make. The high-level changes that need to happen are:

You can enter the BIOS configuration by pressing the DEL key on start-up. From there, you can navigate according to the instructions. You need to make sure the above changes are made, otherwise the DVD will never boot. Once that’s done, press F10 to save, and reboot the system.

Step 2 : Booting from DVD

I don’t change the boot order of my system. Instead, you can just press F8 when the system starts up to select a different boot device. On my system, the DVD is displayed as IDE:PIONEER DVR-113NP. Select that, or whatever yours is, and hit ENTER. This will start the boot process.

When the disc actually starts loading, it will ask you if you want to boot from the disc, or press F8 to enter additional options. I usually press F8 and enter one additional option: -v which will put it into verbose mode as it boots.

It will take a little bit, perhaps a few minutes, to start the OS, and then you will be in a “normal” Mac OS X installation environment.

Step 3 : Partition your hard drive

From the Utilities menu at the top of the screen, select Disk Utility, and then proceed to partition and format your drive. For me, I simply created one partition on the 1TB drive. This only takes a few seconds to complete, and then you can quit the tool to return to the installation process.

Step 4 : Configure the installation

As you go through the process, you will see a button labeled Customize. You want to click that and opening the hierarchy of options, select the first kernel (VooDoo), which is for both AMD and Intel machines. Next you want to go down to Graphics and nVidia, and select the NVInject extension that has the right amount of memory. I tried skipping this step—we will later use GFX Strings to fix it—but the system won’t boot since it won’t be able to see your graphics card the first time.

After that, you’ll want to go through the list of applications. You’ll want to select all of them at this point, you can delete things later.

Step 5 : Start installation

Once you’ve selected your options and installation drive, you can continue with the installation. I generally go up to the Window menu and open the log so that I can see what’s happening. On my system, it takes about 10-12 minutes to do an installation, but it may take longer. When it is done, there will be a button to reboot. Do that.

Step 6 : Initial OS configuration

When the system boots for the first time, you’ll get the fancy Apple welcome video, as well as a wizard to guide you through configuration. This stuff should be pretty self-explanatory.

Step 7 : Enable Hyper-threading and multiple cores

At this point, we only have 1 CPU core running, with all Hyper-threading disabled. Nice, but not really what we’re looking for. In order to make the system detect properly all the cores and allow Hyper-threading, we have to insert a configuration table for the ACPI so that it can see things properly. This configuration table is called the DSDT, or Differentiated System Description Table, and will be different for every system motherboard/CPU combination.

To install this, we need to do two things. First we need to create the DSDT for our system, and then second we need to make sure that it is loaded early in the boot process.

To create the DSDT configuration file, we’ll use the DSDT Patcher that I mentioned earlier. First, copy the DSDT_Patcher1.0.1e.zip file to your desktop and double click it to extract it. Then you need to open a Terminal window (Application -> Utilities) and then type the following commands, where the $ represents the default shell prompt.

$ cd ~/Desktop/DSDT_Patcher1.0.1e
$ ./DSDT\ Patcher

At this point you’ll get a question about what platform to emulate. Choose 0 (zero) for Darwin. The program will then generate a bunch of files, and may tell you about a few warnings. These can be safely ignored at this point. Next we need to edit the file to change some configuration. In the same Terminal window, continue:

$ nano Debug/dsdt.dsl

This will open an editor window to change the dsdt.dsl file to match what you need. When in this editor, you want to remove all the lines in the first section about CPUs that start with Alias. You can do this with the delete key on your keyboard and the arrow keys. When you’re finished, press Control-O (the control key, plus the letter ‘o’ at the same time) and then RETURN to save the file. Then you can press Control-X to exit the editor.

Back in our Terminal window, we will continue:

$ ./DSDT\ Patcher Debug/dsdt.dsl

When you run it, you’ll get a few errors about pre-existing files, you can ignore this. It will create a file in the current directory called dsdt.aml. You will copy this file to the root of the main boot drive:

$ cp dsdt.aml /DSDT.aml

Please note that the uppercase name is required. If you don’t do it in upper case, this won’t work.

Next, we need to monkey patch the Chameleon loader to make sure that it actually loads the DSDT configuration file we’ve created. To do this, we need to copy the DSDTPatcherGUI_1.0.zip file to the desktop of the machine and double click to extract. Using the Finder, browse down into that folder to Tools and double click on Bootloader.pkg. This will start up a standard Mac OS X installer. Go through it to the finish.

Step 8 : Configure your boot.plist

To make sure things boot correctly, you want to edit the file in:

/Library/Preferences/SystemConfiguration/com.apple.Boot.plist

You can use the TextEdit program to do this, or use nano as you did before. You want to make sure that when you’re done editing at this point, that it looks like this:

<?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>busratio=20</string>
    <key>Timeout</key>
    <string>5</string>
    <key>device-properties</key>
    <string></string>
  </dict>
</plist>

Step 8 : Enable all cores and Hyper-threading

At this point, we’re ready to give it a whirl. You want to go to the Apple menu, select Reboot, and then when the system reboots, hit the DEL key to enter setup and enable both Hyper-threading and all cores. Press F10 to save, and then boot the OS as usual.

If everything has gone according to plan, and my scribbled notes, then the system should boot with all the CPUs activated.

Step 9 : Replace NVinject with GFX Strings

The final thing that I had to do, because the system would random hang the graphics subsystem, was move from NVinject to the GFX Strings solution. The solution mentioned here works perfectly and can be followed to the letter. I’m not going to copy and paste it here.

Once you’ve made those changes, you can reboot again.

Step 10 : Upgrading to 10.5.7

For me, I downloaded the combo updater from Apple’s website, and ran it as normal. When I finally rebooted, I made sure to change the boot options to -f -v, just to make sure that the caches were rebuilt. The first time I rebooted, though, it hung part-way through. I rebooted again and I’ve had no problems since. You can then proceed to use Software Update to bring the system up-to-date with iTunes, etc. I had no issue doing it that way.

Step 11 : Enabling audio support

When I first installed all this, there was no audio support. System Profiler reported that there was no audio subsystem. After a bit of searching, I discovered and tested using a couple of kernel extensions (kext) to enable it. They are linked at the top of this post, and you can install them using kExt Helper, which was installed when you installed iDeneb. It will require a reboot, and you will need to select “line out” as your output. I’ve not tested the digital output yet.

Step 12 : Fixing the date/time clock issues

One of the first things I noticed when I first got the machine up and running was that the date/time in the menu bar was constantly fast. So fast, in fact, that it would be at least 1-2 minutes ahead for every 5 minutes that went by. After an hour, 12 minutes ahead, etc. It was insane. Opening the Date & Time Preferences panel would fix that, as it would force an NTP resync and call settimeofday(2) to fix up the clock. Then it would drift more and more and more. A solution was to be found in a posting in the InsanelyMac forums. It was the FSB on the processor. There’s multiple ways to fix this, but I found that downloading the Chameleon v2 installer and running it got you what you needed. The latest release candidate (RC1) includes support for auto FSB-speed detection. Problem solved.

Step 13 : Installing support for the JMicron PATA interface

Using the kExt Helper, you will want to install the JMicronATA.kext extension and reboot. That’s all you need. For me, it also enables burning of DVDs.

Open Issues

Right now, there’s no major hardware support issues outstanding. What I am still seeing is that sometimes certain preferences (like requiring a password when coming out of a screen saver) are not saved sometimes. This seems to be random.

Conclusion

Hopefully this provides some help to people who want to play with Mac OS X on non-Apple hardware. Good luck.

Updated (12-July-2009): Now includes instructions on enabling audio.
Updated (13-July-2009): Included how to resolve the clock issues.
Updated (21-July-2009): Now have working parallel ATA (PATA) with JMicron controller.

This entry was posted at 1:14 pm on 12 July 2009 and is filed under Mac. You can follow any responses to this entry through the post-specific RSS 2.0 feed.

[...] OS pe hardware non-Apple Potrivit acestui articol,cineva a reusit sa instaleze si sa ruleze mac OS 10.5 pe hardware non-Apple,lucru [...]

How much did the hardware cost you all up?

All told, I think it was around $1,200 for the hardware. I’ve since picked up and added a couple 1TB drives, but those were $80/each.

Pretty amazing triumph, Chris! I, for one, am thoroughly impressed!

You could have tried iAtkos, recently they released iAtkos V7 (OSX 10.5.7) :)

I think its one of the easiest to install :)

Great guide just what I was looking for, well written which is hard to find.

sb

i have the same mother and cpu.

i try the same config as you. i can install it but it hangs at boot.
did you do any “fixes” on the installation?

Both comments and pings are currently closed.