How to recover data from a corrupt hard drives or pendrives, asked by windows to format [using testdisk]

Layman806

Honorable
Mar 12, 2013
33
0
10,530
Hey Guys, if you have a storage device, you may have these problems some o the other part of your lives.
First, for people whose drives are corrupted, and windows requires a format to use it again. Don't format it yet. Not in a hurry!

If on a fine day when you plug it in, windows says that it is corrupted and needs to be formatted... you don't have to necessarily do that.

You may experience this kind of an error generally on pendrives when you pull it off the computer when you are in a hurry. But don't fret, Data is still intact and you may lose nothing! Absolutely nothing! Just follow the instructions below.


    If you have a linux distro at your disposal, its well and good. Install "testdisk" for your distro.
    OR
    Get Ubuntu live iso image and boot it live from a usb
    OR
    Last resort, but I don't like windows. Get "testdisk" for windows

    ■ To start testdisk, open a terminal window in ubuntu, or cmd in windows, and type:
    Code:
    testdisk


    ■ Choose [Create] by pressing enter.


    ■ You will come up with a screen that shows your devices along with their sizes. Use Up/Down keys to navigate, and select the desired device by pressing enter.

    For this tutorial, I have a 2 GB pendrive with a corrupt partition.

    ■ By default, its Intel, so select Intel by pressing enter (or any other, in case, you have modified it sometime in the past)


    ■ Now, select Analyze, by pressing enter


    ■ Press enter again to perform a quick search


    ■ Press enter again to continue...


    ■ This screen is important, so pay attention! Press 'p' to list files, just to check if its the right type.


    ■ Skip this step if you could see the correct file and folder names. But if you cannot, like me, press 'q' to reach the previous screen, then press enter.


    ■ Once you reach this screen, press enter to search deeper... NOTE: This might take a while, depending upon the size of your drive...


    ■ You'll come up this screen. Be patient. Wait for it to complete.


    ■ When completed, you'll come up this screen. Press enter to continue.


    ■ You will come across a screen which has 2 options. One which has a NO NAME at the end, which doesn't have our data. Press the down button to navigate to the second one and press 'p' to list files.


    ■ This time, I am able to view all the files and folders in the partition, which means that the partition recovery has been a success.


    ■ Now that we have figured out the correct partition table, its time to write it to our device. But first, press 'q' to get to the previous screen. Then navigate to the partition type which work correctly for you( In my case, the second one), and press the right key to change its colour to green( its for selecting the partition to write to the device)


    ■ Then, press enter to continue. After that, you'll get the screen which will ask for confirmation. Navigate to Write by pressing the right button and press enter.


    ■ It asks for confirmation again, so press 'y'.


    ■ Reboot for changes to take effect! Its done! YAY!


    ■ Reboot and enjoy!