Unable to mount a Windows partition in write mode [duplicate]

I recently installed ubuntu(<12 hours) and I was able to mount my ntfs partitioned drives (orginally from Win 10)in ubuntu using this command

sudo mount -t ntfs-3g -o ro /dev/sda3 /media/win

When I try the same command with read permissions

sudo mount -t ntfs-3g -o rw /dev/sda3 /media/win

I get the following error

The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda3': 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.

but I have shut down Windows 10 the normal way. What is the reason for this error and how can I solve it?

Part 2:

When mounting the drives in read only mode, I had to do that everytime I booted into the OS. Is there any way I can automate that(like create a shell script that will do the mounting for me and runs everytime the OS is booted).


Solution 1:

The best answer is:

  1. Don't use ntfsfix in Ubuntu. It'll potentially corrupt your Windows installation.

  2. Boot Windows. Disable fast boot in the power control panel.

  3. Disable hibernation. In an admin command prompt window, type powercfg.exe -h off.

  4. run chkdsk on the drive in Windows

Now you should be able to mount it in Ubuntu.

To make the partition automount in Ubuntu, you need to modify /etc/fstab (sudo -H gedit /etc/fstab). Here's an example of what to add...

UUID=0C0F93CE58153D42 /media/username/Windows ntfs-3g defaults 0 0

replace my UUID with the UUID you find by using the sudo blkid command in terminal, and update the mount point with the correct info.

Cheers, Al