[plug] Finding which files reside in sector XYZ in a FAT filesystem

Tim weirdit at gmail.com
Mon Apr 18 08:57:39 WST 2011


I've recently been recovering a hard drive for a friend. I've used
ddrescue to get what I can off the drive, and now I'm looking for an
easy way to find which files haven't been recovered fully.
The "ddrescue" way is to take a md5sum of all the files, then write
some data (not zero's) to the sectors that couldn't be recovered (in
the image file) and md5sum again. Any differences are files that are
fully or partially in the corrupted areas. This of course is taking a
longtime while it md5sums many Gb's of data.
I'm hoping that there is some way to get from the FAT the filenames
that point into those sectors in the ddrescue log file that couldn't
be recovered. I know from my Comp Sci classes that each directory
points to linked lists of files that have pointers to all the segments
of the file. I hope that the same applies for FAT32 file systems. If
it does, then it should be fairly easy to recurse through those
directory listings looking for any pointers into those sectors. I know
it might not be that easy due to maths being involved in working out
if a block of data happens to be partially in that bad sector list.
Does anyone know of a tool that would let you get that information
from the FAT and recursively go through it working out which files are
in the bad sectors? Or am I dreaming that this is possible?[1]

Thanks

Tim
[1] A linux tool ideally, but if it has to be something else then ok.

-- 
Timothy White - Somewhere in Australia



More information about the plug mailing list