Cannot mount USB stick - errors out with "$MFTMirr does not match $MFT"
The error you are seeing indicates the filesystem is not clean and needs checked by Windows chkdsk
. There are components to NTFS filesystem ($MFT
and $MFTMirr
respectively in this case) which say what is where on the disk. These files no longer match each other, which suggests there may be some type of filesystem corruption.
But because it is NTFS, the only way to truly repair NTFS is Windows' chkdsk
utility. (There is a ntfsfix
command, but it is NOT going to be of the same quality of fix as Windows' utilities to check NTFS disks).
When you next have your drive connected to the Windows system, if it asks you to scan and fix the drive, allow Windows to scan and fix the drive. It will try and fix the errors in the filesystem that prevent you from mounting in Linux safely.
Linux users need to use ntfsprogs
utility. On recent Linux releases, you need to install ntfs-3g utilities, so:
sudo apt-get install ntfs-3g
or download from ntfs-3g-download
ntfsprogs
is a suite of NTFS utilities based around a shared library.
The tools are available for free and come with full source code.
- mkntfs: Create an NTFS volume on a partition
- ntfscat: Print a file on the standard output
- ntfsclone: Efficiently backup/restore a volume at the sector level
- ntfscluster: Given a cluster, or sector, find the file
- ntfsfix: Forces Windows to check NTFS at boot time
- ntfsinfo: Dump a file’s attributes, completely
- ntfslabel: Display or set a volume’s label
- ntfslib: Move all the common code into a shared library
- ntfsls: List directory contents
- ntfsresize: Resize an NTFS volume
- ntfsundelete: Find files that have been deleted and recover them
- ntfswipe: Write zeros over the unused parts of the disk
- ntfsdefrag: Defragment files, directories and the MFT
- ntfsck: Perform consistancy checks on a volume
- nttools: Command-line tools to view/change an offline NTFS volume, e.g. ntfscp, ntfsgrep, ntfstouch, ntfsrm, ntfsrmdir, ntfsmkdir
- ntfsdiskedit: Walk the tree of NTFS ondisk structures (and alter them)
Be careful with these utilities, they might damage the filesystem, or your hard disk !
With ntfsprogs
installed (sudo apt-get install ntfsprogs
),
Execute the following commands in a terminal:
$ sudo ntfsfix /dev/partitionName
After this command you should expect the following output:
~$ sudo ntfsfix /dev/sdb3 Mounting volume... FAILED Attempting to correct errors... Processing $MFT and $MFTMirr... Reading $MFT... OK Reading $MFTMirr... OK Comparing $MFTMirr to $MFT... FAILED Correcting differences in $MFTMirr record 0...OK Processing of $MFT and $MFTMirr completed successfully. Setting required flags on partition... OK Going to empty the journal ($LogFile)... OK NTFS volume version is 3.1. NTFS partition /dev/sdb3 was processed successfully.
After this step you should be able to access your external drive partition as usual, mount or use nautilus to access your files.
Source: http://gnuwin32.sourceforge.net/packages/ntfsprogs.htm