Problem: The NTFS partition is in an unsafe state error in Ubuntu
I dual boot Ubuntu 14.04 with Windows. After upgrading to Windows 8, I often see an error “The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully” when I try to mount the NTFS partitions in Ubuntu. The full text of error is as following:
Error mounting /dev/sda5 at /media/itsfoss/01BC76G7Z2628FB0: Command-line `mount -t “ntfs” -o “uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177” “/dev/sda5” “/media/itsfoss/01BC76G7Z2628FB0″‘ exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount ‘/dev/sda5’: Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the ‘ro’ mount option.
Quick Fix to mount Windows partition immediately
Read the error again. Just the second line which reads: Error mounting /dev/sdXY….
Note the /dev/sdXY thing. XY should be replaced with the error you see in your system. Now open terminal and use the following command:
sudo ntfsfix /dev/sdXY
where XY is the troublesome partition shown in the error. For example sda2 or sdb1 or sda5 (as in picture above). ntfsfix is already installed in Ubuntu systems.
Reason: Fast Startup feature of Windows 8 and Windows 10
Microsoft introduced a new feature in Windows 8 and 10 to reduce the boot time in otherwise slow Windows OS. This feature is called Fast Startup. In normal shut down process, power is removed from all components such as CPU, RAM, CD-Rom and hard disks. But in fast start up, Windows 8 saves some system information such as caching the registry etc to a file during shutdown. Part of the metadata about the state of all mounted partitions at the time of
But in fast start up, Windows 8 saves some system information such as caching the registry etc to a file during shutdown. Part of the metadata about the state of all mounted partitions at the time of turn-off, is among these system information. This reduces the boot time of the Windows 8 but it creates the trouble for Ubuntu.
Since the information about the NTFS partition is stored in Windows 8, this prevents Ubuntu to mount them as mounting them in Linux will alter the metadata of the partitions. This is why it is in protected mode and you cannot mount it (without being root).
Permanent Solution: Disable Fast Startup in Windows 8 and Windows 10
Temporary solution of this problem will be to boot in to Windows and restart it. Restarting is different from shutdown and it should release the partition metadata from the stored system information. But this will only be a temporary solution because when you use Windows 8 or 10 next time, you’ll face the same problem again.
Permanent solution would be to disable the fast startup in Windows 8/10. This will increase your Windows boot time so it is up to you if you prefer it. If you use Windows more frequently and you have probably set Window as default OS in dual boot with Ubuntu, then you should avoid this solution. But if you more of a Linux guy and use Windows occasionally then you can disable fast startup in Windows 10 without thinking twice.
How to disable fast startup in Windows 8 and 10:
If you know how to go around Windows, use the following path to disable fast startup.
Go to Control Panel > Hardware and Sound > Power Options > System Setting > Choose what the power buttons do and uncheck the Turn on fast startup box.
Alternatively, here is the detailed process along with some picture to help you to disable fast startup in Windows. First search for Power Option along with Settings filter in start screen of Windows 8.
Make sure that you have admin rights:
That’s all. Next time you try to mount NTFS partition in Ubuntu, you should not see the NTFS partition is in an unsafe state error.
Though the tutorial is meant for Ubuntu 14.04, 15.10 etc, the same tutorial should also help all other Linux distributions such as Linux Mint, elementary OS etc.
Any questions and suggestions? Feel free to hit the comment box.
Related tutorial: How to access Linux files from Windows.