无法安装USB记忆棒 – 错误消息“$ MFTMirr与$ MFT不匹配”

我有一个NTFS格式的USB记忆棒。 当我将它连接到Windows系统时,它工作正常。 但是,当我尝试在我的Linux机器上安装USB记忆棒时,我收到此错误输出:

Error mounting /dev/sdb1 at /media/: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sdb1" "/media/sorin/LICENTA"' exited with non-zero exit status 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, (eg /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more details. 

我该怎么做才能解决这个问题并使我的USB记忆棒再次在Linux上可用?

您看到的错误表明文件系统不干净,需要Windows chkdsk检查。 NTFS文件系统有一些组件(在这种情况下分别为$MFT$MFTMirr ),它们说明磁盘上的位置。 这些文件不再相互匹配,这表明可能存在某种类型的文件系统损坏。

但因为它是NTFS,真正修复NTFS的唯一方法是Windows的chkdsk实用程序。 (有一个ntfsfix命令,但它不会像检查NTFS磁盘的Windows实用程序那样具有相同的修复质量)。

当您下次将驱动器连接到Windows系统时,如果它要求您扫描并修复驱动器,请允许Windows扫描并修复驱动器。 它将尝试修复文件系统中的错误,以防止您安全地在Linux中安装。

Linux用户需要使用ntfsprogs实用程序。 在最近的Linux版本中,您需要安装ntfs-3g实用程序,因此: sudo apt-get install ntfs-3g或从ntfs-3g-download下载

ntfsprogs是一套基于共享库的NTFS实用程序。
这些工具免费提供,并附带完整的源代码。

  • mkntfs:在分区上创建NTFS卷
  • ntfscat:在标准输出上打印文件
  • ntfsclone:在扇区级别高效备份/恢复卷
  • ntfscluster:给定一个集群或扇区,找到该文件
  • ntfsfix:强制Windows在启动时检查NTFS
  • ntfsinfo:完全转储文件的属性
  • ntfslabel:显示或设置卷的标签
  • ntfslib:将所有公共代码移动到共享库中
  • ntfsls:列出目录内容
  • ntfsresize:调整NTFS卷的大小
  • ntfsundelete:查找已删除的文件并将其恢复
  • ntfswipe:在磁盘的未使用部分写入零
  • ntfsdefrag:对文件,目录和MFT进行碎片整理
  • ntfsck:对卷执行一致性检查
  • nttools:用于查看/更改脱机NTFS卷的命令行工具,例如ntfscp,ntfsgrep,ntfstouch,ntfsrm,ntfsrmdir,ntfsmkdir
  • ntfsdiskedit:走NTFS ondisk结构树(并修改它们)

小心这些实用程序,它们可能会损坏文件系统或硬盘!

安装了ntfsprogssudo apt-get install ntfsprogs ),
在终端中执行以下命令:

$ sudo ntfsfix /dev/partitionName

在此命令之后,您应该期望以下输出:

~$ 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.

完成此步骤后,您应该能够像往常一样访问外部驱动器分区,安装或使用nautilus来访问您的文件。

资料来源: http : //gnuwin32.sourceforge.net/packages/ntfsprogs.htm