How to fix ‘$MFTMirr does not match $MFT (record 0)’

Sometimes, when you are executing a file transfer between your computer hard drive and an external drive and your computer shutdown for some reason (in my case, no battery/ac power) it’s pretty common to get some errors on external drives that uses NTFS as they file system.

The most common message is:

Error mounting: mount exited with exit code 13: $MFTMirr does not match $MFT (record 0).
Failed to mount ‘/dev/sdb3’: 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.

One workaround for this issue is to do as the message says, boot on Windows and try to use the awesome NTFS tool that Windows offer. But a perfect solution for a Linux users is to use the ntfsprogs utility.

UPDATE: On some recent Linux releases, you need to install ntfs-3g utilties.  Try sudo apt-get install ntfs-3g or download from http://www.tuxera.com/community/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) you should 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

103 thoughts on “How to fix ‘$MFTMirr does not match $MFT (record 0)’

  1. Hi,
    Thanks for your info. I have a 1 TB WD Elements external hard drive and using it on a HP laptop with Linux Mint 10. I have a lot of pictures and want to burn them but my laptop can’t burn DVDs so I take it to someone else’s Windows xp system to do that. My external drive is formatted NTFS. I am unable to copy my pics from my laptop to the drive anymore (whatever happened I don’t know). I am careful to eject before powering off. I have scoured the internet looking for solutions and have tried many things but to no avail. Yesterday I took my external drive to the windows xp OS and completed reformatted it to NTFS but this has not made a difference; the same issues remain. The last thing I tried was your suggestion, re.” $MFTMirr does not match $MFT (record 0)” because this is one of the problems showing up. Here are the results of that:
    sudo ntfsfix /dev/sdc1
    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)… Failed to empty $FILE_LogFile/$DATA: Input/output error.
    FAILED
    Failed to reset $LogFile: Input/output error.

    Thanks for your time and for any further suggestions. All the best. Fraser

  2. Hi Fraser,
    Have you tried to boot up Windows OS and run chkdsk on the external drive ? You can try also chkdsk /f . On Linux, the best trick I know is to use ntsfix as the post said… Anotherthing you can do if you access the drive from Windows is to defrag it and then run chkdsk.

    Hope that helps,

    Let me know what happened after that

    ~/William

  3. Thanks for helping me with this problem. I ran chkdsk /f and no problems. I also did a defrag and a.o.k. I tried to defrag first but it wouldn’t go; said something about inconsistencies. Brought it back to my Linux and rebooted and it did mount. I have had it mounted several times before but it sometimes just unmounts by itself. When I do get it to mount, my biggest problem is copying files (mostly pictures) from my laptop to it. It will copy to a certain point and then unmounts. There is no problem copying smaller files, ie. several MB’s, but with larger ones it will copy so much and then unmount. Example, my last effort I managed to copy 1016 MB from a 6.4 GB folder of pics before it unmounted.

    I tried to run the nfsfix but the result I got was:
    sudo ntfsfix /dev/sdb1
    [sudo] password for fraser:
    Refusing to operate on read-write mounted device /dev/sdb1.

    I tried it while unmounted and the result was:
    sudo ntfsfix /dev/sdb1
    Failed to determine whether /dev/sdb1 is mounted: No such file or directory.
    Mounting volume… Error opening partition device: No such file or directory.
    Failed to startup volume: No such file or directory.
    FAILED
    Attempting to correct errors… Error opening partition device: No such file or directory.
    FAILED
    Failed to startup volume: No such file or directory.
    Volume is corrupt. You should run chkdsk.

    I guess I’ll work with what I have until such time that this laptop is replaced with another with a DVD burner and I can format ext3/4. Thanks for your time. All the best. Fraser

  4. Hi,

    very thank you for your post and blog. It solved my problem. I couldn’t at all access my MS Windows files on my NTFS formatted Hard Disk drive from GNU/LInux Ubuntu I was running through a Live CD.

  5. OMFG! Thank you! My main backup drive did this… before I got my files on to my new system. I was freaking out, but I came across this, and voila–One simple command, and everything works. You are a lifesaver!

  6. Hi

    I did this and it let me access my files but i cant find where my ‘users’ files are. I mean things like My Documents/Music/Pictures Etc. Do you know where i can find them or what i should do. These are the files i am after the most.

  7. Hi Mikel,
    It’s quite hard for me to point you where these folders are, for various reasons… But first, check if you have the correct partition mounted, assuming you have multiple partitions on your external drive.
    Also, you can always try to find the folders or files using linux commands like “find”. The common sintaxe for this command is:
    find /path//to/your/folder -name nameOfTheFile

    Or give me any other details about your hard drive and I’ll try to help..

    Regards and good luck!

  8. Thanks for the quick reply. Basically what happened is one day I went to Start up my Laptop and windows 7 wouldn’t start up. Im using a USB to run Ubuntu 10.04.2 LTS edition I think. I followed your instructions and I can now access the hard drive partition that was not mounted before. I can access all program files, $Recycle.Bin, PerfLogs etc. However I am not able to find the Winsows 7 ‘users’ folder that contains the My Documents, My Music etc. I hope this makes it a little clearer. Thanks

  9. Thank you very much. Solved the issue, great help. Funny though how Ubuntu recommends Windows check-disk. :)

  10. William, this was a life saver for me.

    Thanks for putting this out and appreciate your willingness to help the community

    ~Murali

  11. Tive este problema com o meu HD e o mesmo apresentou isto:
    “Error mounting: mount exited with exit code 13: $MFTMirr does not match $MFT (record 0).
    Failed to mount ‘/dev/sdb1’: 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.”
    executei o que está informado aqui, e tudo voltou ao normal.
    Muito obrigado!
    Parabéns e continue assim orientando os demais.

    Alberto Jorge Mesquita
    Usuário Linux

  12. Thank you, you’re simple instruction prevented me from having a panic attack when I thought I borked my external drive!

  13. don’t just install ntfsprogs!!!

    i installed it and it removed my nfs-3g.
    the error message is gone, but now i cannot moung my ntfs-device writeable anymore!!!

    all my ntfs-devices are all read-only now!!!

    dont do apt-get install ntfsprogs!!!!

  14. just re-installing ntfs-3g didnt work, (lots of dependencies not set)

    BUT first uninstalling and afterwards installing ntfs-3g worked

    sudo apt-get remove ntfsprogs
    sudo apt-get install ntfs-3g

    thx :-)

  15. Thanks a bunch. I ran in to this problem back in 2008 and it took forever to figure it out. Couldn’t remember, googled it, found your post, 2 seconds later HD is back up and mounted. Amazing! Thanks again.

  16. Thanks for this article . had just got the HDD replaced and got this tupid error .Was thinking of installing windows just then i found your article worked perfectly.

  17. Thank you so much for this post!!! I almost gave up and reformatted the drive after every single windows tool I used failed, should of looked here first…. Another win for Linux! Great post!

  18. The info below appears above and does not reflect what happened for me.

    With ntfsprogs installed (sudo apt-get install ntfsprogs) you should 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.

    This is what I got instead.

    sudo ntfsfix /dev/sdb
    [sudo] password for jim:
    Mounting volume… NTFS signature is missing.
    FAILED
    Attempting to correct errors… NTFS signature is missing.
    FAILED
    Failed to startup volume: Invalid argument
    NTFS signature is missing.
    Trying the alternate boot sector
    Unrecoverable error
    Volume is corrupt. You should run chkdsk.

    I really am losing all hope and am starting to see formating all of my one of a kind files into oblivion as my only option.

  19. That’s sad. Sometimes it’s not really possible to recover the files using Windows or Linux tools. That’s why NTFS is not a reliable file system for real servers or systems out there.

  20. Lol. just got this same error today. When I saw the chkdsk -f suggestion on the error dialog, I was like “Are you fucking kidding me?”. Thanks for this. Ubuntu should have suggested this option instead, or at least in addition to.

  21. Thank you so much! I was getting worried that my drive was toaster following a windows reboot. Linux couldn’t mount it because of this error, but your instructions saved the day. One database fully recovered :-)

  22. Thx a lot! Just got access to a friend’s hard drive where Windoze didn’t get past chkdsk. Now copying the files to a new disk, saves my friend’s day and mine :-)

  23. sudo ntfsfix /dev/sdb1
    Mounting volume… $MFTMirr does not match $MFT (record 0).
    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…ntfs_attr_mst_pwrite: written=-1: Operation not permitted
    Error writing $Mft record(s): Operation not permitted
    FAILED
    Error correcting $MFTMirr: Operation not permitted

  24. Hey! i followed your suggestions to the work..and it worked like a charm till the end. To be specific I ran ntfsfix just like you said and the terminal gave the output as “NTFS volume version is 3.1.
    NTFS partition /dev/sdb3 was processed successfully.”
    Before, I applied this command, my HDD (WD passport) was getting detected in windows as raw partition though i was unable to open or read any contents of it. After executing the procedure you suggested here, however, the windows is not recognising this as a device. Though when i connected it to windows, there was a popup notification saying “the driver for the unknown device was successfully installed”
    I havent run chkdsk on windows yet. Is there anything that I am missing here? What should I do, Please help.
    Also, I ran ntfsck which says “volume is dirty”.
    Thanks in advance.

  25. This is a very common situation which usually doesn’t require manual intervention. Depending on the brand of your hard drive you need to install a windows driver for it so you stop seeing these messages.

  26. This just MADE my day….if not year. I have had a 500GB+ partition of media that has been giving me corrupted errors and I’ve tried rewriting the image and everything else suggested on linux forums. Have almost lost hope and deleted it, but you have saved it from that fate! Thanks immensely.

  27. KILLER HINT!!! every time this happened I had to plug my HD onto windows machines and not always it used to work!
    Many thanks

  28. After three hours of gradually increasing concern I found your post. Thirty seconds later all is well. Thank you ever so much.

  29. Thank you…. Saved my collection of photos :)
    Did everything step by step and it worked exactly as you said…

  30. Excellent post, and it has aged well, too! Looks like ntfsprogs may be bundled with ntfs-3g now? At any rate, ntfsprogs was not in the default Linux Mint 17 repositories but the needed utility was already installed, giving me a 10 second fix. Getting the brain-damaged Windows OS to even recognize the drive, even after everything is fixed is an exercise in frustration, driver updates, reg hacks, etc., but Linux and OSX handle it with aplomb. Even my router mounts it from USB as a shared drive correctly again.

  31. Thank you for your post. I could not locate or download ntfsprogs. However, ntfsfix is part of ntfs-3g, and with that installed your directins worked perfectly. Thanks.

  32. Thank you so much. You have saved my precious data & time. I am offering you lunch If you ever come to Orlando Fl area :-)

  33. After execute sudo ntfsfix /dev/sda5 I got this erros message.

    Mounting volume… Failed to open ntfs attribute: No such file or directory
    Failed to load $MFT: No such file or directory
    FAILED
    Attempting to correct errors… Failed to open ntfs attribute: No such file or directory
    Failed to load $MFT: No such file or directory
    FAILED
    Failed to startup volume: No such file or directory
    Checking for self-located MFT segment… OK
    Failed to open ntfs attribute: No such file or directory
    Failed to load $MFT: No such file or directory
    Volume is corrupt. You should run chkdsk.

    Is my hard disk damaged?? :/

  34. Thanks a lot man for this post, saved my life! I have a talk in less than 48 hours and all my data was on my stupid extHDD! I thought I lost them all! Was about to cancel my speech! You saved my day! Thanks thanks thanks…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s