a partial solution
dd if=/dev/zero count=100 bs=1k of=fs.fat
mkfs -t vfat fs.fat
mount fs.fat /mnt ## as root
# cp some file
umount /mnt ## as root
cp fs.fat fs.ref
vi fs.ref ## change some bytes
cp fs.ref fs.sampleX
now you have a good fs (fs.fat) and a corrupted one (fs.ref)
sudo mount -t vfat fs.ref /mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
- you can try to fix
fs.sampleX
- knowing a bit about fat (or filesystem layout) might help to "cleverly corrupt" fs.ref
- this can be applied to any fs type (
extX, xfs, ... )