castanyes blaves

Random ramblings about some random stuff, and things; but more stuff than things -- all in a mesmerizing and kaleidoscopic soapbox-like flow of words.


Rescue Data from Failing Partition

Taken from:

If you have a hard disk drive, or a drive partition that is failing, or if you want to copy data from one partition to another, then ddrescue comes to the rescue!

In case parts of the partition you are trying to rescue data from are corrupt, then ddrescue (unlike dd) skips over it and gets out all the data that is uncorrupted!

Install ddrescue using

$sudo apt-get install ddrescue

Make sure you have a partition with more disk space that the entire partition you are trying to retrieve data from. Yes, that includes occupied AND free space on the partition you are trying to retrieve data from. You can use an external USB Hard drive for that.

Rescue data using:

$dd_rescue /dev/hda1 /some/dir/drive-backup.img

Where you might have to replace /dev/hda1 with the partition you are trying to rescue data from, and /some/dir/ should have more free space than the entire /dev/hda1 partition.

This creates a drive image. You can mount it as a loop device. Do the following to do just that:

sudo touch /dev/loop1

sudo losetup /dev/loop1 /some/dir/drive-backup.img

?If you get an ioctl error, run ?$sudo modprobe loop?, and run the prior command again

sudo mount -t ext3 /dev/loop1 /media/drive-backup

(replace ext3 with the filesystem type of your old partition)

Now you can browse /dev/loop1 and copy out all your data. If you use an external USB drive to backup the image to, you can take the image with you :)

Comments: Post a Comment

Subscribe to Post Comments [Atom]

<< Home


200409   200412   200501   200502   200503   200504   200505   200506   200507   200508   200509   200510   200511   200512   200601   200602   200603   200604   200605   200606   200607   200608   200609   200610   200611   200612   200701   200702   200703   200704   200705   200707   200708   200709   200710   200711   200712   200801   200802   200803   200804   200805   200806   200807   200808   200809   200810   200811   200812   200901   200902   200903   200904   200905   200906   200907   200908   200909   200912   201001   201002   201003   201004   201007   201009   201011   201102  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]