Using Disk Utility and fsck for file system maintenance in Mac OS X
When the computer cannot start up normally, you may need to use a disk repair utility. Mac OS X includes two utilities for this, Disk Utility and fsck. In some situations, file system errors may prevent the computer from starting up to a normal state. This could occur after improper shutdown, forced restart, or power interruption.
These symptoms indicate you should use a disk repair utility:
Partial start with command line:
The computer starts up partially then pauses in a command-line (text only) environment. A message such as "file system dirty, run fsck," may appear. Below the message, there is a command line, indicated by a number sign prompt (#). Commands you type in this environment appear next to the prompt. When this happens, run fsck from the command line.
System starts up partially but does not display a command-line prompt:
The computer may start up but fail to reach the login screen, or it may reach the login screen but fail to reach the Desktop after you log in. In this case, you must start up in single-user mode.
Try a Safe Boot
Mac OS X can Safe Boot. A Safe Boot may allow you to restart successfully using a reduced version of system software. In Safe Mode, an automatic disk check and repair may resolve your issue.
Follow these steps:
- Start up in safe mode (on system boot press and hold the shift button after hearing startup tone) .
- After the system is fully started up, restart again normally.
Try Disk Utility
Steps for using Disk Utility
(NEVER use a OS 10.3 (Panther) CD on a 10.4 (Tiger) machine)
- Insert your Mac OS X CD-ROM disc or Restore DVD disc, then restart the computer while holding the C key.
- Once started up from CD or DVD, choose Disk Utility from the Installer menu. Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from disc to access Disk Utility.
- Click the First Aid tab.
- Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
- Select your Mac OS X volume, if necessary.
- Click Repair.
Disk Utility checks the disk.
Always start up from the disc to use Disk Utility.
When to use fsck
Starting in Safe Boot or using Disk Utility usually means you do not need to use fsck but there are exceptions.
- Your Mac OS X disc is not immediately available.
- Your CD-ROM drive is not immediately available.
- You can't start with a Safe Boot.
- Start in single-user (press apple + s keys on boot up) mode to reach the command line.
- At the command-line prompt, type: /sbin/fsck -fy
- Press Return.
The fsck utility will go through five "phases" then return information about the disk's utilization and fragmentation. Once the check is finished, if no issue is found, you should see "** The volume (name of volume) appears to be OK."
Important: If this message appears, but lists errors, repeat the fsck command until it no longer appears. It's OK if you need to do several "passes" of fsck, because first-pass repairs may uncover additional issues.
- When fsck reports that, "** The volume (name of volume) appears to be OK.", type: reboot
- Press Return.