1

I have one SSD disk with installed Windows 10 and Ubuntu 20.04 on the same disk. I also have the second HDD drive with NTFS filesystem which should be shared between Windows and Ubuntu. I put the entry to /etc/fstab to automatically mount the HDD disk, however it is mounted in read only. If I run “ntfsfix /dev/sdb2” and reboot Ubuntu - the disk is mounted in RW mode as I want.

However, if I use Windows (just boot it and shutdown) and after that boot Ubuntu - I have the same error with HDD - it is not mounted in RW, and in read only mode. So I again need perform “ntfsfix”, reboot Ubuntu.

Is there any way to fix this error permanently? I know that it is possible to perform “ntfsfix” during the every Ubuntu boot, but this solution seems to me not elegant. Turning off the Hybernate on Windows seems not the solution as the HDD is not system, and not used by Windows system.

The HDD volume I mount is not system, it is just for data/media files. The HDD has 3 partitions (two small unallocated and unformatted 1mb and 45mb before and after the main partition, and one main partition /dev/sdb2 with the whole disk space)

Drg
  • 11
  • If you can provide your fstab entry that would be helpful in this case. – justus95 Jun 21 '20 at 21:32
  • UUID=68xxxxxxxxxxxxxx /media/disk500 ntfs-3g users,defaults,umask=0 0 0 – Drg Jun 21 '20 at 22:32
  • This is the entry in fstab (see before), Here in forum I closed some numbers in UID. I also applied chmod user:user /media/disk500 (the folder to mount the disk) – Drg Jun 21 '20 at 22:35
  • UUID=68... /media/disk500 ntfs-3g defaults,nls=utf8,umask=027,dmask=027,fmask=137,uid=1000,gid=1000,windows_names 0 0 would be a correct fstab entry if you have uid 1000 and gid 1000 (user and group ID). – Serafim Jun 22 '20 at 08:05
  • I would also use (if you have user and group ID 1000): chown 1000:1000 /media/disk500 – Serafim Jun 22 '20 at 08:16
  • @SerafimDahl the fstab entry you provided is definitely the better one (with dmask, fmask and uid 1000 specification) - thank you! I should use it rather than mine there I give all rights to all users; however it is not resolve my issue - after windows boot the partition is still mounted in read-only mode. And in order to mount in RW mode I need execute ntfsfix command – Drg Jun 22 '20 at 12:07
  • Here is result of ntfsfix: ~$ sudo ntfsfix /dev/sdb1 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/sdb2 was processed successfully. – Drg Jun 22 '20 at 12:11
  • I think that it is due to windows hibernating and not shutting down properly. You need to shut down windows, not just quit. – Serafim Jun 22 '20 at 12:55
  • I made a tests: mounted windows system partition and another ntfs non system disk: both are not mounted correctly in Ubuntu. However if I turn off hibernation - everything is ok in Ubuntu. So probably you are right. – Drg Jun 22 '20 at 13:38

1 Answers1

0

Finally I understood that the reason was in Windows, not in Ubuntu. I thought that the windows hibernation affects only the system partition, however it affects ALL the ntfs partition viewed by Windows.

So the solution is to turn-off the hibernation in Windows:

powercfg -h off

After this command in Windows, the ubuntu will mount all ntfs partition in rw mode. So, this is the solution not just for sindows system partition, but for all ntfs partitions "touched/viewed" by windows with active hibernation. Thanks to @Serafim-Dahl for his helping comments

PS. The similar solution for windows system partition is here: Unable to mount Windows (NTFS) filesystem due to hibernation

Drg
  • 11