OSMC vero4k automount ntfs usb drives as Read Only


Is there any way to force Osmc to automount external drives as read only?

I’m having issues with the ringmain in my house at present, which has effectively been causing random power cuts.

The relevance to the Vero4k is that I use NTFS formatted usb drives, which the system automounts with read/write enabled by default.

I’ve experienced file corruption in the past on these drives (such as during an Osmc crash). Having read-only volumes would definitely reduce issues.

Another set of my usb drives contain fully encrypted veracrypt volumes; these I mount manually via a bash script run from ssh. I’ve not encountered any file corruption on these since setting veracrypt to mount them as read-only.

Many thanks in advance

If you are doing read-only with NTFS, you can use a kernel mount which will give you far better performance.

Thanks Sam, sounds good.

Can you point me towards any resources on achieving this? I’d still like to be able to have osmc mount these unencrypted drives at run time (and to be able to dismount them via the osmc file manager)


You could disable udisks if you don’t need it.

You could mount the disks using /etc/fstab. The disks will need to be present when the device boots.

See automount - How to mount a NTFS partition in /etc/fstab? - Ask Ubuntu for some more info.

1 Like

It should be sufficient to just mount the drive in /etc/fstab read only - udisks will not try to override that if there is an explicit entry for the drive in fstab. Mounting via UUID is probably the best option.

Here is how I mount my USB media drive on my main system in fstab:

UUID=09bf0117-fb6e-4fe9-8dcb-7c99f30bd8fd       /mnt/USBMEDIA   ext4    defaults,noatime,auto,nofail,x-systemd.mount-timeout=60 0       0

Change the UUID to match your drive, change ext4 to ntfs and add ‘ro’ as an additional option to mount read only.

1 Like

Thanks @sam_nazarko and @DBMandrake, I’ll look into that when my head’s overloaded with stress.
I value your advice and support. Cheers.