fsck an ntfs drive in Linux
Solution 1
Yes. This was handled by fsck on some releases. If the partition is not listed in /etc/fstab, then you will likely need to tell it the partition type. I've used this from a Linux CD to recover a partition Windows wouldn't boot from.
Based on the comments below, the actual fixing is done by the ntfsfix program. It should be available, even if there is no program to run a fsck on and NTFS file system.
Solution 2
Unfortunately the ntfsfix tool is very limited compared to Microsoft's chkdsk. Try to get a Windows install going - preferably with the newest version of Windows as Microsoft is presumably constantly improving chkdsk (I hope..) New versions of Windows are often available for free as trials. If the problem is in a USB disk you can try installing Windows in something like VirtualBox and give the VM control of the USB device.
Solution 3
In my case, none of fsck & ntfsfix could fix the issue of my external NTFS mobile disk.
I end up to boot into windows os, and use follow steps to fix the disk issue.
Steps:
- Check the identifier of the bad disk. e.g
g - Open the "cmd" terminal of windows.
- Input
chkdsk <disk>: /fto fix it.
Where<disk>is the identifier, e.gchkdsk d: /f - Then it would be fixed within seconds (For a disk of size 1Tb).
After years, finally I found something that windows can do easily, but linux can't ;)
@Update - vm solution
You can also create a windows vm (e.g win 7), then mount the mobile disk to windows vm, then you can also use chkdsk to fix the disk, it's similar as boot into a windows machine.
Solution 4
ln -s /bin/ntfsfix /sbin/fsck.ntfs
fsck /dev/sdg1
fsck from util-linux 2.21.2
Mounting volume... OK
Processing of $MFT and $MFTMirr completed successfully.
Checking the alternate boot sector... FIXED
NTFS volume version is 3.1.
NTFS partition /dev/sdg1 was processed successfully.
On fedora 22, there is another binary :
lrwxrwxrwx. 1 root root 13 May 22 22:13 /usr/sbin/fsck.ntfs -> ../bin/ntfsck
Solution 5
If you have NTFSProgs installed, you should be able to run fsck.ntfs or fsck -t ntfs to fsck an NTFS drive.
Related videos on Youtube
vivin
Check out regula. It is very neat and will make all your dreams come true. Your monkey poured coffee in my boots! I assume that everyone knows more than I do. map{@n=split//;$j.=$n[0]x$n[1]}split/:/,"01:11:02". ":11:01:11:02:13:01:11:01:11:01:13:02:12:01:13:01". ":11:04:11:06:12:04:11:01:12:01:13:02:12:01:14:01". ":13:01:11:03:12:01:11:04:12:02:11:01:11:01:13:02". ":11:03:11:06:11:01:11:05:12:02:11:01:11:01:13:02". ":11:02:12:01:12:04:11:06:12:01:11:04:12:04:11:01". ":12:03:12:01:12:01:11:01:12:01:12:02:11:01:11:01". ":13:02:11:01:02:11:01:12:02";map{print chr unpack" i",pack"B32",$_}$j=~m/.{8}/g
Updated on September 17, 2022Comments
-
vivin 3 monthsIs there a way to fsck/chkdsk an NTFS drive from Linux?
-
user5504603 about 11 yearsRunning Debian 6.0.3, just installed ntfsprogs, no fsck.ntfs installed, and when running fsck with -t ntfs, get "fsck.ntfs not found". So don't think the two are related. -
squircle almost 11 years@ZayneSHalsall In Debian, it happens to be a symlink tontfsfixwhich is inntfsprogs. I guarantee you that you will be able to runntfsfixifntfsprogsinstalled properly. -
dario_ramos over 10 yearsOr use Ultimate Boot CD for Windows. It's a live Windows XP CD with lots of recovery tools. That's how I solved my problem (corrupted NTFS partition). I tried using thentfsckprogram included in the Parted Magic live USB, but I got an error sayingBoot sector: bad NTFS magic. Segmentation fault. -
Neil Mayhew almost 8 yearsNewer versions of Debian and Ubuntu don't have this symlink. You can make it yourself, but the problem is thatntfsfixhas a completely different set of arguments to the standardfsckones. It's better to makefsck.ntfs(andfsck.ntfs-3) a script containingexec ntfsfix ${@:$#}(with a shebang of#!/bin/bash). -
underscore_d about 7 yearsmaybe limited for some people, but it fixed my corrupted MFT just fine :-) [until the next time, perhaps! i'm not sure about this drive...] -
underscore_d about 7 yearsI assume from the above comment thatfsck.ntfswas at some point handled byntfsfix. Comments on a lower post indicate this may not be workable now as their arguments are not compatible. Anyway, in Debian 8.2,fsck.ntfsdoes not exist - butntfsfixdoes and was able to fix a corrupted MFT I encountered. Thanks @SabreWolfy for the hint. -
Graham Perrin over 6 yearsUBCD has many qualities but I should not describe it as a Windows XP CD. -
SonicARG over 4 yearsI'd recommend using flag/x(unmount) for enforcing preventing access to the drive. Help manual says using/ximplies also/f, so it helps for doing fixes the same way Linux does (fsckrequires drives being unmounted). -
mwfearnley about 3 yearsHyper-V Server is a completely free (beer) but heavily cut-down version of Windows that's designed for running VMs. The installer should contain all the usual utilities likechkdsk/diskpart, etc. -
Bob Briscoe over 2 yearsTake care using Windows 'chkdsk /f' on an NTFS used by Linux. I just followed this advice to fix errors on my external 2TB backup drive. It deleted the names of 268 files and directories (incl. all my incr. backups) due to invalid characters (from NTFS viewpoint - most often ':' used in timestamps). I reverted it all using the log file, but it took half a day of coding. Some but not all Linux system-calls block writing such invalid names on an NTFS. I use rsync for backups, which silently copies such invalid filenames - normally useful, until you need to fix other problems on the disk... -
Edward about 2 years@squircle thank you mansudo ntfsfix /dev/sda1fixed my issue.fsck.ntfs -f /dev/sda1andfsck -t ntfs -f /dev/sda1exited early withfsck from util-linux 2.31.1 -
loved.by.Jesus 8 months+1 for the idea of the VM. Thanks!