fscheck is a small program that automatically detects the filesystem type of each drive, and launches the appropriate filesystem checker. It replaces the shell-script and /etc/fstab usually found in SpareMiNT/EasyMiNT, KGMD and similar unix-like setups. It is meant to be run from mint.cnf, checking the integrity of the filesystems while booting.
It has several advantages over the script/fstab method.
If you don't specify the path to the filesystem checkers, fscheck will look in it's current working directory. This is by default the directory fscheck.prg is located in, it can be changed with the "- cwd" argument.# Specify which fsck to run for each type # of filesystems. # The argument string must contain a "%d" # somewhere, this will be replaced with # the drive letter of the drive to check. # Filesystem names with spaces must be in quotation # marks. #type cmd args minix bin/fsck.mnx -p %d: ext2 bin/fsck.e2 -y -v %d: #dos bin/fsck.fat -n -v %d: # By default all drives except A, B and U are checked. # Optionally specify which drives to check. This means that # *only* these drives will be checked. #drives c,d # Optionally specify drives to not check. All drives except # A, B, U and the ones listed below will be checked. #skip c,d,e
On a simple MiNT setup you would typically put fscheck.prg and the filesystem checkers in the same directory - together with fscheck.cnf - and just run fscheck from mint.cnf:
A simple configuration file that checks and repairs all ext2 partitions would then look like this:exec u:/c/mint/fscheck/fscheck.prg
...assuming that e2fsck is located in the same directory as fscheck.prg. The output from fscheck and e2fsc will then look like this when everything's OK (example from my Falcon):ext2 e2fsck -y -v %d:
Checking filesystem integrity... Drive c: dos: No action. Drive d: dos: No action. Drive e: dos: No action. Drive f: ext2: bin\fsck.e2 -y -v f: f_: clean, 14478/123392 files, 114665/246276 blocks Drive g: ext2: bin\fsck.e2 -y -v g: g_: clean, 19591/123392 files, 112174/246276 blocks Drive h: dos: No action. Drive i: dos: No action.
fscheck.prg
Usage: fscheck.prg -h -q -l -fstab -c <configfile> -cwd
<directory> -drives <list> -skip <drives> -fs
<filesystems> -skipfs <filesystems>
All arguments are optional.
-h - Display this text.
-q - Quiet, fscheck.prg will not output any text.
-c <configfile> - if not specified fscheck.cnf will be loaded from
the current directory.
-cwd <directory> - fscheck will by default set it's current directory
to the directory it resides in. This can be overriden with this
option.
-drives <list> - "list" is a comma-separated list of the drives
that should be checked. All drives except A, B and U will be
checked by default. Overrides the "drives" setting in the
configuration file.
-skip <list> - a comma-separated list of drives to not check.
Overrides the "skip" setting in the configuration file.
-fs <list> - "list" is a comma-separated list of filesystems. All
drives with this filesystem type will be checked, unless filtered
out by the drives/skip/skipfs parameters.
-skipfs <list> - a comma-separated list of filesystems. All drives
with this filesystem will not be checked.
-l - List drives and their filesystem type. Which drives to include
is specified by the drives/skip/fs/skipfs parameters. Default is
to list all drives.
-fstab - as above, except that the list is in the same format as the
/etc/fstab file.