
   Display File Systems; version 4.22 12-05-2002  (c) 1994-2002; Jan van Wijk
 ----------------------------[ www.dfsee.com ]-------------------------------


CONTENTS
--------
 Command reference, FAT   specific commands


Command reference, FAT specific commands
----------------------------------------

Active filesystem : FAT, specific commands are:

 \path-spec      = find and show file/directory relative to root (see find)
 FATSELECT [fat] = Select fat to be used (cached), fat = 1 or 2; default is 1
 FATSHOW  [*|nr] = Display contents of the FAT from memory, [nr] entries
 FATSIM  img [f] = Save FAT table contents for FAT 'f' (1 or 2) to an imagefile
 FATWRIM img [f] = Restore an imagefile with the FAT table to FAT 'f' (1 or 2)
 FINDROOT        = Find and list possible FAT32 Rootdirectory clusters/sectors
 SETROOT [s|.nn] = Set FAT32 Rootdirectory LSN to sector [s] or listvalue [.nn]
 FIXBOOT  [os|2] = Fix FAT(32) bootsector from part-info or spares for OS 'os'
 SPACE   [clust] = Show allocation for specified cluster or current LSN 'this'

 For an up-to-date list of commands, use the '?' command

 FAT specific sector types  (see ??? command)
             '1' = First  FAT area      '2' = Second FAT area
             '3' = Start 12-Bits FAT    '4' = Start 16-Bits FAT
             '8' = Start 32-Bits FAT
             '\' = Root directory
             'd' = Sub  directory       'D' = Directory data
             'I' = File data
             'X' = Bad sector-area


 CHECK   [drive] = Check filesystem integrity for drive-letter (CHKDSK)

 Purpose:       Perform a filesystem check, and report the found errors

 Parameters:    none

 Output:        Two lines for each sector in error that is found, the first
                lists the sector-number, where it is referenced from and a
                short description. The second line is an error description
                For FAT the reported arrors are:

                0x00000001  Linked to some structure, but not in allocation-map
                0x00000002  Allocated in allocation-map, but no known link
                0x00000004  Allocation chain ends in a free cluster
                0x00000008  Allocation chain ends in a cluster with bad sectors
                0x00000010  Cluster value is invalid for current volume
                0x00000020  Cluster chain is too long for specified item

 Remarks:       Some of the errors are generic, but most are filesystem
                specific. The generic ones are also listed with the 'SLT'
                command in dfscmds.txt.


 CL              = Translate and display 'this' LSN as a cluster nr

 Purpose:       Find out what cluster-nr corresponds to current LSN

 Parameters:    none

 Output:        The cluster number, or an error message when invalid



 CL clust  [cmd] = Translate specified cluster-nr to LSN, display using 'cmd'

 Purpose:       Display data using a cluster-nr instead of an LSN

 Parameters:    clust   mandatory  The cluster-nr of interest

                cmd     optional   DFS generic command to execute with clust
                                   as its first and only parameter (like 'H')

 Output:        The output for the cmd, when no explicit cmd is specified this
                will be the DFS default for the corresponding LSN, usually a
                display of that sector(s) in an appropriate format.


 FATREAD   [fat] = Read fat from disk into memory, fat = 1 or 2; default is 1

 Purpose:       Update the in-memory FAT from the disk-FAT

 Parameters:    fat     optional   Number of the disk-FAT, either 1 or 2

 Output:        none

 Remarks:       FAT12, FAT16 and FAT32 formats are supported


 FATWRITE  [fat] = Write-back fat memory to disk,  fat = 1 or 2; default is 1

 Purpose:       Update the on-disk FAT with the possibly changed in-memory FAT

 Parameters:    fat     optional   Number of the disk-FAT, either 1 or 2

 Output:        Message indicating success or failure

 Remarks:       This is a potentially dangerous operation, also usually both
                FATs on the disk need to be in-sync. So 2 writes are needed.


 FATSHOW         = Display contents of the FAT from memory

 Purpose:       List all FAT-entries separately for analysis

 Parameters:    none

 Output:        A list of FAT-entries with 8 values in each line, <free>
                <bad> and <eof> values are shown as such.


 FATSIM  img [f] = Save FAT table contents for FAT 'f' (1 or 2) to an imagefile

 Purpose:       Save the complete file allocation table (FAT) to an imagefile

 Parameters:    img     mandatory  Name of the imagefile to create
                f       optional   Number of the disk-FAT, 1 or 2 (default 1)

 Output:        Message indicating success or failure


 FATWRIM img [f] = Restore an imagefile with the FAT table to FAT 'f' (1 or 2)

 Purpose:       Restore the complete file allocation table from an imagefile

 Parameters:    img     mandatory  Name of the imagefile to restore
                f       optional   Number of the disk-FAT, 1 or 2 (default 1)


 Output:        Message indicating success or failure

 Remarks:       This is a potentially dangerous operation, also usually both
                FATs on the disk need to be in-sync. So 2 FATWRIM's are needed.
                The used imagesfile should have the right size, and preferably
                be created with the FATSIM cmd from the same (size) partition


 FINDROOT        = Find and list possible FAT32 Rootdirectory clusters/sectors

 Purpose:       Find possible rootdirectory clusters/sectors when the FAT32
                rootdir reference in the bootsector is missing or damaged.

 Parameters:    none

 Output:        One line for each possible root directory cluster/sector

 Remarks:       All found sectors will be put in the sectorlist as well, and
                can be saved for later use with the 'export' command
                The 'list +f' command can be used to display them, and
                individual ones can be displayed from the sectorlist by
                selecting them with .NNNNN command. Note: this might reuse
                the sectorlist for the directory shown, so make sure you
                have saved the orinal one to be restored with 'import'.


 FIXBOOT  [os|2] = Fix FAT(32) bootsector from part-info or spares for OS 'os'

 Purpose:       Fix corrupted bootsector for a FAT or FAT32 partition

 Parameters:    os | 2  optional  2 = specify 1 or 2 sector spare-copy, FAT32

                              or  x = Code for desired operating system to boot

                                  I or P   IBM/PC-DOS with IBMBIO/IBMDOS.COM
                                  M        MSDOS      with IO/MSDOS.SYS
                                  O        OS/2       with OS2BOOT
                                  N        Win-NT     with NTLDR       (FAT16)
                                  W        Win-9x     not implemented  (FAT16)
                                  9        Win-9x     with WINBOOT.SYS (FAT32)

                                  The default is 'M' for MS-DOS.
                                  OS is only relevant for FAT partitions
                                  that need to be bootable.

 Options:       -s      optional  Force a copy of the SPARE bootsector (FAT32)
                                  Note: The OS parameter will overrule '-s'!

 Output:        Progress and confirmation info

 Remarks:       For FAT32 with a damaged bootsector this will try to copy a
                spare bootsector, either a single one when no parameter, or
                both sectors when the parameter '2' is specified.
                If the bootsector at sector 0 is not-damaged, you can force
                copying the SPARE sector by using the '-s' option.

                Otherwise a valid bootsector will be created based on above
                mentioned bootsector code and size-info from the partition
                table and locations of the FAT area's and Root directory.

                The partitiontable info (type and size) must still be valid,
                or valid FAT's and Root directory must be present, or both.

                OS '9' will be forced when there is a 2nd bootsector with a
                valid FAT32 signature (and freespace info).
                b-OS '9' is NOT VALID yet for FAT16 partitions (to be refined)


 SETROOT [s|.nn] = Set FAT32 Rootdirectory LSN to sector [s] or listvalue [.nn]

 Purpose:       Set the (DFSee internal) value for the root-directory sector

 Parameters:    s|.nn   optional   sectornumber (hex) or a .NNNNN value from
                                   the sectorlist, from a FINDROOT command

 Output:        Message indicating success or failure

 Remarks:       This can be done after finding possible root-directories with
                the FINDROOT command, and will be made eefective with the
                next FIXBOOT command


 SPACE   [clust] = Show allocation for specified cluster or current LSN 'this'

 Purpose:       Show size and fragmentation of allocated space for a cluster

 Parameters:    clust   optional   Cluster number

 Output:        A list of allocation-chunks with LSN's and sizes

 Remarks:       none

