Using dd to copy bad drive - not going well
I've got a 160GB drive that has failed suddenly and dramatically with hardware errors. Some utilities report bad superblock, some report read errors... I'm sure the drive is almost completely dead with serious hardware problems, and I'm not really trying to diagnose that. I'm just trying to recover data from the drives by copying them using dd from the failed drive to a new one.
The dd command sort of works, but I can't mount the resulting copied partition. The grub partition is an ext3 on hdb1. Code:
root@0[knoppix]# dd if=/dev/hdb1 of=/dev/hda1 bs=4096 conv=notrunc,noerror dd started out like this on the copy of the hdb5 partition Code:
root@0[knoppix]# dd if=/dev/hdb5 of=/dev/hda1 bs=4096 conv=notrunc,noerror Code:
dd: reading `/dev/hdb5': Input/output error |
Hmmmmm. The time reported by dd is apparently unrelated to our present space-time continuum. It's not week after next yet, but dd says:
Code:
dd: reading `/dev/hdb5': Input/output error Whaddayathink? |
You might want to look into "ddrescue" and "ddrhelp". "dd" will have slowdowns and possily aborts when it encounters bad spots on the disk. ddrescue will try a couple of times, and finally continue on when it encounters errors. ddrhelp wraps around ddrescue and adds logic that says "when you encounter a bad spot, skip ahead and come bad for the bad spots later". This is good for when your drive is dieing rapidly and you want to recover as much as possible, as quickly as possible, without wasting time on the bad stuff. Do the good stuff first, then come back and make attempts at the bad stuff later.
|
Quote:
|
Thanks, haertig. I'll check it out. One thing about dd is that the disk partitions don't need to be mounted. This is important in this case, since I can't mount these partitions at all. It's funny, because grub half boots, meaning that it loads to stage 2, gets stuck, then comes out with a prompt. None of the command line grub options at that point work.
If dd fails to do the job, I'll definitely try ddrescue and ddrhelp if I find they can operate with the disk unmounted too. Meanwhile, I'm eating a green salad with smoked tomato dressing and smoking GLP Montgomery in a Rad Davis 2005 ASP club pipe Volcano. Digging Lynyrd Skynryrd on the radio. Can't ask for much more. Life is good. |
Quote:
|
These do work on unmounted filesystems.
dd_rescue: http://www.garloff.de/kurt/linux/ddrescue/ dd_rhelp: http://www.kalysto.org/utilities/dd_rhelp/index.en.html Now I'm off to find my old albums, I always liked Sweet Home Alabama and Free Bird (now that you've reminded me!) I know where the albums are, it's just finding a working turntable... ;) |
All times are GMT -5. The time now is 04:09 AM. |