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.

A couple days ago my windows corrupted and I had to mount Ubuntu onto a usb and install it onto a different hard drive that is also connected to the same computer. I have files that I would LOVE to recover off that other computer but if it comes down to it I can get rid of them I would just like to be able to use the hard drive again. However whenever I try to open the hard drive it give me this error

"Error mounting /dev/sda1 at /media/unknown/Gateway: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda1" "/media/unknown/Gateway"' exited with non-zero exit status 13: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read NTFS $Bitmap: Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details."

Any help would be greatly appreciated. Also if you could break down anything to basic info that would be great I'm new to Ubuntu so I don't really know how to do a lot with it right now.

New Message

"Error mounting /dev/sda1 at /media/unknown/Gateway: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda1" "/media/unknown/Gateway"' exited with non-zero exit status 13: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read NTFS $Bitmap: Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details."
share|improve this question
    
The FS appears to be corrupted, hopefully recoverably. Have you followed the instructions in the error message? –  hexafraction Nov 6 '12 at 21:09
    
I'm not sure how to go about that which is part of the problem, I have no access to anything but Ubuntu and I'm not to well acquainted with it. –  Colby Woolson Nov 7 '12 at 0:37
    
Do you have a Windows installation you can boot into where you can plug in and access the hard disk? –  hexafraction Nov 7 '12 at 0:39
    
As in do I have any access to windows? If so no. –  Colby Woolson Nov 7 '12 at 1:06
    
Take a look at my answer and try that. –  hexafraction Nov 7 '12 at 1:09
show 4 more comments

1 Answer 1

ntfsfix is a program to perform limited NTFS checking. While it won't fix all NTFS troubles, it will fix some problems.

First, ensure ntfs-3g is installed:

sudo apt-get install ntfs-3g

Now, run the following to try to repair:

sudo ntfsfix /dev/sda1

and let it try to fix things up.

If this fails, download and install testdisk. This is a bit more manual but will let you get at any important files that otherwise can't be recovered.

sudo apt-get install testdisk

and run it:

sudo testdisk

You will then see it scanning volumes and then you can select the correct volume. Follow guidelines for what keys do what at the bottom of the terminal window.

All commands are in a terminal. When you open the terminal, wait until you see the prompt ubuntu@ubuntu:~$ before running the command. Since you are in a live CD, you will lose changes when you reboot. Consider installing Ubuntu to a larger external hard disk to have a permanent Ubuntu installation about.
When you use sudo, it might prompt you for the password. On the live media it is ubuntu. If you install Ubuntu, it is your user password. When you type it, it will not be seen(not even ****)

share|improve this answer
add comment

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.