- Application Crashes
- System Crashes
- Fixing Hard Drive Problems
- Resetting PRAM
- Restoring a Lost Administrator Password
- Reinstalling System Software
- Summary
Fixing Hard Drive Problems
Leopard comes with a tool that can check for and repair minor hard drive problems. The program is Disk Utility, and you'll find a copy in the Utilities folder inside the Applications folder. Although Disk Utility is something you will hopefully very seldom use, it is also a very important tool for recovering from drive-related issues.
Repairing File Permissions
If you begin to see system errors related to denied permissions or failures to access needed components, you can run the First Aid component of Disk Utility to verify or repair file permissions. To do so, open Disk Utility from the Utilities folder. Select the drive you want to examine and then click the First Aid button (see Figure 31.3). Verifying permissions displays any anomalies in your file system, but does not fix them. Repair, on the other hand, finds and fixes any issues. These processes might take several minutes, but you can watch as Disk Utility lists all the files on your computer for which the current permissions don't match what they should be.
Figure 31.3 The First Aid component of Mac OS X's Disk Utility can check your drive for basic directory problems and fix them.
Finding and Repairing Hard Disk Damage
In addition to identifying and fixing permissions problems, Disk Utility can verify and repair drives. You can use this feature for preventive maintenance. If you repair your hard drive periodically, you might avoid the "sudden" appearance of a larger hard drive failure. Hard drives, as storage devices that are continuously in use, can develop localized problems before a user becomes aware of them.
You cannot repair directory problems on a startup drive (the drive from which the operating system is running) from the Disk Utility application on your hard drive. If you need to repair your main drive, you must boot from your system installation DVD and run a version of Disk Utility from that disk. To do this, insert the DVD and restart your computer while holding down the C key. When your system is booted, choose Open Disk Utility from the Installer application menu.
After Disk Utility has started, select the disk you want to repair, and then click the First Aid button to display the repair options. You can choose Verify Disk to check for potential problems without repairing them, or choose Repair Disk to check for errors and repair them, if found, all at once.
The nice thing about Disk Utility is that it's free, but it's not a 100% solution. Several popular commercial programs offer to go beyond Disk First Aid in checking your drive and repairing catalog damage. Here's a brief description of several hard drive diagnostic programs and an explanation of what each program does:
- DiskWarrior—This single-purpose program is from Alsoft (www.alsoft.com), a publisher of several Mac utility products. Its stock in trade is the capability to rebuild, rather than repair, a corrupted hard drive directory file. It checks the original catalog to locate the files on your drive and then uses that information to make a new directory to replace the damaged one.
- TechTool Pro—In addition to hard drive repairs, TechTool Pro (www.micromat.com) can optimize the drive and even run a wide range of diagnostic checks on all your computer's hardware and attached devices. One great feature is the capability to perform an extended test of your computer's RAM. This might be helpful if you suddenly face a lot of crashes after doing a RAM upgrade. To add to its bag of tricks, TechTool Pro can also do virus checks. To check a Mac OS X drive, you have to restart from your TechTool Pro CD.
- Drive Genius—Drive Genius (www.prosofteng.com/) is a one-stop shop for everything "disk" related. From drive repair to partitioning and backup, this tool provides a wide range of common disk tools within a single package. Drive Genius is a newcomer compared to DiskWarrior and TechTool Pro, but is arguably the best all-around disk utility available.
Optimizing Your Hard Drive
In the course of normal use of your Mac, the computer continually writes various files, deletes others, and fits them into unallocated spaces on the hard drive. Over time, the hard drive fragments; that is, a single file splits into sections and the different parts spread out wherever they fit.
The demands that large files such as digital video place on the hard drive can cause this fragmentation to have a significant impact on the length of time needed to read or save a file. Defragmenting takes the various parts of each file from different sections of the hard drive and reassembles them into one contiguous block. Doing so allows the computer to read the file without having to jump around the hard drive.
The good news is that Leopard automatically attempts to defragment large files as it writes them to the disk. The bad news is that as your drive fills up, automatic defragmentation becomes less and less effective. Over time, you might want to invest in a third-party defragmentiation solution. Both the TechTool Pro and Drive Genius products discussed in the previous section offer this feature.