2

I have a Windows 10 (ntfs) partition on my Xubuntu 14.04 laptop. I wanted to mount it automatically at startup, readonly if necessary since most of the time there is hibernation information on it. So I added the following to my /etc/fstab:

UUID=1AC27E82C27E6245   /media/me/DATA  ntfs    nobootwait,errors=remount-ro    0   0

Then I ran:

sudo mount -a

which gave me:

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.

Nothing surprising here. But since I am using the "errors=remount-ro" option in fstab, I would expect mount to have mounted the disk readonly after the error... Which it did not.

Is there a reason why "errors=remount-ro" is ignored in this case, and the disk is not mounted readonly ? Did I misunderstand this option ?

Note that I am not asking for an alternate solution; I just want to understand why this does not work as I expect it to.

Thanks !

personne3000
  • 123
  • 4
  • This is the way to do it http://askubuntu.com/questions/369984/how-to-automatically-mount-hibernated-ntfs-to-read-only in case anyone wonder (and yes it does not answer the question about the "why errors=remount-ro does not work") – Rinzwind Feb 26 '16 at 09:54

1 Answers1

2

The mounting is sent to the ntfs-3g driver and that one does not support the "errors=" option (I would call that a compatibility bug). It only supports the "ro" option. That is also why you see people using /etc/rc.local or xinitrc or by adding the "remove_hiberfile" option so it does mount "rw".

Rinzwind
  • 299,756
  • Thanks for the explanation. Thanks to your pointers I found a bug report about this here: https://bugs.launchpad.net/ubuntu/+source/ntfs-3g/+bug/1418560?comments=all – personne3000 Feb 26 '16 at 10:22
  • Oh good find. I searched bugs but did not find that one :D – Rinzwind Feb 26 '16 at 10:34