35

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.

1
  • 2
    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. Dec 8, 2011 at 7:56

9 Answers 9

36

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.

7
  • 4
    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. Dec 8, 2011 at 8:45
  • 1
    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 :)
    – AhHatem
    Jan 24, 2013 at 14:37
  • Doesn't work to me. Ubuntu 12.04.3
    – zuba
    Dec 6, 2013 at 14:08
  • 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.
    – tiktak
    Jan 16, 2014 at 0:35
  • The answer should be: askubuntu.com/a/292889/126984
    – wakeup
    Apr 8, 2014 at 10:50
21

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.

4
  • 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. Jun 22, 2013 at 12:32
  • I would suggest adding this as a comment to Micro's answer, rather than as a standalone answer.
    – waldyrious
    Dec 3, 2013 at 19:43
  • This is the correct answer for later versions of ubuntu like 13.04
    – wakeup
    Apr 8, 2014 at 10:50
  • This worked for me in Ubuntu 14.04! Nov 17, 2014 at 14:21
6

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.

4
  • 2
    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. Dec 8, 2011 at 21:57
  • 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.
    – enzotib
    Dec 8, 2011 at 22:02
  • 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. Dec 8, 2011 at 22:59
  • 1
    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.
    – KarlP
    Dec 12, 2011 at 21:04
5

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.

3

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
1
  • This worked for me on Ubuntu 14.04 LTS on April 13th, 2015 Apr 13, 2015 at 17:10
2

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.

2
  • 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 Jan 22, 2018 at 7:07
  • 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 Jan 22, 2018 at 7:08
0

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
    
0
$ 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
7
  • -1: This answer is unrelated to the question. Mar 20, 2016 at 2:54
  • @ScottSeverance /me being down voted for not ignoring the tools application as stated in their manual -- only in Ubuntu forums haha Mar 21, 2016 at 5:58
  • 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. Mar 21, 2016 at 11:39
  • @ScottSeverance Thanks for stating that your thread is outdated! Mar 23, 2016 at 20:33
  • 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? Mar 23, 2016 at 20:57
0

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

1
  • 1
    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. Jan 31, 2017 at 16:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .