home :: technology :: linux :: remoteFsck.txt

May 06, 2004

How to Force an Fsck on the Next Reboot

Continuing on my current run of Linux Tech pieces:

I recently needed to do a full filesystem check on my MythTV DVR box, as it was behaving strangely. Doing this from the command line is fairly hard, as you have to switch runlevels and then unmount your drives.

It's also almost impossible to do remotely, as SSH will shutdown when you switch to single user mode.

As a solution, you can reboot and force the check as it comes back online. to do this, run the following:

su
touch /forcefsck
reboot

When it comes back up, it should be clean! That is, of course, unless it finds problems and needs user interaction. Then you're SOL. There's got to be a better way to do this.

Stolen from perturb.org

Writebacks:

TrackBack ping me @ http://www.glitchnyc.com/static/technology/linux/remoteFsck.trackback

Writebacks have been temporarily diabled due to comment spam. I'll try to get it figured out in the next month or so, but for now, you can comment on recent articles on my syndicated livejournal account

You can also email me at comments2005 A T glitchnyc D 0 T com