Recovering from Disk and Filesystem Errors

From Mac OS X Server FAQ

Jump to: navigation, search

Standalone Techniques

Single User Mode

Try rebooting in single-user mode (hold down command-S at the start of the boot process) and then run 'fsck' on your startup disk:
fsck -y

If the volume is journaled you'll need to 'force' fsck to check it:
fsck -yf

If you want to be able to use 'diskutil' in single user mode, you'll need to load some frameworks first.

mount -uw /
/usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d
SystemStarter start Disks

Then you can use diskutil.

Booting into single-user mode is good for when you don't have the Installer CD. However in order to boot into single-user mode, the filesystem's integrity must be valid, and BootX, the kernel, and other boot files readable and intact. In the case of severe filesystem damage or situations with lost or deleted files this is often not the case. In which case boot from the Installer CD or other emergency disk volume.

Personal tools
Toolbox