Force fsck on headless servers and remote macs

Aug 18, '10 07:30:00AM

Contributed by: pglock

Following a system crash I had a server which was failing 'Verify Disk' in Disk Utility on the boot drive. Read on for how to use Safe Boot mode to repair a boot drive over ssh.

I administer a network of Mac clients and OSX server for a small business. I'm usually remote from the office so I look for ways of doing system admin tasks via ssh wherever possible. The main production OSX server, an ageing PowerMac G5 running headless, had crashed recently requiring a forced reboot (getting someone in the office to hold down the power button).

After any crash I usually run diskutil verify /.

In this case diskutil found corruption on the boot disk. To fix this on any Machine I have physical access to I would usually just start up in single user mode (hold down 'S' when booting), then run fsck -fy but in this case I couldn't get to the Machine, and there's no keyboard or monitor attached to it in any case.

For emergencies, I set the Macs up with an install DVD image in a partition. It would be possible to force the server to boot into the install partition, and then use Remote Desktop or ssh to access the box. I was looking for a simpler way.

Reading this Apple support article, I figured out that a cleaner way is to:

That should produce the same results as sitting at the console directly.

[crarko adds: I haven't tested this one.]

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20100817234641880