Fix A NTFS Partition With fsck



by AndrzejL

I was trying to fix an NTFS partition on a USB disk for a Friend of mine. I don’t have Microsoft Windows installed on any of my machines SO I couldn’t use chkdsk command. No problem. I have a PCLinuxOS – one mean green heckuva machine.

I remembered that the Old-Polack was recommending

fsck -f /dev/sdxy

command to be run as root on unmounted partition when booting from LiveCD.

I won’t bother booting into the LiveCD as it’s not / or /home partition that I am trying to fix, I thought. Ok, so I unmounted the drive using the KDE Device Notifier and I ran the command:

fsck -f /dev/sdb1

The outcome was not what I had expected it to be…

fsck from util-linux-ng 2.18

fsck: fsck.ntfs: not found

fsck: Error 2 while executing fsck.ntfs for /dev/sdb1

As it turns out – I am missing a package… but which one? Synaptic package manager showed no entries whatsoever. Rpmsearch was not very helpful either… So I searched and searched and after a while asked Cyryl for help. I was provided with almost instant solution.

Make sure you have these packages installed:

A) ntfs-3g

B) ntfs-config

C) ntfsprogs

D) testdisk

and then run these two commands as root:

ln -s /usr/bin/ntfsfix /usr/sbin/fsck.ntfs

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

Now try re-running the command but skip the -f parameter:

[root@wishmasbell andrzejl]# fsck /dev/sdb1

fsck from util-linux-ng 2.18

Mounting volume… OK

Processing of $MFT and $MFTMirr completed successfully.

NTFS volume version is 3.1.

NTFS partition /dev/sdb1 was processed successfully.

[root@wishmasbell andrzejl]#

I was not missing any packages. All I was missing were two symlinks. The HDD was fixed as far as I can tell.

Thanks again Cyryl.