2

My external HDD is not detected in Windows Editions. But it is working well in Ubuntu. The problem is, some of the tracks are damaged, so while browsing through the HDD, the 'Nautilus' stops working. I could not copy those files too. What is the command line arguments should I use to skip the damaged file and copy healthy files.

2 Answers 2

3

If you're unable to copy file by file, use ddrescue to copy the entire partition block by block. ddrescue will just copy the good blocks, leaving the space in the image file where the bad blocks were.

General usage is like this:

sudo ddrescue -n /dev/sda1 sda1.img sda1.log
sudo ddrescue -r3 /dev/sda1 sda1.img sda1.log 

This will copy the entire partition /dev/sda1 to an image file sda1.img. This should be done from a different partition which has enough room for the entire partition image.

The second command will attempt to read from the bad blocks again and fill in the blanks.

Then you can mount the img file and do what you want with the files on them:

sudo mount sda1.img -o loop /mnt; nautilus /mnt

More info:

http://wiki.lunarsoft.net/wiki/Data_Recovery#ddrescue

http://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html

-1

If you know the exact files/directories you want to copy, you could try to run this from the terminal:

cp /media/name-of-hdd/folder-files-to-copy ~/Desktop/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .