7

I have Windows and Linux installed on SSD, and then, I have second HDD with data. There is no Windows installation on it, just NTFS partition with data (and second partition Lenovo Recovery, but that's all and I don't need it). When I try to open it in Linux, I get folowing error:

Error mounting /dev/sda2 at /media/adam/Data: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda2" "/media/adam/Data"' 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/sda2': 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 there couldn't be any hiberfile, as there is no Windows installation on this drive. I need to have read and also write permission on this drive. How could I do it? Another thing I noticed is that the partition has msftdata flag, but when I open gparted and choose "Manage flags" and remove it, it doesn't remove. How to mount the partition in write mode? Thanks.

EDIT: This is not duplicate of Unable to mount Windows (NTFS) filesystem due to hibernation as there are no Windows or hiberfile.

  • 1
    See what happens after you run sudo ntfsfix /dev/sda2 – TheWanderer Mar 20 '16 at 14:42
  • @Zacharee1 thanks, now it's working without any problems. – Adam Ježek Mar 20 '16 at 14:56
  • @Nephente can't be duplicate, there is no Windows, and no hiberfile. – Adam Ježek Mar 20 '16 at 14:56
  • I ran into the same symptoms for the VHD backing a Windows Server 2k12 VM. I had a scenario for testing purposes that required me to copy data into the partition directly while the VM was down and then boot it. Even after clean shutdown had this problem. Same solution using ntfsfix worked in case others run into this. – Brian Feb 10 '17 at 17:08
  • 1
    This is obviously a dupe. Windows doesn't need to be installed on a partition for it to mark that partition as dirty when hibernating or using fast startup. – muru Sep 24 '18 at 02:21

1 Answers1

20

Run sudo ntfsfix /dev/sda2 and you will be able to mount the partition.

TheWanderer
  • 19,395
  • 12
  • 50
  • 65