mshowfat
Show FAT filesystem information
SYNOPSIS
mshowfat [-i] [-v] [-h] msdosdevice [first_cluster [last_cluster]]
PARAMETERS
-i, --inode
Display inode numbers for allocated clusters.
-v, --verbose
Verbose output with cluster numbers and status details.
-h, --help
Show help message and exit.
msdosdevice
DOS device, disk image, or drive letter (e.g., A:, /dev/sda1).
first_cluster
Starting cluster number (default: 0).
last_cluster
Ending cluster number (default: end of FAT).
DESCRIPTION
mshowfat is a utility from the mtools package, designed to inspect the File Allocation Table (FAT) of MS-DOS or Windows filesystems on Linux/Unix systems. It allows users to view the allocation status of clusters on a floppy disk, hard disk partition, or disk image file without mounting the filesystem.
The command reads the FAT directly from the specified device or file, displaying a map of clusters. Each cluster's status is represented by symbols: . for free, # for allocated, E for end-of-file markers, and others like B for bad sectors. This is invaluable for diagnosing disk issues, such as fragmentation, lost clusters, or filesystem corruption on legacy DOS media.
In non-verbose mode, output is compact, showing a sequential line of symbols. Verbose mode (-v) adds cluster numbers and detailed status. Users specify a DOS device (e.g., /dev/fd0 or an image file) and optionally a range of sectors to limit output. mshowfat respects the mtools.conf configuration for drive definitions, enabling access to physical devices or files via symbolic names like A:.
Common use cases include troubleshooting boot floppies, analyzing disk images in forensics, or verifying FAT integrity before formatting. It supports FAT12, FAT16, and FAT32, making it relevant for old hardware emulation or retro computing.
CAVEATS
Requires read access to device; configure mtools.conf for drive mapping. Does not support long filenames or NTFS. Output assumes little-endian byte order.
OUTPUT SYMBOLS
. free cluster
# allocated
E end-of-file
* reserved
B bad sector
? unknown
EXAMPLE
mshowfat -v A: 0 10
Shows verbose FAT for first 11 clusters on drive A:.
HISTORY
Part of mtools suite, originally developed by Volker Lendecke in 1992 for Linux MS-DOS access. Maintained as open-source; current versions (4.0+) support modern FAT types.


