How To Recover Data Even When Hard Drive Is Damaged
How To Recover Data Even When Hard Drive Is Damaged
com
Many data recovery services charge big dollars for this, and it is a procedure you can do at home, without having to open the
hard drive. This procedure however, does not work for all cases, but it does work for a big percentage of them even when the
hard drive has the famous “click noise of death”.
Note: Before attempting this procedure, make sure the damaged hard drive is being detected by the computer’s BIOS. If the
computer cannot detect the hard drive then no software will detect it. To do this the drive must be connected directly a computer’s
IDE or SATA cable, not by USB. Then you must go into the computer’s BIOS to see if it is being detected.
The Setup
The procedure involves 3 drives:
2) Your destination drive, this hard drive has to be slightly bigger than the source because it contains the raw image which will
occupy the exact same size as your “source” drive, you then need a little extra space for the log files created by DDrescue. This
drive must be totally empty or data in it will be overwritten!!!.
3) A drive to extract the raw image to. This drive can be the exact same size or bigger than your original “source” drive, but
never smaller. This drive must also be totally empty or the data in it will be overwritten!!!.
Tips
As you can see by the picture down below I have two hard drives connected to the computer’s controller card. One is
the source and the other the destination drive. I usually flip them upside down so that gravity helps a little if the arms are too
close to the plates. However, some hard drives have the arms upside down, so see what works best for you. Be sure to place the
drives on a flat surface to prevent vibration. Both hard drives in the picture are SATA, nevertheless, you can have IDEs restoring
to SATAs and vice versa (or even to USB drives, but they can be harder for Ubuntu Rescue Remix to detect).
https://www.geekyprojects.com/storage/how-to-recover-data-even-when-hard-drive-is-damaged/ 1/4
11/08/2024, 14:49 How to Recover Data Even When Hard Drive is Damaged | geekyprojects.com
Place a 125mm case fan on top of the broken hard drive, making sure the air flows downwards in the direction of the hard
drive. If you have a smaller 2.5 inch laptop hard drive you can use a smaller fan. Just make sure the fan is a little bigger than
the hard drive, otherwise, the air won’t be able to escape and therefore won’t cool the sides of the hard drive. This is done to
ensure optimal performance during recovery. This is optional but highly recommended. Sometimes the drive starts functioning
properly just by cooling it off!.
Plug in the source and destination drives and run the following command that will tell you how many drives Ubuntu is seeing:
The “lshw” command can sometimes be unreliable. If not all of your hard drives are being displayed, try the following command:
cat /proc/partitions
The “cat” command might not give you many details about the drives, but it will display all of them reliably. For example, if “lshw”
only shows you one out of two drives, just by running the “cat” command and using simple deduction you can determine what the
https://www.geekyprojects.com/storage/how-to-recover-data-even-when-hard-drive-is-damaged/ 2/4
11/08/2024, 14:49 How to Recover Data Even When Hard Drive is Damaged | geekyprojects.com
logical name of the missing drive is. (“Cat” will display drives and its partitions; drives are the ones without numbers at the end.
Example: a drive will show as /dev/sda and a partition as /dev/sda1)
Identify the logical name of your destination drive (the drive where you will dump the contents of the damaged hard drive to).
Create a Linux partition on that drive so that you can dump the image from your bad hard drive in there. Lets say, for this
example, you have identified your destination drive as: /dev/sda. (yours could be sdb, sdc, sdd, etc. So change the following
command according to what you have). *** Make sure not to confuse your source and destination drives, or you might
end-up overwriting all your data***. Issue the following command at your shell prompt to format the destination drive:
After formating, mount the destination drive, create a “recovery” directory, and get inside it. To do this execute the following
commands one by one (some of these commands may require sudo in front):
After issuing the last command “cd recovery” you are inside the newly created recovery directory in your destination drive. Now,
assuming you have identified your source hard drive as /dev/sdb (the broken hard drive you will be extracting the data from), run
Ddrescue to extract the raw data, creating a file on the destination drive called “image” and a log file called “log”:
This command will begin extracting the raw image from the bad hard drive, placing it inside the “recovery” directory on your
destination drive. Take a look at the last two words in your command line; “image” is the name you are giving your your raw data
image file, so, all your data will be stored in one single file named “image”. The las word “log”, is the name of your log file. You
can change the name of these two file names to whatever you wish. The log file is extremely useful since it tells Ddrescue at
what point it is during the data extraction process, therefore, it will know at what point to begin again if the process gets
interrupted. In case of such an event all that needs to be done is to issue the same previous command, using the same file and
log names inside the same directory containing the partial raw image file.
and turn the computer off. If you don’t unmount the drive before turning the computer off, the “lshw” command will have a hard
time finding this same drive next time your run the command (notice the command is spelled umount not unmount).
Now we have acquired the image, however, since it is in raw format it is unreadable. We need to extract this image to a third hard
drive. With the computer turned off unplug the damaged hard drive. We do not need it anymore. Plug in a good hard drive of
equal or higher capacity, boot the computer with Ubuntu Rescue Remix and run the command to identify the drives again. Go
inside the directory where the images are stored (in the source drive). Now the hard drive containing the raw image will be
your source and your new empty hard drive will be your destination. Assuming your source drive is /dev/sda (the one
containing the raw image), enter the following commands one by one to mount and enter your source drive:
Then and assuming your destination is /dev/sdb (your new empty drive where the raw image will be restored to), make sure your
drive it empty otherwise you will overwrite your data) issue the following command to restore the image to your new drive:
https://www.geekyprojects.com/storage/how-to-recover-data-even-when-hard-drive-is-damaged/ 3/4
11/08/2024, 14:49 How to Recover Data Even When Hard Drive is Damaged | geekyprojects.com
Click on Start (The start orb in Vista and Windows 7) >> Click Run (“Search for
programs” field in Vista and 7) >> type diskmgmt.msc and press enter.
This will bring up Disk Management. Right click on your newly connected drive
and click on “Mark Partition as Active”
https://www.geekyprojects.com/storage/how-to-recover-data-even-when-hard-drive-is-damaged/ 4/4