Wordmark Systems Hard Disk Drive Check Utility: Version 1.0
Copyright 1988, Wordmark Systems
FASDCHK performs checks on fixed or hard disk systems as described below. It
is usually run with something like the following command lines:
FASDCHK << to check all DOS hard disk partitions
FASDCHK -M << to check all fixed drives using MSDOS
disk I/O rather than BIOS I/O
FASDCHK -V or FASDCHK -MV << to generate a more extensive report
FASDCHK D: E: or FASDCHK -M D: E: << to check fixed disk D: and E: only
The full set of options can be listed with the command "FASDCHK ?". They are:
FASDCHK [-F|M|T|S|E|V|L[X]|D|R] [C:[1|2] [D:[1|2] [...]]]
-F -- Fix any repairable file system errors (commercial version only)
-M or -T
-- Skip partition testing and use MSDOS or TOS disk I/O
-S -- Read verify all directories and files on the disk
-E -- Read verify all free clusters on the disk
-V -- Generate a more extensive summary
-L -- List all files in the filesystem
-LX -- List files without heading or reports
-D -- Generate a debug report
-R -- Registration and ordering information (freeware version only)
You may register your copy of FASDCHK (but you do not need to) by sending $5.00
2705 Pinewood Dr.
Garland, Texas 75042
This will entitle you to a copy of the next update to the freeware
version of FASDCHK and notification of all updates (if any) for 12 months.
FASDCHK is provided with no warranty whatsoever, but the freeware version
is a read-only program; it should be compatible with any cacheing or
anti-virus programs you might have.
You may also order the extended version for $19.00. This fully functional
version can be instructed to repair a damaged hard disk file system.
It will merge two defective FATs, repair either FAT, create an
essentially unlimited number of "lost" files in the "\LOST" directory,
and separate files with common clusters by making copies of the shared
clusters. Otherwise it is identical to the freeware version. It is as
easy to use as "CHKDSK/F", and more accurately identifies and corrects
file system errors.
The extended version of FASDCHK comes with one free update and 24 months
notification of additional updates.
FASDCHK has been validated on several different system (mostly IBM compatible,
since I have most effective access to IBM compatible computers).
FASDCHK has been tested on an AST Premium/286, a Zenith Z151, an IBM PC/AT 339,
and a Compaq 386 with the 130 Mbyte drive. It has also been tested with
IBM PCDOS 3.2 and PCDOS 3.3, Zenith MSDOS 2.1 and 3.1, and Compaq MSDOS
3.31. Due to the fact that so many different configurations of hardware
and software are possible, I recommend validating FASDCHK by running the
CHKDSK program on a good logical drive and comparing its results with the
FASDCHK results (since CHKDSK does not report zero-length files, that
difference should be ignored). If this first test fails, try "FASDCHK -M",
to limit the testing to the MSDOS interface. The program normally tests
the partitioning of the drive, the FAT and the directory structure with
direct BIOS calls. Some high capacity disk managers may not support this
use of the BIOS interface -- in this mode, the partitioning tables are not
FASDCHK has also been tested on an Atari 1040ST with an Atari SH204(?) 20
Mbyte hard disk subsystem. I would expect it to work with any system that
could be used with the Atari hard disk driver. The TOS I/O version should
work properly with any hard disk system that functions properly with TOS
(potentially a much larger set of systems). Unlike the IBM PCs, Atari
ST systems do not come with a file system checking utility -- before
"repairing" your hard disk file system, back it up COMPLETELY, there is
always a possibility that, due to a bug in either TOS or FASDCHK or your
hardware, the hard disk file system will be mangled beyond recognition! The
Atari version is slightly less effective in identifying defective boot
sectors because there is less redundant data in the partition table and the
partition's boot sectors, and this is reflected in the slightly smaller
tables displayed with "-V". A VERY IMPORTANT WARNING FOR ATARI USERS:
AFTER REPAIRING A FILE SYSTEM THE ATARI COMPUTER MUST BE RESET BEFORE
WRITING ANYTHING TO THE HARD DISK -- PERMANENT DAMAGE TO THE FILE SYSTEM
MAY RESULT IF TOS CONTINUES TO UPDATE THE CONTENTS OF THE DISK USING THE
ALLOCATION AND DIRECTORY INFORMATION STORED INTERNALLY (WHICH NO LONGER
REFLECT THE CONTENTS OF THE HARD DISK).
If FASDCHK fails on your system, please rerun it with the -D option redirecting
the output to a file, and E-mail the output file to me, Charles Marslett --
Compuserve: 73317,3662 or Usenet: [email protected]
This may provide
enough information to add that file structure to the ones currently
supported. The output is a plain ASCII text file, so you may (of course)
edit out any confidential information that might appear. Editing will not
normally affect the interpretation of the file system structure.
DRIVE PARTITIONING VALIDATION STEPS (only if no -M option):
1. Read the boot sector of each physical hard disk drive on the system
identifying each as partitioned or unpartitioned.
2. Build a table of logical drive configurations for each partitioned and
3. Identify which partitions are DOS-accessable and in what order they are
labeled (C:, D:, etc.) and associate each with a hard drive ID letter.
4. Insure all table entries are "reasonable", partitions do not overlap and
partitions start and end within the drive limits (this applies to the IBM
PC version only).***
LOGICAL DRIVE TESTS:
5. Read the logical boot sector of each DOS-accessable partition and locate
its FATs, root directory and data area.
6. Identify those partitions that use 12-bit FATs and those that use 16-bit
7. Read the first two copies of the FAT and check them for any differences
-- reporting any found (unless the partition contains a single FAT, in
which case that fact is reported).
8. Identify all the files on the disk from the FAT data, identify all clusters
marked as bad, and count the number of free clusters in the FAT.
9. Report any cluster chains that are cross-linked or linked to a free
cluster, report any invalid FAT entries, and report the number of free and
10.Scan all directories in the partition, identifying any files that duplicate
another (have the same cluster sequence), are a tail of another (begin in
the middle of another file's cluster sequence), or are linked to from
a lost cluster sequence (begin in the middle of a lost file).
11.Report all lost files in the partition.
12.Report any file whose length is not consistent with its cluster count.
13.Report any file of zero length that does not have 0 as its first cluster.
14.Report any directory whose length is not zero or its actual size.
15.Optionally, skip steps 1-4 and test the file system using DOS I/O calls
only (-M or -T). This will permit checking file systems that use unsup-
ported drive hardware interfaces or partitioning schemes. On IBM PC
systems, it also adds about 20% to the execution time of the program.
16.Optionally, read every active cluster on the disk and report if any
read errors occur (-S). This will increase running time by 1 or 2
minutes for each 10 Mbytes in the file system on a typical AT class
computer. The cluster number and the file name are reported.
17.Optionally, read every free cluster on the disk and report if any read
errors occur (-E; forced if both -S and -F are selected). The cluster
number of each read error is reported.
18.Optionally, report every directory processed as well as a summary of
partitioning information (-V).
19.Optionally, generate a DEBUG report to identify incompatibilities with
a DOS or file system so future versions will be even more general (-D).
This report is a superset of the -V report.
20.Optionally, list all the files on the hard disks with no other information
(-LX) or with a flag summary (hidden, system, read-only) and the normal
21.Report the following in a partition summary:
Volume Label (if present)
Partition Size (in Mbytes, bytes and clusters)
Directory Totals (in bytes and clusters)
Hidden file Totals (in bytes)
Number of Zero-length files
Ordinary file Totals (in bytes)
Free space Total (in bytes and clusters)
Bad sector Total (in bytes and clusters)
REPAIR STEPS (-F option with the retail version):
A. Convert any invalid FAT entries to free clusters.
B. Optionally, read all free clusters, marking those that result in I/O
errors as defective (-FS or -FE).
C. If any lost files exist and the directory "\LOST" does not exist, create
it. If a file exists named "\LOST", move it to "\LOST\LOST".
D. If any lost files appear to be directories, incorporate them into the
"\LOST" directory structure first as "\LOST\DIR0000", etc. Files
within these directories will be recovered with their file names
E. Incorporate any remaining lost files into the directory "\LOST" as
F. Convert free clusters linked to file chains into "EOF" clusters.
G. Optionally, duplicate data from defective clusters so no file chain
includes a defective cluster (-FS). ***
G. For each pair of cross linked, tailed or duplicated files, copy the
necessary data to free clusters so as to create two disjoint files. ***
H. For files whose lengths leave empty clusters, optionally free the empty
clusters (-FC) or adjust the file length to match the cluster count
I. For files whose lengths exceed their number of clusters, adjust the file
length to match the cluster count. ***
Note that the "LOGICAL DRIVE TESTS" and "REPAIR STEPS" may be performed on
all logical drives (the default) or on a limited set of fixed drives (by
specifying a drive list on the command line). The "PARTITION VALIDATION
STEPS" are always performed on all recognized partitions.
Also note that on a file system with very few free clusters, all repair steps
may not be taken if insufficient free clusters are available -- steps C-G
can sometimes consume a large numbers of free clusters. Repair operations
that fail in this way may cause more file system damage than they correct!
NOTE: Steps marked with *** are not completely implemented.
1. 10 Mbyte drives (with 12-bit FATs and more than 2046 clusters) were
not properly checked -- vast numbers of invalid file linkages were
reported when the file system was undamaged.
2. A test removed because it appeared to indicate partition tables were
defective when they were not has been restored (the counterexample
turned out to be a VERY bad file system that CHKDSK was happy with --
until DOS 3.3 ran off the end of the drive). IBM's FDISK seem to
configure a drive with 8 heads that was once formatted as if it had
6 as a strange hybrid that falls apart when the drive fills up
with data. The error message "Boot sector configuration conflicts
with partition configuration!" indicates this very real time bomb, but
it may occur in other (innocuous) cases.
3. The FAT comparison code now reports all mismatches, not just the
4. The "DEBUG" output from a FAT comparison dumped the wrong area of
memory, and reported the error offset incorrectly.
5. Early versions did not recognize PCDOS 3.3 extended partitions that
had ID bytes of 01 -- 04 is the normal ID, but sometimes PCDOS uses 01
(if the partition is less than 10 MB?) so that value is now accepted,
as well. Allowing for reasonable variations, the extended partition
entries can also start with entry 3 rather than entry 0 -- is anyone
aware of an FDISK that does it this way?
6. The "\LOST" directory may already have files of the name FILE????,
and those names needed to be skipped over when adding new ones!
7. When copying a read-error cluster to a new location, if the cluster is
the first in the file, the linkage from the directory is not always
8. Cluster chains pointed to by directories inserted into "\LOST" are
neither validated nor added to the tabulation -- this is a serious
problem, so temporarily the feature is disabled.
9. FASDCHK could modify the drive layout to skip over bad sectors in the
root directory, shrinking the directory size if need be, to avoid the
largest remaining repair hole [a defective root directory].
10. Files with common "tail"s (including those crosslinked with "lost"
files) and files that are "tail"s of lost files are not seperated
11. Some IBM PCDOS 3.3 partitions are not explicitly listed in the partition
tables (they are apparently implied when an extended partition includes
a logical type-01 partition). These partitions are presumed to be
located in the "gap" before the first type-01 partition of the parent
extended partition. Any further information on this format would be
12. FASDCHK still does not work properly with Plus brand hard-cards.
(sorry, I haven't had access to one recently.)
Charles Marslett -- 28 July 1988