Safe Boot or Disk Utility vs 'fsck' in OS X
There are several common ways people can verify file system integrity in OS X, including booting to Safe Mode, using Disk Utility, or running the 'fsck' tool. These options have had some people wondering which is best.
One question that has been brought up recently is which disk-checking practice is best when performing maintenance on your system. When a Mac either has problems booting, is experiencing slowdowns, or has just recovered from a crash or power outage it's good to at least verify that the file system structure has not been compromised.
There are several common ways to do this, which include booting to Safe Mode, Booting to Single User mode and running "fsck," or booting to the installation DVD and running Disk Utility. The question that has been brought up is, what is the difference between these methods?
The quick answer is "absolutely nothing."
When you use either fsck or Disk Utility for checking the boot drive on a Mac, both tools will first check the drive's format and then run the verification and repair using the "fsck_hfs" tool which is specific for the HFS and HFS+ file systems. As a result, the following scenarios end up doing the same thing:
Safe Mode: If you boot into Safe Mode by holding Shift at startup, the system will perform a file system consistency check using the "fsck_hfs" tool.
Single User Mode with "fsck": After pressing Command-S at boot to get to the single-user command prompt, people usually run the command "fsck -fy" to do this. Running the "fsck" tool directly will launch the "fsck_hfs" tool on HFS and HFS+ volumes.
Disk Utility: After booting from an alternative boot disk and launching Disk Utility, you can run this routine by clicking either the "Verify Disk" or "Repair Disk" buttons with the desired drives selected. Running Disk Utility either from the boot drive or from an installation disk will use the "fsck_hfs" tool on HFS and HFS+ volumes.
Overall if your system has crashed or is experiencing problems, it does not matter what method you use to run a consistency check since all will use the same method for checking the HFS volume. If you decide to use "Single User Mode" or Disk Utility, you have the option to run the checking routine multiple times until you can confirm all errors have been corrected. If you use Safe Mode, then the check and repair will only run once before the system boots.
For those who might be a bit confused by the need for multiple fsck variants, the main "fsck" command contains support for a number of common Linux and Unix filesystems. However, for support of additional file systems, instead of heavily modifying the fsck program, many operating systems include separate fsck-like tools that are specific for the file systems being used. This is why on various Unix-based systems you may see fsck_hfs, fsck_msdos (for Windows "FAT" file systems), and fsck_ufs/fsck_ffs as available options in addition to the standard fsck command.
Update: Added brief descriptions of how to perform each of the three repair tasks.