Blog

Linux Mint. Fixing Unclean File System Error When Mounting an NTFS Partition

If you are running a dual boot (Windows/Linux Mint) computer you may want to share data between both OS systems, so that you may use it regardless of the OS you have booted with. The easiest way to do it to create a new NTFS partition called DATA. Windows and Linux Mint will both recognize the partition, and will mount it during boot time.

However sometimes it may be annoying that the DATA partition gets mounted as read only, instead of read and write partition. Digging deeper and trying to unmount and mount the partition yourself you will find the following message:

Language: html
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)

The reason is that in order to boot Windows faster Microsoft introduced a new feature called Fast Startup. During a normal shut down all components (CPU, RAM, CD-Rom and hard disks) are powered off. But in fast start up, some system information is saved to a metadata file, which is later used to restore the system status faster. This metadata file causes Linux to mount the partition in protected mode and you cannot mount it (without being root).

Solution

To fix the issue unmount the partitin and run the following commands

Language: html
sudo ntfsfix /dev/sda{YOUR_NTFS_PARTITION_NUMBER_HERE}

The command will output something similar to:

Language: html
Mounting volume... The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
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
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sda5 was processed successfully.

Now remount the partitions and you are done

Language: html
sudo mount --all