sábado, 22 de agosto de 2015

How To Solve NTFS Mount Problem In Ubuntu And Windows 8 Dual Boot

Fix NTFS Partition is in unsafe state error in Ubuntu

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.

Reason: Fast Startup feature of Windows 8

Microsoft introduced a new feature in Windows 8 to reduce the boot time in otherwise slow Windows OS. This feature is called Fast Startup. In normal shut down process power is removed form 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 turn off is among these system information. This reduces the boot time of the Windows 8 and 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).

Solution: Disable Fast Startup in Windows 8

Temporary solution of this problem will be to boot in to Windows 8 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 next time, you’ll face the same problem again.
Permanent solution would be to disable the fast startup in Windows 8. This will increase your Windows 8 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 8 without thinking twice.

How to disable fast startup in Windows 8:

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 8. First search for Power Option along with Settings filter in start screen of Windows 8.
Disable Fast startup in Windows 8
Make sure that you have admin rights:
disable_fast_startup_windows8
Scroll down a bit in power options to look for Turn on fast startup option and uncheck this box.
Disable Fast startup in Windows 8
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.

Further troubleshoot

If the above fix doesn’t help you to mount Windows partition in Ubuntu, use the following trick suggested by Florian in the comment box:
sudo ntfsfix /dev/sdXY
where XY is the partition. For example sda2 or sdb1
Though the tutorial is meant for Ubuntu 14.04, 14.10 etc, the same tutorial should also help all other Linux distributions. Any questions and suggestions? Feel free to hit the comment box.

0 comentarios: