Beginner hint, How to check all file systems?

Tom Mitchell mitch48 at sbcglobal.net
Fri Jan 9 00:30:43 UTC 2004


Q: How to force a check of the file systems?

A: If the file "/forcefsck" exists a file system consistency check
(fsck) will be forced at the next boot up.

The command line commands look like:

	touch /forcefsck
	reboot

This is a better solution than pushing the reset button.  It is true
that pushing the reset button will leave the file "/.autofsck" so file
system checks will take place. However other file systems are at risk
of damage. Also processes are killed with no warning and could leave
their good data in bad states on healthy file systems.

This trick has value because it is hard to run fsck on the root file
system.   Boot time provides a special case where / can be checked.
Scan the startup script that does this magic:

	more /etc/rc.sysinit

=== 
I post this in part because a bunch of us were trying to help a person
with a bad directory/file that they could not remove.  It turned out
that there was file system corruption. This trick might have cleaned
up the trouble and is a reasonable thing to do.


-- 
	T o m  M i t c h e l l 
	mitch48-at-sbcglobal-dot-net





More information about the fedora-list mailing list