Back in Mac

Volume 10, Issue 142; 21 Dec 2007; last modified 08 Oct 2010

My Mac's back (sortof). Next time I have to do the reinstall dance, these notes will help.

Apple claims my problems were user error, not hardware error, i.e., they went away after they reinstalled the OS. I'm not convinced, but what can I do. (There's a longer story involving unrecoverable filesystem errors and multiple iterations of the reinstall dance, but I'll spare you; if I touched something electronic this week, it probably broke.)

How to rebuild your Mac environment…

  1. Reinstall the OS. Run Software Update. Repeat until it says it's done. Restore all your backup data. Merge your old home directory into the new one that the install created. (Next time I might create an admin user just for the purpose of avoiding this step.)

  2. Install X Code so that you have development tools. Install X11; for some inexpliciable, non-obvious, and hard to find instructions for reason, this involves control-clicking on the Install Bundled Software Only icon on the install DVD, selecting Show Original, and then clicking on the X11User.pkg.

  3. Install MacPorts. Use MacPorts to install (at least) wget, msmtp, mercurial, subversion, and gnupg.

  4. Install a recent python distribution.

  5. Install PyXML (yes, I know there are better things, but I have legacy…)

  6. Download and install expat.

  7. Do the perl -MCPAN -e shell shuffle to install XML::Parser, XML::XPath, and RPC::XML.

  8. In System PreferencesSharing enable Personal Web Sharing and Remote Login.

  9. Figure out what version of Apache is actually part of the OS. Get the sources for that version. Build that version with the right suexec parameters:

    ./configure \
    "--with-layout=Darwin" \
    "--enable-suexec" \
    "--suexec-caller=www" \
    "--suexec-docroot=/home" \
    "--suexec-gidmin=20" \
    "--suexec-logfile=/var/log/httpd/suexec_log" \

    Move src/support/suexec into /usr/sbin and chmod it 4555. Restart Apache. Check the error log to make sure it worked.

  10. Install Adium, Adobe Reader, Caffeine, Canon i9900 printer drivers, Carbon Emacs, Chicken of the VNC, Disk Inventory, Epson CX3200 printer drivers, Firefox, GIMP, GoogleEarth, Growl, gSync, HuginOSX, iMovieHD6, Inkscape, iRedLite,, Lightroom, MarcoPolo, MenuCalendarClock, MenuMeters, Netbeans, Open Office, Oxygen, Quicksilver, SSHKeychain, Skim, SuperDuper!, VMware Fusion, X-Chat Aqua, and Zoom.

  11. [Update: 3 Jan 2007] Use MacPorts to install links, p5-libxml-perl, and p5-image-info. For Sun employees only: reinstall and reconfigure punchin. (Seems like it ought to be possible to use the old configuration, but it didn't work for me.)

    Get tidy from, build it, and install it in /usr/bin/.

  12. [Update: 4 Jan 2007] Use MacPorts to install p5-digest-md5.

Cross your fingers and run Disk Utility again.

P.S. I got another kernel panic while preparing this essay. Sigh. No panic.log this time. I'm at my wits end, but one thing's for sure, I'll be needing these instructions again all too soon.


Don't you mean...I haz legazee?

—Posted by Shelley on 21 Dec 2007 @ 11:11 UTC #

Sadly I got stuck a few weeks ago at step 4 and 5' (lxml). Getting a working copy of Python with a working -real- readline and recent libxml2 caused several days of pain which ended in the order of a nice new Thinkpad.

Apple claims "It just works." This maybe true if your using Photoshop, Pages, and other Mac OS X applications. Since Leopard this has no longer been remotely true of Python or XML development. Given all of that I've been much happier in Ubuntu (on and off for 3 months, only OS for 4 weeks).

... I do miss Adium... and Growl. I also have to pretend that the deskbar is "just like Quicksilver." At least lxml doesn't segfault, and python-MySQL doesn't either.

—Posted by Gavin on 22 Dec 2007 @ 12:06 UTC #

Gnome Do is Quicksilver.

If it weren't for Lightroom, I'd have abandoned OS X already. It'll be worse after I've ponied up for Photoshop.

Neither of which gets me any closer to proving I have a hardware issue or finding the software issue that causes my laptop to be unstable.

—Posted by Norman Walsh on 22 Dec 2007 @ 03:05 UTC #

Did you install any RAM lately? When my MacBook went kerflooey, that was at the bottom of it.

—Posted by Dorothea Salo on 22 Dec 2007 @ 08:33 UTC #

Re my post the other day? I think the above is what you're saying Norm?

Just how much easier was it with Linux?

How about a simple second machine for playing with your photography? With no work software on it?

—Posted by Dave Pawson on 22 Dec 2007 @ 08:43 UTC #

Alas, Dorothea, I haven't had it open since I bought it. I'm not even sure the MacBook Pro has any user servicable parts inside. That's one of the reasons I suspect the drive, it's one of the few things with moving parts.

Dave, I guess I could have two machines, but I've worked really hard since the late nineties to avoid that. I want to have everything in one place. (Well, several places with backups, but all in one unit.)

If it is a hardware issue, then the OS shouldn't really matter. If it's software, well, I'll be very surprised. And it means some relatively ordinary bit of software that I installed is injecting code into the kernel which would be a little scary.

—Posted by Norman Walsh on 22 Dec 2007 @ 10:38 UTC #

"it means some relatively ordinary bit of software that I installed is injecting code into the kernel which would be a little scary"

MMmm, "Canon i9900 printer drivers." Last time I had stacks of kernel panics it ended up being the HP network drivers. Something in the move to Intel made them very very unhappy. They still crash from time to time today, but no longer panic all the time.

—Posted by Gavin on 23 Dec 2007 @ 04:49 UTC #

You can avoid nearly all of that by using Time Machine. Get a cheap external USB drive and flip the switch to on. Then to reinstall:

1. Boot from Leopard DVD (or, if you've set it up, from the partition with Leopard on your external USB drive) 2. Select restore from Time Machine in the installer 3. No step three

If you're running into this often, you should definitely try this.

—Posted by Martin Probst on 25 Dec 2007 @ 01:07 UTC #

I haven't made the switch to Leopard yet. Maybe after the next point release.

—Posted by Norman Walsh on 25 Dec 2007 @ 02:01 UTC #