Since this is invoked by one of the startup scripts of your OS, the exact behaviour might be a bit different depending on the implementation of your OS (and the specific OS version, eg. Ubuntu had this feature in
/etc/init.d/checkfs.sh
for quite a long time, then moved it somewhere else). The point is that at some step of your boot process the
fsck
tool is started with a set of commandline parameters. Eg. Ubuntu Hardy executes something like this:
fsck -C -V -R -A -a -f
Of course for this to work properly, only the root filesystem should be mounted. To get this right, you should boot the system either into single user mode or boot from a LiveCD (or LiveUSB) and chroot into your existing installation before executing the above command.
For a single filesystem you can execute something like this:
fsck.ext3 -a -f -C0 /dev/vol01/yourfilesystem
Or for ext4:
fsck.ext4 -a -f -C0 /dev/vol01/yourfilesystem
Of course the last argument should point to the device of your filesystem (which might be anything from
/dev/sda1
to
/dev/mapper/vol01-yourfilesystem
or
/dev/dm-3
).
P.S.: AFAIK there's no "basic" and "thorough" fsck. If you run
fsck
with the
-f
(force) option, it'll do the same checks regardless of all the other options. So in the above examples the
-a
and
-C0
(etc.) options do not change the "thoroughness" of fsck. A simple
fsck.ext3 -f /dev/vol01/yourfilesystem
will do just as well, but it'll ask you whether to fix any problems found and it'll not show you a progress bar so you'll never know whether it'll take another 3 hours or just 5 minutes to finish.
Recent comments
2 years 19 weeks ago
3 years 41 weeks ago
3 years 41 weeks ago
3 years 43 weeks ago
3 years 44 weeks ago
3 years 51 weeks ago
3 years 51 weeks ago
3 years 51 weeks ago
3 years 51 weeks ago
3 years 51 weeks ago