Maintaining your Mac in good condition isn't terribly difficult, and the effort you do put in will pay off in having to spend less time and effort solving problems. In this section, you will learn about the following maintenance tasks:
Maintaining your system software
Maintaining your hard disks
Backing up your system
Maintaining alternative startup volumes and discs
Building and maintaining a Mac toolkit
Maintaining your applications
Apple continuously updates the OS (and other applications) to solve problems, enhance performance, and introduce new features. Keeping track of the updates manually is time-consuming. Fortunately, you don't have to. You can use the Software Update tool (which consists of a pane in the System Preferences application and the Software Update application) to check, download, and install updates to Mac OS X and related software (such as firmware updates, updates to Apple applications you use, and so on).
To configure Software Update, follow these steps:
Open the System Preferences utility, and then open the Software Update pane (see Figure 28.1).
Use the check boxes, pop-up menu, and other buttons to configure the Software Update schedule (the options are described in the following bulleted list).
Quit the System Preferences utility.
When configuring Software Update, you have the following options:
Manual or Automatic Updates? Use the "Check for updates" check box to determine whether your system will automatically check for updates when you have a network connection. If you check this box, use the pop-up menu to set the frequency with which this checking is done. Your choices are Daily, Weekly, and Monthly.
Download Updates in Background? If you check the "Download important updates in the background" check box, Software Update automatically (you have to select the automatic option for this option to be available) downloads important updates (such as updates to the OS) without bothering you first. When the update has been downloaded and is ready to be installed, you are prompted to start the installation process manually.
Check Now? You can click the Check Now button to manually check for updates.
Installed Updates tab? Here you can see the history of all the updates Software Update has installed for you. Click the tab to see the list of files that were changed and when the changes were made. If you click the "Open as Log File" button, you will see a Console window that provides the same list, but in a different format and in a bit more detail.
Immediately installing available updates is not always a good idea. Sometimes, the updates are flawed, in which case the problems become known pretty quickly. If you want to avoid early adopter problems, you might want to wait a few days after an update is available before you install it on your Mac.
When an update is available and you haven't selected the "download in background" option (whether you check for them manually or automatically), the Software Update application opens (see Figure 28.2). In the top pane of the application's window is a list of all available updates. If you select an update, information about that update appears in the lower pane of the window. You can download and install one or more updates by checking the box next to the update you want to install and clicking the Install button or choosing a specific option from the Update menu.
You can jump straight into the Software Update application (without opening the Software Update pane first) by selecting Apple menu, Software Update.
As with other application installs, you have to authenticate yourself as an administrator to be able to install updates via Software Update.
When you download updates, you can select one of the following download options from the Update menu:
Download only? This option causes the update to be downloaded to your Mac. You have to run the installer manually to install it. Updates are provided as packages you can run just like other application installers. These packages are stored in the Mac OS X/Library/Packages folder, where Mac OS X is the name of your Mac OS X startup volume. When you want to install the update, open this folder and run the update's installer. After the file has been downloaded, a Finder window showing the installer is opened so you can run it easily.
Install? This one downloads and installs the update and then removes the package from your Mac.
Install and Keep Package? This option downloads and installs the update, but it also keeps the package so you can install the update again later if you need to. The update's installer is located in the Mac OS X/Library/Packages folder, where Mac OS X is the name of your Mac OS X startup volume. You can run the installer again from this location.
If you have more than one Mac, the first or third option can be a good choice because you can put the updater on a CD and install it from there on each machine rather than downloading it to each machine one at a time.
When you click the Install button, the Install option is selected. To select one of the other options, you must use the Update menu.
If you selected the "download in background" option, you won't see the Software Update application until the updates have been downloaded to your Mac.
Occasionally, updates are released that are of no value to you, such as updates for languages you don't use, devices you don't have, and so on. Software Update regularly reminds you of these updates until you download them. However, if you see an update that you are sure you won't want to download and install, you can have Software Update ignore that specific update. To do so, use the following steps:
Ignoring an update removes it from this list. If you don't want to install a specific download, just uncheck its check box. To install that update, check its box before you click the Install button.
In the Software Update application, select the update you want to ignore.
Select Update, Ignore Update or press -delete.
Click OK in the resulting warning sheet. The update is removed and you will no longer be prompted to download the current or future versions of the update you ignored.
You can see ignored updates again by selecting Software Update, Reset Ignored Updates. All the updates you have ignored are added back to the Software Update application and you are prompted to download and install them again. You can't choose to restore a single update; you have to restore them all. Of course, you can choose to ignore specific updates again to remove them from the list.
Whether the "download in background" option is good for you or not mostly depends on the type of Internet connection you have. If you have a broadband connection, this option doesn't hurt because you aren't tying up your phone line while updates are downloading. You can just choose not to install any updates you don't want to. If you use a dial-up connection, it is better not to download updates in the background because some of the updates are quite large and you might tie up a phone line for a long time downloading an update you aren't going to install anyway.
After you have downloaded and installed an update, use the Installed Updates tab of the Software Update pane of the System Preferences application to verify that the updates were installed.
Seeing Installed Files
To view all installs that have been done on your Mac, including but not limited to software updates, open the folder Mac OS X/Library/Receipts, where Mac OS X is the name of your Mac OS X startup volume.
In this folder, you will see all the installs that have been performed on your Mac. Most are in .pkg files, but you can't open these to reinstall the software. Because they are receipts, they are for information purposes only.
If you want to manually check for Apple software updates, go to www.apple.com/support. Use the tools on the Apple Support pages to locate and download updates. For example, in the Downloads section, you will see a list of the current updates that are available.
Maintaining your disks will go a long way toward maximizing performance and preventing problems. You can use the Mac OS X Disk Utility application to do basic disk maintenance and repair. For maximum performance, you can also consider defragmenting and optimizing your disks.
Among other things, the Disk Utility application (located in the Applications/Utilities directory) enables you to check for problems with your disks and then repair problems that are found.
Under Mac OS 9 and earlier versions, the Disk Utility was called Disk First Aid. You can still see that heritage in the First Aid tab at the top of the Disk Utility window.
To check and repair a volume, perform the following steps:
Launch Disk Utility. In the left pane of the window are all the disks mounted on your Mac. Each volume on each disk is listed under the disk's icon. You will also see any disk images that have been mounted on the machine.
Even if a disk has only one volume on it, you will see that volume listed under the disk's icon.
Highlight the disk, volume on a disk, or disk image you want to check. When you select a volume, a number of tabs appear in the right pane of the window. How many appear depends on what you select.
If you select a hard disk, the following five tabs appear: First Aid, Erase, Partition, RAID, and Restore.
If you select a volume, you see the following tabs: First Aid, Erase, and Restore.
If you select a CD, you see the First Aid, Erase, Partition, and Restore tabs.
If you select a disk image, the First Aid and Restore tabs appear.
Check the bottom of the window for information about the disk, volume, disc, or image you selected. Again, what you see here depends on what you have selected.
If you select a hard drive, you see the disk type, capacity, and S.M.A.R.T. status; for most disks, the latter provides an indication of the disk's health (Verified if the disk is in good working condition or About to Fail if the disk has problems).
If you select a volume, you see various data about the volume, such as its format, number of folders, size, amount of space used, and the number of files it contains.
If you select a DVD or CD drive, you see the drive's specifications and the types of discs with which the drive can work.
If you select a disk image, you see its description, where it is located, and its current mount status (mounted or not).
Click the First Aid tab to see some information explaining how Disk Utility works.
You can't verify or repair a disk with open files, which means you can't do these tasks with your Mac OS X startup volume. To verify or repair that volume, restart your Mac from the Mac OS X installation CD and select Disk Utility from the Installer menu.
Click Verify Disk. The application checks the selected disk for problems. As it works, you will see progress messages in the First Aid pane. When the process is complete, a report of the results appears (see Figure 28.3).
If problems are found, you are prompted to repair them. Do so.
Quit the application.
For the Mac OS X startup volume, you never really need to run Disk First Aid. That is because the disk is checked and repaired during startup. You can also run a Unix disk repair utility during startup.
You can choose to repair a volume rather than to verify it. When you do so, repairs are made for any problems found immediately after the volume is checked. Generally, you should use the Repair button because it saves you a step.
To learn how to use the Disk Utility to initialize and partition hard disks, see "Initializing and Partitioning a Hard Drive," p. 786.
You can also use the Disk Utility to repair the permissions on the startup volume you are using. This can solve access problems with specific files on the machine when you don't have the required permissions. Do the following:
Select your current startup volume (you have to select the volume, not the disk on which the volume is stored).
Click Verify Disk Permissions. The utility begins checking the permissions for the startup volume. When the process is complete, you see the results in the information window on the First Aid tab.
If problems are found, you are prompted to repair them. You should choose to do so.
Quit the Disk Utility application.
You can use the Repair Disk Permissions button to verify and repair disk permissions in a single step.
Disk Utility has a toolbar, which might be hidden by default. Click the Show Toolbar button in the upper-right corner of the window or select Window, Show Toolbar to view it. As with other Mac OS X toolbars, you can customize its contents as well.
You can also use Disk Utility to quickly erase and reformat volumes or erasable disks (such as CD-RW discs):
Select the disk or volume you want to erase.
Click the Erase tab.
Select the format you want to use for the volume on the Volume pop-up menu. For volumes on hard drives, your choices are Mac OS Extended (Journaled) and Mac OS Extended. If you select a disk, the options are Mac OS Extended (Journaled), Mac OS Extended, MS-DOS File System, and Unix File System.
Name the volume in the Name field.
If you selected a disk, click the Options button. The Erase Options sheet appears with two options. The "Zero all data" option writes zeros in all sectors on the disk. The "8 Way Random Write Format" writes random data over the entire disk eight times. The purpose of these options is to prevent data on the disk from being restored after you erase it. For example, if you were transferring a Mac to someone else, you would want to select one of these options so that the data you had on the disk could not be re-created. These options are really unnecessary unless you will be giving up control of the disk. If you want to use these options, select one or both and click OK.
If the Mac OS 9 Drivers Installed check box appears, uncheck it if you don't want Mac OS 9 drivers installed on the disk or volume. This setting affects only the ability to use the disk or volume when the Mac is booted up under Mac OS 9. Classic is not affected. If you want to be able to use the volume when running Mac OS 9, check the box.
Click Erase. The drive's or volume's data is erased and is formatted with the options you selected.
You can get detailed information about a device or volume by selecting it and clicking the Info button on the toolbar.
Under Mac OS X version 10.3, disks can use the Mac OS (Journaled) file format. This format provides a journal function that tracks activity that has taken place in the main areas of the disk. This log helps re-create the data on the disk and makes repair operations more successful. In most cases, you should use this option because it gives you a better chance of recovering data and disks if you have problems. You can select the Journaled format when you erase a disk or volume, or you can enable journaling on an existing volume. To do the latter, use the following steps:
Select the volume on which you want to enable journaling.
Click the Enable Journaling button on the toolbar; select File, Enable Journaling; or press -J. The journaling information begins to be tracked for the selected disk or volume.
You can disable journaling again by selecting File, Disable Journaling.
As you save files to a disk (again, this means any kind of disk you have mounted on your Mac, except for CD-ROMs, DVD-ROMs, and other locked disks from which you can only read data), data is written to the disk. The Mac is also frequently writing other sorts of data (such as preference changes and other system-level data) to the startup disk. As data is written to a disk, it is written in the next available space (called a block). After the data is laid down, the Mac returns to what it what was doing. When it is time to save more data, the next batch is written in the next open space, and so on. Think of this as the Mac putting all the data down in a straight line (yes, the disk is round, but it is easier to think of it this way), one chunk after another.
As files are opened and closed, data from different files is laid down in the next available space so that, instead of all the data from one file being in a continuous block, it can be stored in blocks located in various spots around the disk. In this state, the data is fragmented. Although fragmentation is a normal part of the way disk drives function, excessive fragmentation can slow down the disk. Things slow down because the drive head must read data from all the blocks that make up a particular file. As those blocks become more numerous and are spread out around the disk, it takes longer and longer to read all the data for that file.
You use a process called defragmentation to correct this condition. You need a disk maintenance program to do this, such as Tech Tool Pro. What the defragmentation process does is pick up all the data blocks for each particular file and write them in a continuous block. It does this for every file on the disk. After the data is laid out nice and neat, the drive performs faster because it doesn't have to move as far to read and write the data for a particular file.
To learn more about Tech Tool Pro, visit www.micromat.com.
Because a hard drive is made up of a round disk that spins at a constant speed, it takes longer to read and write data to various parts of the disk. Data near the center is read more quickly than data out near the rim. Data can be written to the disk in such a way that the access speed of the drive is optimized.
To do this, the data that is used constantly but not changed much?such as the system software and applications?is stored near the center of the disk. The documents and other data that are infrequently used are stored out toward the edge of the disk. This arrangement speeds up the disk because access to the most frequently used data is faster, and keeping the static data together means it will not become fragmented. Thus, the data is read and written in an optimized (for speed) fashion. You also need a disk maintenance tool to optimize a disk.
Usually, defragmentation and optimization are done at the same time using the same tool. The steps to perform these tasks depend on the particular software you use. Generally, this is not complicated and is a matter of choosing the drives you want to defragment and optimize and clicking Start.
Defragmentation and optimization are somewhat controversial topics. Many experts believe they do little to no good, while others believe you can gain some performance and reliability improvements by performing these tasks on your disks regularly. Personally, I think you can better spend your time by keeping your disks well organized and using Disk Utility to check them every so often than worrying about squeezing a few microseconds of performance out of them.
You can do a lot for the performance of your disks by simply keeping them cleaned up. The more data on your drive, the less room you have to store new files. If your disks get too full, their performance slows down significantly. More data means there is more information for your Mac to manage, and thus it has to work harder. You can also run into all kinds of problems if you try to save files to disks that are full to the brim; how full this is depends on the size of the files with which you are working.
Learn and practice good work habits such as deleting files you don't need, uninstalling software you don't use, and archiving files you are done with (such as on a CD-R disc).
Many disk maintenance applications enable you to retrieve files you have deleted (an "undelete" or recover function). This is possible because during normal deletes (when you empty the Trash) the file is removed from the active system but might still exist on the disk in some form. The only way to be permanently rid of a file so it can't be recovered is to write over the area in which that file was stored with other data. To do this, you need an application that writes zeros or other bogus data over the location where the file you are deleting is stored. Typically, disk maintenance and other tools enable you to "really" delete files that you don't want to be able to be recovered. In Mac OS X version 10.3, you can also do this by using the Finder's Secure Empty Trash command.
One of the most important tasks you need to be able to do reliably and quickly is to start up from an alternative startup volume. In several situations you might need to do this. For example, if you find problems on your current startup volume, you will need to start up from another volume to repair that volume. If something happens to your startup volume such that your Mac can no longer use it, you need to use an alternative startup volume to get your Mac running.
Several possibilities exist for alternative startup volumes; you should maintain at least one, and preferably two, of the following options:
Your Mac OS X installation disc? You can always use the disc that contains the Mac OS X installer as a startup volume. It contains the basic software you need to start up your system and repair the system software it contains. The downside to this is that any updates you have applied to your active system are not included in the version on the CD.
An alternative Mac OS X installation on a different volume? You should install a backup installation of Mac OS X on a different volume from the one that you use for your primary system?if you can spare the disk space required to do so. Ideally, this alternative volume will be located on a separate disk (not just a separate volume) from your primary installation. For example, if you have an external FireWire hard drive, you can install Mac OS X on it so you can use it as a startup disk.
If you choose to install a backup version of Mac OS X on an alternative startup volume, you should delete any applications in that Mac OS X installation that you won't need when you are starting up from that volume. This will reduce the storage space it consumes. You also should start up from the volume and run Software Update every so often to keep the alternative startup volume current.
Third-party application discs? Many third-party applications, such as disk maintenance, antivirus, and backup software, include CDs that contain system software you can use to start up your Mac. These discs also enable you to run the application software with the idea that you will be able to correct a problem that has prevented you from starting up your system from the primary startup volume.
To start up your Mac from an alternative volume, restart the machine and hold down the Option key. After a few moments, each valid startup volume appears. Select the volume from which you want to start up and press Return (or click the right-facing arrow).
You can refresh the list of available startup volumes by clicking the Refresh button (its icon is a curved line with an arrowhead).
As always, you can start up your Mac from a CD by holding down the C key while the machine is starting up.
One of the best maintenance-related tasks you can do is to assemble and maintain a Mac toolkit. In times of trouble, this toolkit can enable you to get back to work quickly. Not having to find your tools in times of trouble also reduces the stress you experience. Following are some fundamental items you should keep in your toolkit:
Your system configuration? When you need help or are considering adding something to your system, having a detailed understanding of your system is very important. Use the System Profiler application (in the Applications/Utilities folder) to generate a report on your system. Print that report and keep it handy (in case you can't generate it when you need it).
For more information about Apple System Profiler, see "Using the System Profiler to Create a System Profile," p. 920.
Up-to-date backups? Your toolkit should include everything you need to restore as much of your system as possible.
A disk maintenance application? You need one of these applications to solve disk problems you might encounter. Examples are Tech Tool Pro and Disk Warrior.
When selecting a disk maintenance application, make sure you get one that is written for Mac OS X. Using one designed for an older version of the OS can be harmful to your Mac and its data.
An antivirus application? You'll need this to protect your machine from infection and in the event that your system becomes infected.
Your Mac OS X installation CD? Sometimes, this is the only thing that will get your Mac started again.
Your original application installers on CD or DVD (even if you downloaded the installer originally), serial or registration numbers, and updates? You should maintain the current versions of all your applications by maintaining the CDs on which they came. You should also create CDs or DVDs containing updates to those applications along with any applications you download from the Internet. Finally, be sure you have a list of the serial or registration numbers for your applications so you can restore them if needed. (You'll learn more about this in the next section.)
Consider devising some secure way to record passwords, usernames, serial numbers, and other critical data so you don't have to rely on memory to retrieve such information when you need it. Although keeping such information in hard copy is usually not advised, some people find it safer to develop and use some sort of code for this information and then have a hard copy of the encoded information handy.
Along with the system software, you should also maintain the applications you use. It is good practice to regularly check for updates for the applications on which you rely. There are several ways to do this, including the following:
Many applications include the capability to go online to check for updates, either automatically or manually. For example, most Adobe applications can check for updates to keep you informed when new versions or patches are available.
Company mailing lists? Some publishers maintain a mailing list for each application. Updates are announced in the mailing list, and the link to get to the update is provided.
Company Web sites? Software publishers announce updates to their applications on their Web sites. Typically, you can check for and download updates from the Support area of a publisher's Web site.
Mac news? Many Mac news sites and mailing lists include information about updates to popular applications.
Version Tracker? Most Mac applications are listed on www.versiontracker.com. You should regularly check this site to look for application updates and patches.
As with the system software, it is sometimes wise to let a few days or a week pass after an update is released before you download and install it in case problems are introduced by the update.
You should also organize your applications and ensure that you have all the registration and serial number information you need for each application. It is amazing how easy it is to lose this information; getting it from the publisher can be a time-consuming task. Consider making a list of each application along with its serial number or registration number and keeping that list with the original CDs or the CDs containing the installers that you make for your applications. When you need to reinstall an application, this list will be a great timesaver.
If you obtain an application by downloading it rather than getting it on a CD, you should store the application installer so that you can reinstall it even if the publisher withdraws the installer for some reason (for example, sometimes the installer for one version is removed if a newer version is released). You can save hard drive space by placing these installers on a DVD-R or CD-R disc and storing that disc with your other application CDs.
You should also maintain the installer for any updates or patches you download and install so you can return the application to its current condition if anything happens to the version you have installed.