ntfsfix
Fix common NTFS file system inconsistencies
TLDR
Fix a given NTFS partition
SYNOPSIS
ntfsfix [options] device
Example: ntfsfix /dev/sda1
Example: ntfsfix -n /dev/sdb2
PARAMETERS
-b
Clears the bad sectors list on the NTFS partition.
-d
Disables all repair and check operations; instead, it dumps the boot sector information of the specified device.
-f
Forces the clearing of the journal file, even if it appears clean. This is usually done automatically if the journal is dirty.
-h
Displays a help message with available options and exits.
-n
Performs a dry run. It shows what ntfsfix would do without actually writing any changes to the device. Useful for testing.
-V
Displays the version information of ntfsfix and exits.
device
The path to the NTFS partition to be checked or repaired (e.g., /dev/sda1, /dev/nvme0n1p3).
DESCRIPTION
ntfsfix is a utility from the ntfs-3g suite designed to resolve common inconsistencies and errors within NTFS filesystems. It's often used to repair minor issues that might prevent an NTFS volume from being mounted correctly on Linux.
The command performs several operations: it checks the NTFS boot sector, attempts to clear the journal file (if it's marked dirty), and resets the bad sector list. It's crucial to understand that ntfsfix is not a full replacement for Microsoft Windows' chkdsk utility. It can fix basic errors but will not repair complex filesystem corruption or structural damage. For severe problems, using chkdsk on a Windows system is the recommended course of action. It's generally safe for minor repairs and an essential tool for Linux users working with NTFS partitions.
CAVEATS
ntfsfix is not a comprehensive filesystem repair tool like Windows' chkdsk. It only handles minor inconsistencies and aims to get the filesystem mountable. For severe corruption, chkdsk on Windows is the proper utility to use.
Always ensure the NTFS partition is unmounted before running ntfsfix to prevent data corruption. While generally safe for its intended purpose, it's always advisable to back up critical data before attempting any disk repair operations.
USAGE NOTES
Always ensure the NTFS partition is unmounted before running ntfsfix to prevent data corruption. You can unmount a partition using the umount command (e.g., umount /dev/sda1). After running ntfsfix, attempt to mount the partition again to verify the repair.
HISTORY
ntfsfix is an integral part of the ntfs-3g project, an open-source initiative that began to provide robust read and write capabilities for NTFS filesystems on Linux and other Unix-like operating systems. It was developed to address common issues that would prevent a clean mount of NTFS volumes, focusing on safety and minimal, targeted interventions. Its development reflects the ongoing effort to enhance Linux's interoperability with Microsoft Windows filesystems.