fsck can't find fsck.ntfs

  • On several machines that I've upgraded from Natty to Oneiric, I get an error every boot (one for every NTFS partition):

    Serious errors were found while checking the disk drive for /windows/c.
    
    Press I to ignore, S to skip mounting, or M for manual recovery
    

    Following the suggestion in this answer, I ran fsck from the manual recovery shell. I got this output:

    fsck from util-linux 2.19.1
    fsck: fsck.ntfs: not found
    fsck: Error 2 while executing fsck.ntfs for /dev/sda1
    

    I can't find fsck.ntfs, and command-not-found doesn't help either. How can I make this error go away?

    By the way, I've tried booting into Windows (XP) several times, thinking that Windows would repair the filesystems. But apparently Windows thinks the filesysystems are just fine. And it's odd that all NTFS filesystems are affected.

    Also, I can work around this problem by dropping to a recovery shell and issuing mount -a, but for my coworkers' sakes I need unattended boot.

    I can't find `fsck.ntfs` I think you should go with `ntfsck` or `ntfsfix` for ntfs partitions, AFAIK `fsck` is mainly used for ext partition.

  • Micro

    Micro Correct answer

    9 years ago

    fsck.ntfs is usually only a link to ntfsfix which is an utility from the package ntfsprogs that is already available with a standard installation of Ubuntu.

    You can make a simbolic link between fsck.ntfs and ntfsfix to solve this permanently:

    sudo ln -s /usr/bin/ntfsfix /sbin/fsck.ntfs
    sudo ln -s /usr/bin/ntfsfix /sbin/fsck.ntfs-3g
    

    Keep in mind that this utility came from a reverse engineering process and are not the best option to manage your filesystem, the NTFS filesystem does not belong to the GNU/linux world.

    Thanks. I set up the symlinks (which should have been made already) and the problem is solved. The only question that remains is: Why was the symlink missing in the first place? fsck apparently runs on boot. Therefore, it is a bug if it tries to check a filesystem that it can't handle. The partition was--and has been--perfectly fine. Apparently this was just a routine check that was failing.

    It is funny I trust a community reversed engineered tool a lot more than the official Microsoft tool which destroyed my perfectly working NTFS partitions before :)

    Doesn't work to me. Ubuntu 12.04.3

    You can count more on Linux-based tools to recover your Windows installation and data than the Windows-based tools. Also I experienced that Linux lets you do things such as putting question marks in your filenames; this is officially permitted by NTFS standards but here's the joke: the Windows driver doesn't support it! I would like to point at dedicated "Linux-based Rescue / Repair Live-CDs" (or USB) such as SystemRescueCD.

    Ubuntu 14.04 lacks the ntfsprogs package.

  • I think it could be noted for some people that ntfsfix gets installed into /bin/ instead of /usr/bin. So

    sudo ln -nsf /bin/ntfsfix /sbin/fsck.ntfs
    sudo ln -nsf /bin/ntfsfix /sbin/fsck.ntfs-3g
    

    If you have already created the symlink from /usr/bin/

    sudo rm -f /sbin/fsck.ntfs
    sudo rm -f /sbin/fsck.ntfs-3g
    

    And then create the symlinks again.

    upvoted because a) downvoter left no comment explaining downvote, which would be courteous at least, and b) just had to 'locate ntfsfix' to find mine at /bin/ntfsfix, so it seems relevant at least.

    I would suggest adding this as a comment to Micro's answer, rather than as a standalone answer.

    This is the correct answer for later versions of ubuntu like 13.04

    This worked for me in Ubuntu 14.04!

  • If you have an NTFS partition automatically mounted at startup, the only reason could be you have manually or through some tool added it to /etc/fstab (not taking into account WUBI).

    If the system tries to check the partition at startup it means that in the corresponding line in /etc/fstab there is a sixth field and its value is 1 or 2.

    ntfsfix is not linked by default to fsck.ntfs, and it only provides limited check capabilities, as explained in the man page:

    ntfsfix is a utility that fixes some common NTFS problems. ntfsfix is NOT a Linux version of chkdsk. It only repairs some fundamental NTFS inconsistencies, resets the NTFS journal file and schedules an NTFS consistency check for the first boot into Windows.

    The common solution is not to create the symlink, but to remove or set to 0 the sixth field in /etc/fstab.

    Actually, that's not exactly accurate. During installation, existing NTFS partitions get automatically added to fstab without any manual editing of fstab. So, they should get added in a sane way. I don't care whether they get checked or not. I just don't want unnecessary errors messages showing up at boot when in reality there is no error.

    Never seen this behavior in older Ubuntu releases, when I had ntfs partitions. I suppose is a new features, now that I do not use ntfs anymore. Btw, you did not say if there was the non-zero number in fstab.

    This might explain the problem: On the machine in question, there is indeed a nonzero number in fstab. On another machine, I formerly had this same problem, but it went away after I did a reinstall to solve a different issue. The new fstab has the sixth field set to zero. So, apparently the defaults changed between Natty and Oneiric and the upgrade didn't make any conversions.

    Me thinks that the "pass" argument is just in what order the partitions should be auto mounted, so this seems to be new in Oneiric. I just upgraded recently and I have had pass=3 set on my ntfs partitions, and I never had any problem until the first boot in oneiric. It got stuck on some stupid promt hidden among some irrelevant error messages. Not cool for a server to wait for a keypress during boot.

  • Micro's answer worked for me, however my 11.10 (upgraded from 11.04) did not have ntfsprogs. 'sudo apt-get install ntfsprogs' solved that, then the link suggestion worked fine.

  • The problem is a missing symbolic link, to either /usr/bin/ntfsfix or /bin/ntfsfix. You can make the needed link(s) with:

    sudo ln -s $(which ntfsfix) /sbin/fsck.ntfs
    sudo ln -s $(which ntfsfix) /sbin/fsck.ntfs-3
    

    This worked for me on Ubuntu 14.04 LTS on April 13th, 2015

  • I have the same problem after I accidentally installed ntfsprogs. I think there is bug in dependencies because after installation of ntfsprogs all NTFS drives started mounting read-only.

    When I turned back ntfs-3g, fsck.ntfs disappeared.

    SO:

    sudo apt-get install ntfsprogs
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages will be REMOVED:
      ntfs-3g
    The following NEW packages will be installed:
      ntfsprogs
    0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
    

    BUT:

    apt-cache showpkg ntfs-3g
    Package: ntfs-3g
    Versions: 
    1:2011.4.12AR.4-2ubuntu3 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_oneiric_main_binary-amd64_Packages) (/var/lib/dpkg/status)
    ...
    Provides: 
    1:2011.4.12AR.4-2ubuntu3 - ntfsprogs 
    

    I'm not sure what should be the right behavior there but be aware of it.

    I think so my usb is no useful furthermore please confirm :ntfsfix /dev/sdc1 Mounting volume... The disk contains an unclean file system (0, 0). FAILED Attempting to correct errors... Processing $MFT and $MFTMirr... Reading $MFT... OK Reading $MFTMirr... OK Comparing $MFTMirr to $MFT... OK Processing of $MFT and $MFTMirr completed successfully. Setting required flags on partition... OK Going to empty the journal ($LogFile)... OK Failed to sync device /dev/sdc1: Input/output error Checking the alternate boot sector... OK

    NTFS volume version is 3.1. NTFS partition /dev/sdc1 was processed successfully. Failed to sync device /dev/sdc1: Input/output error Failed to unmount partition

  • On ubuntu 14.04 package is not available as of Jan 2015

    1. sudo ln -s /bin/ntfsfix /sbin/fsck.ntfs
    2. sudo ln -s /bin/ntfsfix /sbin/fsck.ntfs-3g
    3. sudo apt-get install ntfsprogs

      Package ntfsprogs is not available, but is referred to by another package.
      This may mean that the package is missing, has been obsoleted, or
      is only available from another source
      E: Package 'ntfsprogs' has no installation candidate
      
  • Try to force remapping of damaged sectors using this script: https://techoverflow.net/blog/2015/01/07/fixing-bad-blocks-on-hdds-using-fixhdd.py/

    mirror: https://github.com/unxed/fixhdd

    This script looks into system log for i/o errors every 5 seconds and writes zeroes to faulty sectors to force hdd controller to remap them. Usage sample: sudo fixhdd.py --loop /dev/sda

    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.

  • $ man fsck
    

    fsck - check and repair a Linux filesystem

    To repair a broken NTFS system on GNU / Linux you could use ntfsfix which is part of ntfs-3g as following:

    $ ntfsfix /dev/sdc1
    

    -1: This answer is unrelated to the question.

    @ScottSeverance /me being down voted for not ignoring the tools application as stated in their manual -- only in Ubuntu forums haha

    The question was about `fsck.ntfs` not being found at boot. Obviously, reporting the man page of irrelevant, since `fsck` wasn't being invoked manually. In addition, the situation wouldn't have arisen in the first place except for the fact that at one time `fsck.ntfs` *did* exist on a default Ubuntu install.

    @ScottSeverance Thanks for stating that your thread is outdated!

    It's quite possible that this question is outdated (though I can't be bothered to check so I can say for certain). However, that isn't the reason I down voted this answer. Even if it had been posted before my issue was solved, it doesn't even begin to address the question I asked. I asked about an error that appeared during boot and interrupted the boot process. The error indicated that the system was looking for `fsck.ntfs`, which didn't exist on the system. How exactly could an explanation of which tool is appropriate for fixing disk errors help me resolve my boot error?

    @ScottSeverance it helps you preserve the system hierarchy by adapting to its standards. If everyone links everything everywhere without understanding the utility of each component the system becomes a mess and one does not learn a proper way that has been defined by generations of developers. It would be fair to say that misleading new users by referring to past methods is unjustified. I bring an answer which obeys to today standards across the majority of GNU / Linux distributions.

    # ntfsfix /dev/sdc1 Mounting volume... OK Processing of $MFT and $MFTMirr completed successfully. Checking the alternate boot sector... OK NTFS volume version is 3.1. NTFS partition /dev/sdc1 was processed successfully. Failed to sync device /dev/sdc1: Input/output error Failed to unmount partition [email protected]:/home/spark# fdisk /dev/sdc Welcome to fdisk (util-linux 2.27.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. fdisk: cannot open /dev/sdc: Read-only file system

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM