SimpleX: Repairing Mac OS X
By Derek Currie derek@insanely-great.com
© 2001

Rumor has it that Mac OS X 1.0 now has a locked feature set. It is going to be interesting to see what 'Macification' we will find within the announcements from Mac World Expo.

Meanwhile, one thing we will indeed find in MOSX 1.0 is the increased importance of system repair. MOSX, like Mac OS X Server and OpenStep before it, is extremely sensitive to system crashes. This sensitivity is far more that we are used to with Mac OS 9 and its predecessors. Thank UNIX, specifically thank the BSD underpinnings in MOSX.

I will stick out my neck and insist that it is critical that you repair MOSX every time it crashes. You won't regret it. Apple do help a little in this endeavour by providing a brief system check each time MOSX is booted. MOSX tells you it is 'checking disk' while the boot progress thermometer is moving. If problems are found during this check then repairs will be made. You may well find this step in the boot process is rather long after a crash. Rest assured the MOSX is cleaning up a mess. Unfortunately, this clean up is typically inadequate.

So what kind of manual repairs can we make? We are still waiting for MOSX native versions of TechTool Pro, Norton Utilities, DiskWarrior, etc. But you may well still find them useful if you use them carefully, as you will see ahead. But let's start with the basics, the system repair methods supplied by Apple. As you might expect the first place to turn is good old Disk First Aid.

Disk First Aid

Disk First Aid must be run from a Mac OS 9.04 boot. Booting from MOS 9.04 on your MOSX partition is fine. At least as of MOSXb1 there is no way to make the 'Disk Utility' program in MOSX repair its own volume. Version 8.55 of Disk First Aid is the earliest version you should use to repair MOSX. Unfortunately, it repeatedly reports 'check mount errors' in MOSX, despite claims that it has made repairs. Disk First Aid 8.6 fixed this problem. There have been some reports of minor problems with 8.6, but I still recommend it over version 8.55. As usual, be sure to run Disk First Aid over and over until it can no longer detect problems. It is not the most robust of repair utilities, but it is very helpful, and you may well find it is all you need.

Third Party Utilities

If you are like me, you will want to know every repair method at your disposal. That is why I will provide you with a couple further options. They both require some thoughtful care, so be prepared. The first option is a limited use of either Norton Utilities 5.03 or above, or TechTool Pro 2.55 or above. Do not (NOT!) do a thorough repair with these utilities or you will be sorely disappointed with the bloody mess you will create. You must limit your repairs to only (ONLY!) the volume structures of the MOSX volume and nothing else. If you do further repair, you are entirely on you own. Why? The file system in MOSX is entirely different from the old Mac OS. When you perform, for example, file repairs you are actually performing file damage, and the result is dire, as in making your MOSX volume entirely unbootable and its contents useless.



When you perform volume structure repairs on a MOSX volume with TechTool Pro it may well perform a full volume structure rebuild. If it does, you must (MUST!) examine the temporary results it provides for you on your desktop. You may well find that the results are total nonsense! You can typically tell because all your files are no longer in folders but all laying out at the root of the volume. You obviously do NOT want to approve that rebuild of the volume structures. Cancel it. Move on to other methods of repair. But, I personally have had TechTool Pro save a MOSX volume through its repairs. Use it with care. Similarly, be very careful using Norton Utilities volume structure repairs. Again, I have had very good success with the results with Norton Utilities. Remember to check the web sites for each utility and follow their recommendations when using them with Mac OS X.

File System Check (fsck)

The next repair option is what I consider the user-hostile CLUI approach. It may appear to you as diabolical, anything but simple, but it works very well and is worth knowing. It uses a program called 'File System Check' accessible only in what is called 'Single User Mode' during the Mac OS X boot process. Getting to Single User Mode is a rather iffy process on some models of Macintosh, making this method of repair even more annoying. But, I have found a reliable trick that should help.

1) Boot to Mac OS X. You can stop at the login window.

2) Reboot your MOSX disk holding down the 's' key. 'S' stands for Single User Mode. [This key command has a changed from MOSX Server where you hold down the 'v' key for the same result. The 'v' key will still get you into 'verbose' mode on MOSX but will not let you run fsck]. What this does is cause Mac OS X to boot with a command line user interface (CLUI) versus the entirely graphical user interface. We are entering UNIX here.

NOTE: On some model Macs, such as my PowerBook G3 Series 233/512K, this procedure fails to land you in the CLUI. So here is my little trick: Restart again with the 's' key down. As soon as you hear the Mac 'bong' let go of the 's' key, then push it back down again. Don't ask me why it works, it just does. And yes, you have to do it just as I say here or it won't help you. Its Twilight Zone time.

3) Follow the instructions that appear just before you arrive at the command line. This is what it tells you to do: type '/sbin/fsck -y' then hit <return>.

What is this incomprehensible gibberish? CLUIs are stupid and annoying, made for geeks, not mere humans. But, what you just typed means that you want to run the fsck application in the sbin directory. The creators of UNIX loved abbreviations, allowing users to type as little as possible. Sadly, this has nothing do to with serious user-friendliness. So what is this '-y' stuff? It means you are automatically agreeing to all the repairs fsck wants to make. This is a good thing, as fsck only asks you to say yes to good and useful requests. [I am fully aware that this was not necessarily the case in the ancestors of MOSX, but I have yet to find any problem at all with adding -y when using MOSX].

Want to know a little secret? Skip '/sbin/' and '-y' stuff and just type 'fsck' and hit <return>. I have yet to find it makes a shred of difference in MOSXb1. Honestly.

4) Watch fsck do its thing. The results exactly like Disk First Aid! If any problems are reported, run it again, just like Disk First Aid. Stop running it after a successful run without repairs.

5) Restart MOSX. You do this by typing 'reboot.'

Yes, there are other options than restarting, like 'exit.' But, I am here to attempt to keep things simple. Just restart. It will get you back to the GUI and hopefully happiness.



Zapping The PRAM

For once there is an actual use for zapping the PRAM. So what is this PRAM thing? It is the 'Parameter Random Access Memory' chip inside every Macintosh. It holds computer settings your computer needs to run properly. There is a lithium battery on your computer motherboard that allows it to hold its memory even when your computer is off.

In order to run Mac OS X on a Macintosh a setting change is made in your PRAM that is used by what is called Open Firmware. If you would like to read about Open Firmware just check out the Open Firmware Home Page <http://playground.sun.com/1275/home.html>, then run away screaming. Suffice it to say that it is one trick Mac OS X uses to allow it to run on various kinds of hardware, including Macintosh hardware. We will go into more detail about Open Firmware some other time.

When your Open Firmware setting in the PRAM gets damaged you need to zap the PRAM, wiping out its memory settings and starting clean. How do you know when your PRAM is fried? You'll know when you can't set your MOSX volume as your boot partition inside the 'System Disk' application. You may well see an error message like this:

''A fatal error occurred. "No Open Firmware NVRAM partition found. Command-Option-P-R at boot, and then reboot Mac OS three times."

If you are not already intimidated, just wait until you actually try following the instructions. Zapping the PRAM from inside MOSXb1 is a deadly slow process. I don't know why, except to say we are dealing with a beta program here. All I can tell you is that you will get cramped fingers, and are going want to take a nap while you wait for all the reboot bongs. Note that you want to wait for four (4) bongs, not three. If you find yourself waiting more than a minute before you hear a bong, your system is dead and its time to shutdown your Mac and start over again. Typically when you then restart again the process will work.

Here's another little secret: Let TechTool zap the PRAM for you while booted in Mac OS 9.04. You can get the TechTool freeware at the Micromat site <http://www.micromat.com/>. Crank it up and find its PRAM ZAP button:



(Always save your PRAM in case you want it back again). You will find that TechTool will not only save you time, cramped fingers, and your patience, but it will also restore your Mac's date of manufacture and hours of use. After TechTool restarts your Mac you should find that you can boot to Mac OS X again through the System Disk application.

Now go take some aspirin. Undoubtedly, this will all become easier when MOSX native disk utilities are made available.

• What's up in the next episode of SimpleX? Logging. And I don't mean killing trees.

DupleX

Michael in Moscow wrote me about Classic refusing to quit in Mac OS X beta 1. (Thanks Michael!) I gave him some brief advice regarding killing processes in MOSX. When Classic has choked on me I have found that specific applications running in Classic are usually the problem. For example, I found Claris Emailer will occasionally refuse to quit while running in Classic, which means Classic won't quit either. There are a number of ways to force Classic to Quit. The most simple, if you can get it to actually work, is to use the keys Command-Option-Escape to bring up the Force Quit window. You then chose 'Classic' and OK force quitting it. But it doesn't always work! You can try the same thing using the 'Process Viewer' application found in the Application/Utilities folder. But again, it doesn't always work! Therefore I am going to write an article about 'Killing Processes' in MOSX in a few weeks. It will get into some rather gory detail, so get ready.

Mac OS X Books

There are numerous Mac OS X books planned for release in the next six months. Thanks to Xicons <http://xicons.macnn.com/new.phtml> for their initial list. Note that you can also find these books at other online book sellers such as Barnes and Nobel <http://www.barnesandnoble.com/> and Borders <http://www.borders.com/>. The dates I have provided here are by no means accurate. I suspect the prices aren't either. Blame Amazon. I will provide updates, including review summaries, as MOSX books appear in print.



Out Now:
The Mac OS X Server Administrator's Guide
by Andrew Russell, John Welch
ISBN: 0761524150
$39.99 List
[Mixed Reviews. Main complaint: Not enough depth]

Delayed Release Date:
Licking Mac OS X : A Complete Guide to Installing, Configuring, and Enjoying Apple's Radical New Operating System
by Rita Lewis
ISBN: 0672319861
$29.99 List

Mac OS X Clearly Explained
by John Rizzo
ISBN: 0125893272
$44.95 List

MacWorld Mac OS X Bible
by Lon Poole
ISBN: 076453467X
$34.99 List

MAC OS X Web Server Handbook
by David L. Hart
ISBN: 0130327158
$39.99 List

Out In January 2001
Mac OS X Developer's Guide
by Jesse Feiler
ISBN: 012251341X
$49.95 List

Mastering Mac OS X
by Todd Stauffer
ISBN: 0782125816
$39.99 List

The Mac OS X Book
by Mark Bell
ISBN: 1576106055
$39.99 List

Mac OS X Black Book : The Reference Guide for Power Users (Black Book)
by Mark Bell, Debbie Suggs
ISBN: 1576106063
$49.99 List

Out In February 2001
Mac OS X Little Black Book (Little Black Book)
by Gene Steinberg
ISBN: 1576107019
$29.99 List

Out in March 2001
Mac OS X : The Complete Reference
by Jesse Feiler
ISBN: 0072126639
$39.99
[***Jesse is the fellow who wrote the one and only Rhapsody book a couple years back. It is good to see him with another publisher. I fully expect this book to be excellent. Watch for it. Note the earlier release of his Developer's Guide above].

Mac OS X for Dummies
by Bob Levitus
ISBN: 0764507060
$19.99 List

[Amusing side note: Check out how Amazon categorized some of these books: Astrophotography!?].

The Mac OS X Guide
by Brad Miser
ISBN: 0789725312
$29.99 List

Special Edition Using Mac OS X (From Scratch)
by Brad Miser
ISBN: 0789724707

Mac OS X: Visual QuickStart Guide
by Maria Langer
ISBN: 0201709007
$18.99 List

The Complete Idiot's Guide to Mac OS X
by Fred Terry
ISBN: 0789725282
$19.99 List

Out In April 2001
Mac OS X Fast & Easy
by Lisa A. Bucki
ISBN: 076151984X
$18.99 List

Out by June 2001
Mac OS X
By David Pogue
ISBN: 1565928679
$19.95 List
[Mr. Pogue was kind enough to send me this corrected date of expected release]

Mac OS X Power User's Guide
by Rita Lewis
ISBN: 0761534989
$39.99 List

• Next DupleX we will discuss G3 and G4 upgrade cards that will run MOSX now that Newer are no more.
(-_-,)