Ubuntu – Can’t use LiveCD to access corrupt hard drive

data-recoverydddisk-imagehard drive

I have a hard drive with 15 bad sectors. I'm trying to rescue the files with the latest Ubuntu LiveCD, but the filesystem errors prevent the filesystem from being mounted correctly. I'm hoping that I'll be able to create an image of the hard drive and load it onto a working hard drive to recover some files.

I don't understand how to use ddrecover very well as I'm new to Ubuntu and Linux in general.
how can i recover the data?

Best Answer

Mount the drive read-only and see if you can get the files off it:

sudo mount -t ntfs --read-only /dev/sdx1 /mnt

I'm assuming since it's a Windows machine that the partition is NTFS and you'll need to change /dev/sdx1 to the correct partion. You can verify both of these with the command.

blkid

If you've got an external backup hard drive with enough space you could do a bit copy of the entire hard drive to a file on the backup drive eg:

sudo dd if=/dev/sdx1 of=/path/to/filename

This will take a while of course. You can keep tabs on the copy if you open up another terminal window and type

watch ls -l /path/to/filename/

This is SOP for data recovery as long as you have the extra disk space (normally you would want to use a SATA drive because of the copying time involved). You could then mount the image to copy the files off it with no fear of the drive failing further, or you could run testdisk on it to recovery missing files.