Manual repair of damaged USB flash drives

Source: Internet
Author: User

Not long ago, due to static electricity or viruses, My USB flash drive suddenly could not read the data. When it was opened, the system prompts that the data needs to be formatted. (If you want to restore data, do not format it or perform any write operations. Remember !!! If the data is important, it is recommended that the storage media be properly stored and sent to the data recovery company .)

I first use the data recovery software for recovery, for example, easyrecover, getdate back, undelete_plus, and so on. (Based on experience, the file recovery wizard is easy to use, and the effect is good, but this time it also has no effect ).

Because the USB flash drive has been damaged for a short time, there should be not many damaged files. This is my spiritual pillar.

No MBR, fat1, fat2, directory, and other data were found.

It seems that the repair is very difficult. In addition, if you do not know much about the file system, it is more difficult to restore the data. So I learned about the FAT file system (my other article)ArticleFor everyone to learn. Or log on to www. sjhf. Net To Find Out)

After I used winhex to view the USB flash drive for multiple times, I found MBR at 0x3c3c4000, and I found it through a sector. fat1 and fat2 (incomplete, but it doesn't matter, is it a backup of fat1?) in MBR, I know that my partition is fat16 and there are two hidden sectors. Each fat is 0xff, And the directory contains 32 sectors, by the way, each cluster has 32 sectors. A total of 0x44000 bytes

I copied the data from 0x0 to 0x44000 and backed up it. Then copy MBR, fat1, and fat2 (repaired) back.

This USB flash drive can be opened, but the folder name is garbled and the file size is incorrect.

The directory is incorrect.

It seems that it is difficult to restore files.

I have already planned to give up.

Use winhex to find some text files that can still be seen, C language files

Copy them first.

I had a whim. Since fat is in good condition, I only need to find each file and start with fat to find the complete file, although there is no file name.

When searching for files, I found several subdirectories, which made me excited, because there are file names, file sizes, and more importantly, the cluster number starting with the file.

Because the slice that the file starts to save should be 0x44000 + (cluster number-2) * Number of slice per cluster (I am here 32)

I was surprised that I did not find the corresponding text file based on this formula. And found it near him.

Is my 0x44000 incorrect !!!!

In the subsequent searches, fat was found at 0x3d1cc000, followed by a directory. According to the observation (which directory I am familiar with), it should be the root directory. It seems that the days of data recovery are not far away, I copied this directory back to 0x40000.

When you open the USB flash drive, the file name in the root directory is correct.

However, the directory at the next level is still incorrect and the file cannot be opened.

Depressed, it seems that the starting address of the Data zone is wrong.

It seems that I can only try to modify the number of hidden sectors for adjustment.

Wish me luck!

For file structure learning, we recommend that you go to www. sjhf. net.

It seems that I am unfortunate.

The cluster number is messy and I'm dizzy.

Make a backup first. The USB flash drive is used. recover the data later. It's crazy to manually fill in fat.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.