I feel this question should have a working example so this is how I used ddrescue
0) Installed an identical size (and brand) replacement drive under warranty and moved the old drive to a second slot
1) I used an ubuntu boot cd
I tried the simple option but it immediately produced a lot of errors and hung
dd if=/dev/sdb of=/dev/sda bs=512 conv=noerror,sync
root@ubuntu:~# dd if=/dev/sdb of=/dev/sda bs=512 conv=noerror,sync
dd: error reading ‘/dev/sdb’: Input/output error
57496+0 records in
57496+0 records out
29437952 bytes (29 MB) copied, 6.02927 s, 4.9 MB/s
dd: error reading ‘/dev/sdb’: Input/output error
57496+1 records in
57497+0 records out
29438464 bytes (29 MB) copied, 8.86693 s, 3.3 MB/s
dd: error reading ‘/dev/sdb’: Input/output error
57496+2 records in
57498+0 records out
29438976 bytes (29 MB) copied, 11.7068 s, 2.5 MB/s
dd: error reading ‘/dev/sdb’: Input/output error
57496+3 records in
57499+0 records out
2) Read these articles:
Note the latter recommended using -d
direct disc access, but I didn't use it
3) Installed ddrescue
sudo apt-get install gddrescue
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
sudo apt-get install gddrescue
man ddrescue
May also need (?)
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
4) Finally ran (if you are copying and pasting, stop, sda is my new drive... pay attention and do your homework)
ddrescue -v -r3 /dev/sdb /dev/sda ~/ddrescue.log
- -v verbose
- -r 3 retries
- ~/xx log file which can be used to retry apparently. Note this is only stored in memory but could be copied to a usb drive
Output:
GNU ddrescue 1.17
About to copy 1000 GBytes from /dev/sdb to /dev/sda
Starting positions: infile = 0 B, outfile = 0 B
Copy block size: 128 sectors Initial skip size: 128 sectors
Sector size: 512 Bytes
Press Ctrl-C to interrupt
rescued: 22555 MB, errsize: 196 kB, current rate: 91815 kB/s
ipos: 22555 MB, errors: 5, average rate: 68975 kB/s
opos: 22555 MB, time since last successful read: 0 s
Copying non-tried blocks...
5) Booted windows and reactivated ... tbc
CHKDSK /f
after "phase 3"? – Jun 22 '13 at 18:19