37

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.

9 Answers9

37

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.

Micro
  • 2,178
  • 15
  • 10
22

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.

evandrix
  • 117
  • 1
  • 6
Ruraj
  • 952
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.

enzotib
  • 96,093
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.

RobDavenport
  • 391
  • 1
  • 6
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
Wes
  • 179
  • 2
  • 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.

Vlalex
  • 21
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
    
αғsнιη
  • 36,350
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
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