Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

Edit

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

share|improve this question

migrated from serverfault.com Feb 1 '11 at 20:16

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.