Saturday, September 28, 2013

Ubuntu - Fix mount NTFS partition error

If you see this error when trying to mount a NTFS partition (/dev/sda5 for example) in Ubuntu:

Error mounting: mount exited with exit code 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

Run this command line to fix and remount again:

sudo ntfsfix /dev/sda5

ntfsfix is provided by the ntfs-3g package of Ubuntu.