Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
windowsEscapist - why did you demark my question without leaving any feedback? That is a serious question. you dont have an answer, go somewhere else –  RULE 2 -- Double Tap Dec 27 '12 at 1:11

1 Answer 1

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.

share|improve this answer
    
well so far not so good. its a ntfs partion. the code lines read [ntfs_attr_pread_i: ntfs_pread failed: Input/output error][Failed to read NTFS $bitmap:input/output error][run windows chkdsk /f and reboot twice] the issue is its having a boot problem. Maybe ill see if i can get into safe mode with cmd. but ill report on it as soon as i know more. p.s. how do people in linux know so much about codes. Im usually a windows guy, but im very interested in getting familiar with ubuntu –  RULE 2 -- Double Tap Dec 23 '12 at 18:35
    
also is the latest ubuntu still allowing the make of live cds? i downloaded it but it wont let me make a live cd. –  RULE 2 -- Double Tap Dec 23 '12 at 19:01
1  
If the drive is failing, I don't recommend trying to boot windows, even in safe mode. You could make the problem much worse if the drive continues to degrade. If you can't make a bit copy of the drive, you should boot Ubuntu and install testdisk to see if it will help you discover files on the broken file system. The drive could become completely unreadable at any time. –  fabricator4 Dec 23 '12 at 21:06
    
is it possbile to use ddrecover as a read only state? even with the mounting error –  RULE 2 -- Double Tap Dec 24 '12 at 1:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.