21 March 2002

Linux and Mac hassles, and Disk Warrior

I’ve got a Linux box running at work now, so I can start doing some DB2 and WebSphere development. It’s a big black cube the size of a hotel mini-bar. It’s only 200MHz, but makes up for it by having four CPUs and three hard drives.

I’d forgotten how much I hate RPM. I’m surprised nobody seems to have made a really simple terminal front-end for the damn thing.

It constantly amazes me that things that are conceptually so simple can be made so unnecessarily complicated. I mean, go read the RPM manual page for example. I think it’s the worst piece of documentation I’ve ever seen on a UNIX system, and as you can imagine the competition for that award is pretty tough. If you’re feeling really daring, read the table of contents for the next version of Maximum RPM. The first edition of the book was 450 pages. Four hundred and fifty frigging pages, and all it does is install and remove software. You’d think we were talking about kernel programming or something.

In contrast, yesterday I saw a rare example of some utility software that’s really well designed. However, I have another bijou rant-ette to get through first.

I installed the beta Palm Desktop software on my Mac. It helpfully installs a kernel extension which is designed to pre-emptively grab the USB ports when you start the Classic environment. This is so that if you run the Palm Desktop software under Classic as well as under OS X, Hotsync still works.

Now, maybe I’m missing something here, but why in the name of sanity would anybody run Palm Desktop under Classic inside OS X if they have the OS X native version installed? Presumably this is some misguided attempt to provide back-compatibility for people who have old Mac OS conduits that they’re not willing to recompile for Carbon.

Well, I wouldn’t mind the unnecessary kernel extension if it worked, but unfortunately it fails to release the USB devices properly when the system tries to shut down. The end result is that shutting down causes a kernel panic, if (and only if) you’ve run one or more Classic applications. Nasty.

So I ripped out the kernel extension. Unfortunately Palm had been‘clever’. The main Palm Desktop software has an extra copy of the kernel extension which it silently tries to install, whether you need it or not, next time you go to look at your calendar or address book. So it’s hey ho, another totally unexpected kernel panic.

This new phenomenon of ‘self-repairing’ software bugs the hell out of me. Microsoft’s software similarly spews dynamic libraries all over the system folder, even if they’re already available in the Internet Explorer folder and hence unnecessary. Microsoft has decided that it wants you to keep IE’s crap in the System Folder, rather than in the application folder where it belongs, so tough luck if you disagree.

In this case, the ‘self-repairing’ code made the software self-breaking. Not only did it introduce the kernel panic extension, it also stopped the Palm Desktop software from working if the extension wasn’t there already. Maybe it’s just me, but I feel that if the user goes delving into the depths of the system and explicitly removes an extension, the user probably has a damn good reason for doing so. Particularly on Mac OS X, where you currently need to boot in single user mode and use sudo from the command line to do it. We’re not talking about the kind of file a naive user is likely to trash by mistake. What naive user goes casually strolling through the system library directory to browse through a list of several hundred kernel extensions to start with?

So anyway, I ended up with some disk corruption courtesy of Palm’s lousy software. Apple Disk Utility noticed—it said I had a problem with a missing thread record and an invalid B*Tree header. It also said it couldn’t fix it. I fired up TechTool Pro, which reported the same errors, plus a bad system wrapper. TechTool rated these problems as very serious, but also said it couldn’t fix them. It helpfully suggested that I should reformat the hard drive and start again.

Needless to say, I didn’t fancy doing that. So I went to the Apple Store and picked up Disk Warrior from Alsoft, which I had heard good things about. I fired up Disk Warrior, and was rather startled by the interface. It has three controls. The first control is a simple drop-down to select which disk to look at. The second control is a “diagnose” button, which looks at the disk and draws a diagram illustrating how badly sorted the B*Trees are on the disk. The third control is the “fix it” button.

I sat and stared at this for a little while. I was so used to tools like TechTool Pro and Norton Utilities, not to mention Windows 2000 and RPM, that I initially thought I must be looking at the splash screen or an “about” box. Finally I realized this was the actual control interface. I pushed the “fix it” button.

After a few progress bars I got the results screen. A short document summarized the various things wrong with my hard drive. Well, actually it was a long list. There were literally hundreds of errors that the other utilities had missed, including errors in things they claim to check but apparently don’t. Under the summary there were three more buttons. The first produced a more detailed list of which files had been touched in some way. The second mounted “before” and “after” versions of the disk on the desktop, so I could browse through it and verify that the “after” version looked good, and all my data was still there. The final button was an “OK, go ahead” button.

Now that’s what I call an interface. It even passes the “mom test”: I think my mother could understand and use Disk Warrior. Someone obviously sat down and asked what people actually need to know, as opposed to what it’s possible to tell them. Added to that, the fixed disk really does seem to be fixed, in as much as the other utilities all now give it a clean bill of health.

Epilog: OS X boots and runs fine. I used to recommend that if people could only afford one utility, they should get TechTool Pro… but I think I’m going to revise that.

Related posts

If you liked that post, you might like one of these:

© mathew 2017