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.

7 thoughts

8 June 2009 Mac

Apple pulling a “Microsoft”

Let’s face it … nobody buys a Windows machine for it’s stellar functionality or beautiful interface. They buy it for the ecosystem (software) around it, and the fact that Microsoft dominates the desktop domain. While Apple may have lost out on the desktop to Microsoft, they didn’t ignore the lessons to be learned.

With today’s announcement of the new iPhone 3GS and the reduction of the iPhone 3G to $99 (effective immediately). Let me explain why the Palm Pre has a sisyphean task:

That is the iPhone/iPod ecosystem. That leaves out the thousands and thousands of accessories that are “Made for iPhone”. It’s a gigantic impediment to adoption, and more importantly a huge risk to consider for any developer. You don’t unseat the “best” while being only incrementally better. You have to change the game.

2 thoughts

4 June 2009 Mac

The iPhone Compass

Some rather horny commentators are dismissive of a compass and its importance in the iPhone, but here’s why I think it’s actually more interesting than people think:

Not a huge change, but it’s a refinement, and since you can get a very small compass, it won’t consume much space. More sensors is better than less.

2 thoughts

11 December 2008 Mac

Why the iPhone is better than _________

Stephen Fry writes about why the iPhone rocks, no matter how much it sucks:

Don’t you sometimes long to be CEO of a company like Sony Ericsson, Samsung, Nokia or Microsoft? So that you can say to your coders, your designers, your development teams and your software architects: “Not Fucking Good Enough. I haven’t said ‘Wow’ yet. I haven’t gasped with pleasure, amusement or admiration once. Start again. Not Fucking Good Enough.”

And (forgive this ranting sidebar) how one would lay into the packaging department! “Nowhere near Fucking Good Enough. I’m not enjoying opening this. It’s clumsy, dumb and contemptuous. I’m in product-opening hell. Not Fucking Good Enough.”

In the end, it’s that passion that makes the difference, not the politics.

1 thought

10 December 2008 Mac

ORLY? Open source the iPhone?

It seems everyone has advice for Apple. Hell bent to resurrect them from that horrible abyss of having billions of dollars in the bank and making money almost as fast as it can be printed. Today, it’s five reasons why Apple should open source the iPhone. Let’s take a look at his five “reasons”, in slightly out-of-order execution, shall we?

Customers Love Choice
Open sourcing the iPhone gives customers a much broader selection of applications. Customers faced with a plethora of attractive applications when they visit the app store will spend money. More money make Apple happy.

Yes, because the App Store has been such a miserable failure, what with only 10,000 applications and 300,000,000 downloads. Total unmitigated failure. If only they had some quality software since Richard Stallman, et. al. are so well known for their “attractive applications” that people will pay for.

It Will Solidify Apple’s Dominance

Innovation will solidify Apple’s dominance, and I’ve seen little indication that open source is the hot bed of innovation in consumer electronics that the average person will pay for.

If They Don’t, Someone Else Will

If you mean someone else will let others run applications on the iPhone, sure, it’s already possible. If, you’re telling me that people will develop a viable competitor to the iPhone user experience, then no. I see no evidence of historical leadership in user experience, or in fact, anything but wrote copying of others that would make Microsoft blush. Will people use it? Sure, people also buy Zunes and Archos boxes, but the iPod still dominates.

They’re Gonna Have to Eventually

Have to? No. Might? Highly unlikely. Will be forced by a marauding band of light-sensitive open source zombies? Yeah … no wait, no.

It’s Good for Devvies, Non-devvies, and Apps Alike
Open source is becoming the default way to develop software in many industries. Why? Because a properly-managed, open environment leads to targeted, robust features and helps developers share code in a healthy coop-tition that helps everybody in the iPhone ecosystem.

Really? Any profitable industries? This is not to bad-mouth open source, as it has generated a lot of quality code, but in general, has not been responsible for large-scale innovation. Linux is not innovative technically. It might be innovative politically, but that’s a totally different world. I think open source probably isn’t a bad way to develop some applications, but it for infrastructure code? Give me a break. The open source world still thinks X Windows is a good idea.

People have fantasies. Personally, I want a unicorn that poops ice cream and whose tears cure cancer, AIDS and world hunger, but that doesn’t mean that it’s what’s “right” for others. Apple has succeeded by walking that very delicate line between open and closed. Totally open is appealing to a small segment of the population. What, in my experience, most people want is stability, predictability and innovation. These are not particularly things that the open source world has a lock on, or even many skills in. Once someone has demonstrated that open source can build viable consumer electronics—and that’s what the iPhone is—then I’ll be inclined to believe that it might be able to do something useful in this area.

Until then, Apple has opened the phone in nearly every way that matters. They’ve provided free development tools (if you’re on a Mac), extensive documentation, a distribution network and many other things. This is what most developers I’m aware of care about. Even if you gave them 100% of the source code, most people wouldn’t know what to do with it except screw it up. The one area that I’d love to see Apple open things up is in network support and more transparency in what the criteria for application approval is. These are things that actually hold back sales and developers, not some ideological purity test.

6 thoughts

30 November 2008 Mac

Boxee

So I finally got an invitation to Boxee, which I’ve installed on both my MacBook Pro and my Apple TV. The installation went very well on my Apple TV—pretty much no problems—and I’m already enjoying it. If you’re also a Boxee user, let me know!

Comments Off

24 October 2008 Mac

What to do with $25 billion?

Apple has approximately $25 billion dollars in the bank and zero debt, so Wired asks: what to do with all that money? Someone joked about buying General Motors, but I thought it’d be interesting to look at who is worth what:

General Motors $3.37B
Ford $4.55B
Chrysler $2.5B (est.)

The Chrysler number is just a guess, given they are private, but are pretty clearly worth less than either GM or Ford. That means Apple could buy the entire Detroit auto industry for approximately $10.4B, and still have $15B sitting in the bank.

Put that in your stocking and stuff it.

Comments Off

15 October 2008 Mac

False equivalence in computing

Microsoft really must be seething that Apple is being successful. Their latest collection of sour grapes demonstrate an attempt of false equivalence worthy of Fox “News”. Let’s use a hamburger as a metaphor, shall we?

I can purchase a “hamburger” at McDonalds for let’s say $1.50. It passes the basic test of what a “hamburger” might be: a bun, something meat-like, and some vague vegetative items. I can, however, waltz down to Ray’s Hell Burger, plop down $6.95 for a hamburger and get: a bun, meat, vegetative items. There’s a difference though in he care. Saying that simply because both items have similar specifications that they are “equivalent” is laughable. Let’s play the game, shall we? We could compare the cheapest POS thing that can run Vista, but that’d be disingenuous. Let’s compare a Dell Lattitude E against the MacBook:

So what’s the difference? First, the Dell:

So what does the Apple come with?

What I see are two very similar machines. The Dell is approximately 1 lb lighter, which if you travel a lot is a concern, but 4.5 lbs isn’t a huge amount to start with. The MacBook has substantially better graphics, and multi-media capabilities, and I’d argue (given my experience with Dell’s “on-site” people) better support. There’s a difference, but I’m not sure it is a positive one for “Microsoft”.

You can buy a shirt at Walmart and you can buy a shirt at Nordstrom’s. Both cover your skin, but that doesn’t mean they’re comparable in quality. Or, as John Gruber sums it up:

Apple doesn’t make computers that people have to buy. They make computers that people want to buy.

Amen.

5 thoughts

14 October 2008 Mac

Math in Omnigraffle dialogs

I use OmniGraffle Professional for almost all my design/diagraming needs. I’ve used it for UML, ER(Entity-Relationship) diagrams, laying out furniture, figuring out where to hang paintings and a gazillion other things. I’ve been using it for many years, and I think the first release I bought was 2.0. That’s why when I look at this dialog box:

I don’t think “hey, let’s put some math in there”, but it works:

In fact, a lot interesting math bits work there. You can add, subtract, multiply and divide—the obvious things—but you can also put bizarre things in like “2 in + 1.3 mm”. This is useful when you want to do some things that are a bit more CAD-like.

I just love discovering new things in programs I’ve been using forever.

Comments Off

29 September 2008 Mac

Tagged: clue

Nick Santilli asks where’s the easy access to tagging in OS X?, and while he spends a few minutes talking about whether it’s desirable or not, he seems to miss the point—but just barely.

We tag bookmarks, photos, applications, blog posts, and on and on and on.

Who is this “we” kimosabe? I mean, I use tagging, but “we” are not typical. In the first sentence he hits on the underlying problem with his argument. Who is “we”? Who, specifically, are we targeting and talking about?

I suppose the tried and true way of doing things (hierarchical folders housing documents that you have to drill-down to find) continues to reign supreme. Is tagging at the operating system level just too ambiguous for users to grasp? My feeling is that if it were made more accessible, a definite change would begin to occur in the way people accessed their hard-drive-based files.

It might, but it might be that the mental model that people would need for tagging to make sense simply isn’t one that many people have. Folders make sense to most people. They’ve seen a file cabinet, and seen drawers and little manilla folders. What they’ve never seen is a room where you spit out words and hope that someone hands you a pile of papers back with what you want. This makes it hard for the average person to understand. Trust me, I’ve tried explaining it to people, and failed miserably. Now, that’s not to say that there isn’t some way to do it, but I suspect it’ll be quite different than what you see on delicious, for example.

When I quickly took a peek at Flickr and the tags that people had added on some new photos, I found that out of 20 of the newest photos one had two (2) tags, one had four (4) tags, one had eight (8) tags, and seventeen had none. That means 85% had no tags what-so-ever, and averaged out to 0.8 tags-per-image, but 57% of those tags were on one image.

What this tells me is that most people don’t tag. It’s not a scientific result, but it is a data point, and it’s one that’s likely more representative of the “average” person than anything else. Flickr seems to be populated with a lot of regular people, rather than geeks, and so the numbers wouldn’t be as skewed as what you might get elsewhere.

For tagging to take off, the concept needs to be clarified and representable in a metaphor that people can relate with. I’m not sure that’s possible, although certainly people are trying. In addition, I think much more is to be gained by the judicious use of latent semantic analysis in finding document relations than in expecting the average user to tag their own documents.

Just a thought of mine, though.

Comments Off

9 September 2008 Mac

Annoyances in iTunes 8

There are two things I normally have turned off in iTunes:

4 August 2008 Mac

iPhone v2.0.1

I’ve complained somewhat about problems I’ve had with my iPhone since I upgraded to v2.0. I know that I probably shouldn’t have, but I did anyway. Unfortunately, I regretted it and wanted to go back to the v1.x release. That wasn’t an option. Fortunately, this came today:

What an understatement! It seems to fix my #1 complaint: performance. Before, with my hundreds of contacts, it could sometimes take 10-15 seconds to even begin to scroll through them when I switched to that view, but now it seems nearly instantaneous.

We shall see.

2 thoughts

16 July 2008 Mac

MobileMe/iPhone issues

So I woke up this morning, and checked something on my iPhone. Overnight, somehow, inexplicably, over 1000 of my contacts in my address book disappeared. I now have 50. I had over 1100 before. WTF? This could only have happened through push.

Comments Off

13 July 2008 Mac

Push this… or issues with the iPhone v2.0

So, as with all other people who are geeks, I’ve updated my iPhone to the 2.0 firmware. Overall, it’s a great thing, and comes with a lot of nice extras. However, there’s two thigns that are totally hozed up: subscription calendars and push in general.

On my home machine, I subscribe to two different calendars: 1) my TripIt itenerary; 2) birthdays. These are important to me. I simply can’t remember anything anymore, and given my travel schedule, I need the constant reminder. As for birthdays, well, my friends all know how bad I am about remember things. No longer do these transfer to the iPhone. Before, they transfered as a “static” entry, only updated when you sync. Now they don’t even show up in any form, and that’s totally unacceptable.

The second issue is how push works, or more specifically, how it doesn’t. Lots of ink has no doubt been written, but Apple pushes this as a competitor to a full push system, but unfortunately that only works between the iPhone and the web interface, and totally ignores the desktops. If I make a change to something on my desktop, it can take 15+ minutes to show up on my phone. Not acceptable, and in my mind, false advertising.

The lack of a calendar solution is the most unacceptable though. How did a previously functioning capability stop working?

4 thoughts

9 February 2008 Mac

Time Machine issues

Generally, I’ve been very happy with Leopard on my MacBook Pro, however I’ve noticed of late that Time Machine has been getting more and more cantankerous. For example, it just finished running—it runs once an hour—and it took over 7 minutes to backup what amounted to about 7Mb of files. First, I’m not sure where that 7MB came from, as I wasn’t even at the machine, but second, that’s a painfully slow rate. I’m running this backup onto a 7200rpm FireWire drive, so it shouldn’t be that. But when it’s running it uses anywhere from 20-50% of CPU.

Looking at the logs, I find a lot of messages like this:

2/9/08 8:57:39 PM /System/Library/CoreServices/backupdEvent store UUIDs don't match for volume Silver Surfer 
2/9/08 8:57:39 PM /System/Library/CoreServices/backupd Node requires deep traversal:/ reason:kFSEDBEventFlagMustScanSubDirs|kFSEDBEventFlagReasonEventDBUntrustable| 
2/9/08 9:19:57 PM /System/Library/CoreServices/backupd Error: (-43) getting cat info for item: (null) 
2/9/08 9:19:57 PM /System/Library/CoreServices/backupd Unable to rebuild path cache for source item. Partial source path: 

Of course, that’s one of the more useless messages I’ve ever seen. I read somewhere that it might be related to Spotlight, so I tried forcing a total re-index (that took a long time), but the problem continues. Seriously, the amount of CPU burned is totally out of control, and it makes me wonder if the backups are even working properly. When I first started using Time Machine it ran quickly and painlessly. Heck, I already exclude huge swaths of my hard drive because I know they change constantly (like checkouts from repositories).

Comments Off