Wednesday, November 30, 2011

Data Recovery

This is my method for data recovery of an entire hard drive (adapted from https://help.ubuntu.com/community/DataRecovery)

Need installed:
gddrescue
foremost

sudo apt-get install gddrescue foremost

First connect the hard drive to an external drive reader, in an enclosure, or plug into the computer. Now use fdisk to read where it is at

sudo fdisk -l

once you know where the disk it use ddrescue to make an image file of the drive

sudo ddrescue --no-split /dev/hda1 imagefile logfile

If there are errors run

ddrescue --direct --max-retries=3 /dev/hda1 imagefile logfile

If you still have unread parts use

ddrescue --direct --retrim --max-retries=3 /dev/hda1 imagefile logfile

this should have recovered about all you are going to get

use the testdisk program to go in and copy the data out, (you can use this in the first place to repair partitions)

No comments: