Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to recover movie files from my TNT receiver hard drive but it corrupts its FAT32 allocation table (crappy cheap device...)

Using dosfsck is useless because the correct file length is the cluster length, not the (shorter) one in the table, and dosfsck only proposes to shorten the file, which I won't do.

Question: how to recover a file using the FAT cluster chain instead of using the stored length in the FAT table?


I forgot to say: Linux solutions only please (I have no windows box)

share|improve this question

migrated from Feb 1 '11 at 20:16

This question came from our site for system and network administrators.

What I did with souvenirs of programming, in this case on my PVR, is : 1) mshowfat to obtain the list of clusters. 2) I put in while read with dd....

Most important parts of my shell:

mshowfat p:/$FILENAME | sed "s/>/\n/g" |sed "s/.DAT/\n/" | sed "s/ cp-pvr.log

while IFS=" " read debut fin do taille=$(($fin - $debut)) dd if=/dev/sdbx of="out-file" bs=$BLKSIZE"c" skip=$debut count=$taille seek=$SAUT SAUT=$(($SAUT + $taille))

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .