T
tobin fricke
I'm messing with the image of a FAT16 volume in an attempt to retrieve
data from a volume that was accidentally formatted (whoops!). The
symptom of the formatting was that the FAT was zeroed out and a few
new files were written, but I figure that most of the data should be
okay, and that, assuming the disk wasn't *too* fragmented, I should be
able to get some data out.
Question regarding interpretation of a directory entry: a directory
entry gives a starting cluster for a file. How do I convert this to a
byte offset? My current calculation is this:
root_dir_offset = (reserved_clusters * sectors_per_cluster + n_fats *
sectors_per_fat)*bytes_per_sector;
offset = root_dir_offset + max_root_dir_entries*32 +
(starting_cluster * bytes_per_cluster);
That seems right.. but the data isn't there! maybe my filesystem is
more screwed up than I thought. or.. ?
data from a volume that was accidentally formatted (whoops!). The
symptom of the formatting was that the FAT was zeroed out and a few
new files were written, but I figure that most of the data should be
okay, and that, assuming the disk wasn't *too* fragmented, I should be
able to get some data out.
Question regarding interpretation of a directory entry: a directory
entry gives a starting cluster for a file. How do I convert this to a
byte offset? My current calculation is this:
root_dir_offset = (reserved_clusters * sectors_per_cluster + n_fats *
sectors_per_fat)*bytes_per_sector;
offset = root_dir_offset + max_root_dir_entries*32 +
(starting_cluster * bytes_per_cluster);
That seems right.. but the data isn't there! maybe my filesystem is
more screwed up than I thought. or.. ?