Sunday, July 27, 2008

Heart-Stopping Geek Experience...

Recently I purchased a Mac “Mini” for my wife. In general I am very pleased with this purchase – the price was right ($800), it reuses components from her old Windows PC (screen, audio, keyboard, and mouse), and it was easier to move her data from her old Windows box to her new Mac Mini than it would have been to migrate to a new Windows computer. And then, of course, she's got OS/X (Leopard) – sleek, beautiful, and zippy – instead of some monstrosity of a Microsoft operating system. Best of all, Debbie (who previously expressed nothing but hatred for her computer) actually likes her new Mac Mini!

But early this morning, as I was attempting to enable file sharing on her new Mac Mini, with a single erroneous click I managed to (temporarily) completely kill it. The steps I took were these: in System Preferences I went to Sharing and added her Mac Mini's hard disk as a shared folder. That worked. Then I noticed that Administrators were granted read only access, and I wanted to limit access to my account – so I removed Administrators from those granted access. Sounds innocent enough, doesn't it?

Any Mac-heads reading this are probably laughing at my expense right now. What I know now, but didn't know then, is that enabling and disabling access to shared folders operates directly on the file system permissions for that folder. Since the “folder” in this case was the entire disk drive, what I did was to remove access permissions for all Administrators from that disk. And Debbie's account is in the Administrator's group. Oops. Suddenly her account had no access to the disk. Nothing worked. I rebooted the system, and all I got was an unadorned dark blue screen with a mouse pointer. I could do nothing whatsoever.

Of course, I figured all this out only later. At the moment it occurred, I didn't have the faintest idea what I'd done. And truth be told, it is kind of dumb for Apple to allow the Sharing settings to affect basic operations that have nothing to do with sharing...

So I started troubleshooting in the usual way. I Googled for information, and very quickly found out about booting from the installation CD and using Disk Utility to repair permissions on the disk. Whew! Sounded easy! So I grabbed the CD, inserted it, restarted the computer, held down the “C” key to force it to boot from the CD, and started it back up.

Nothing. Just the evil blue screen again.

Back to Google, where I discovered that it's common for wireless keyboards (which I was using) to be unable to use the pre-boot key combinations that allow OS/X to boot into troubleshooting, repair, and installation modes. Well, that's fine – I've got several wired keyboards lying about. So I went grubbing for one with a USB connector and dang it, I didn't even have one! All my wired keyboards use the old-fashioned PS2 connector. I really had no choice – I drove 20 miles into town to go buy a new keyboard. At 7:30 in the morning on Sunday, there isn't much choice about where to go. First I tried Target, but all they had was wireless keyboards. Next I drove another 10 miles to Wally-World (Wal-Mart), and they had several to choose from – all much fancier than I actually needed, so I just picked up the cheapest one they had and hurried home...

When I got home, I plugged in the new keyboard and rebooted, holding down the “C” key, and voila! – it booted from the CD. I was saved!

Well, not quite so fast. First I ran Disk Utility, and used it to first repair the disk drive, then to repair permissions. Both of those completed successfully, pronouncing the disk to be in fine fettle. So I rebooted with the hard disk, and … nothing but the blue screen of horribleness...

Back to Google, where after a frustrating marathon session of searching I found nothing but an obscure reference to permissions on mounted volumes. This gave me the clue that finally saved the day. It turns out that for the purposes of sharing, finder, and some other things, mounted disk volumes are exposed to the file system in the /Volumes directory. When I looked in there, I found this:

/Volumes/Macintosh HD

and that object turned out to have no read or execute permissions for the group. This is the sort of thing only someone familiar with Unix command line operation would be comfortable fixing. Just FYI, here's what did the trick:

chmod go+rx /Volumes/Macintosh HD

Just that little magic incantation, and my wife's Mac Mini came back to life.

Whew!

One little side note… If I had failed in my efforts to fix it myself, I'd have been forced to take the busted-ass Mac Mini into the local Apple store. There, I'd have had to sidle up to the “Genius Bar” to have one of the Apple “Geniuses” (generally pimply kids with baggy, falling down trousers and metal studs and rings penetrating various parts of their bodies). The humiliation of this possibility was a far better motivator for me than the thought of the Wrath of Debbie (my wife). It would be like a Toyota engineer being unable to figure out how to change his car's spark plugs, so he pays the neighbor's 14 year old daughter to do it for him. Oh, the humiliation!

I'm so glad I avoided that!

No comments:

Post a Comment