# can't mount ntfs partition

## prolific

i have this ntfs partition that i'm trying to mount. it used to work fine but just recently i can't do it anymore.

$ sudo mount /dev/hda1 winxp/ -t ntfs -o nls=utf8,umask=0222

Password: 

mount: wrong fs type, bad option, bad superblock on /dev/hda1,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

so i ran dmesg|tail and got the following output:

NTFS-fs error (device hda1): ntfs_mapping_pairs_decompress(): Corrupt mapping pairs array in non-resident attribute.

NTFS-fs error (device hda1): ntfs_read_inode_mount(): ntfs_mapping_pairs_decompress() failed with error code -5.  $MFT is corrupt.

NTFS-fs error (device hda1): ntfs_read_inode_mount(): Failed. Marking inode as bad.

NTFS-fs error (device hda1): ntfs_fill_super(): Failed to load essential metadata.

i also ran badblocks since i thought maybe the harddrive was dying.

# badblocks -sv /dev/hda1

Checking blocks 0 to 104888352

Checking for bad blocks (read-only test): done                                

Pass completed, 0 bad blocks found.

i also used SeaTools from seagate to check the harddrive and that test passed as well.

----------

## NeddySeagoon

prolific,

The errors say your ntfs is corrupt. Specifically the MFT, which stores the meta data to access your user data is corrupt.

You need to make an image then try some ntfs repair tools.

----------

## prolific

i tried to test TestDisk to fix the MFT but when i selected the Repair MFT option is said "Can't determine which MFT is correct, ntfslib is missing."

are there any other linux utilities that can fix the mft?

----------

## NeddySeagoon

prolific,

have a look at the ntfs-3g project, see what  they recommend. 

Thats where the linux knowledge of ntfs is concentrated.

----------

## tmasscool

Restart windows (let chkdisk fix it) then reboot cleanly, you should then be able to mount it again ...

----------

## prolific

 *tmasscool wrote:*   

> Restart windows (let chkdisk fix it) then reboot cleanly, you should then be able to mount it again ...

 

i tried doing that. right after i select windows from the grub menu, i get a black screen and it just stays there forever.

----------

## alex.blackbit

 *prolific wrote:*   

>  *tmasscool wrote:*   Restart windows (let chkdisk fix it) then reboot cleanly, you should then be able to mount it again ... 
> 
> i tried doing that. right after i select windows from the grub menu, i get a black screen and it just stays there forever.

 

unfortunately this is how windows often behaves, when something not cool happens.

have you already done what NeddySeagoon suggested and made an image of the partition? don't play with the data that is left.

sys-fs/ntfsprogs has some tools that might be useful, read the man pages.

----------

## irgu

It seems to be a bug in the unmaintained ntfs kernel driver. I would also suggest trying the actively developed and apparently much more widely used ntfs-3g: http://gentoo-wiki.com/HOWTO_NTFS_write_with_ntfs-3g

----------

## prolific

i tried ntfs3g and it didn't work either.

i was finally able to access the partition using Active File Recovery and copy over all the files. all of the copied files were oncorrupted so i reformatted the drive and everything seems okay now.

----------

## jcat

Glad you recovered your data.  I believe you would probably be better off using ntfs-3g going forward, seems to be the best choice these days.

Cheers,

jcat

----------

