0

I have a system with Windows and Linux installed, and Windows is installed on a driver with an NTFS partition. I want to make sure that I don't accidentally write to this partition, so I want it always mounted as read-only.

I know I can manually create an /etc/fstab entry to mount that partition at some fixed mount point and have it be read-only. But that requires me to 1) pick a fixed mount point, and 2) identify the drive manually by UUID or device.

Ubuntu currently mounts that drive dynamically. It detects the drive and creates a nice mount point. I want to build on that feature. Is there a way to tell Ubuntu that this particular NTFS device should be mounted read-only, without specifying where it should be mounted or any other mount options.

I tried using the KDE Partition Manager, but it seems to be broken. It won't actually write any entries to /etc/fstab, even though it says it will.

  • 1
    Unfortunately, without using the UUIDs we can't set an fstab entry. And it's pretty simple to get the UUIDs actually. KDE Partition Manager probably isn't properly running as admin to edit /etc/fstab – Thomas Ward Oct 29 '21 at 23:22
  • KDE Partition Manager does ask for my password when it starts, and it can do everything else. – lord_nimon Oct 30 '21 at 01:25
  • 1
    But by your own statement, it does NOT add entries to /etc/fstab so either you haven't selected the right option to write the mounts to /etc/fstab or it can't because of AppArmor isolation or similar (hence a permissions issue). – Thomas Ward Oct 30 '21 at 01:32
  • There happens to be a bug filed for it at https://bugs.launchpad.net/ubuntu/+source/partitionmanager/+bug/1873706 and they claim that upstream in version 4.2.0 it has been fixed. – Terrance Oct 30 '21 at 01:48
  • Which release of Ubuntu you use ? – pasman pasmański Oct 30 '21 at 02:35
  • Probably writing an udev rule can help you, e.g. https://askubuntu.com/questions/683881/mount-options-for-udev-rule-mounted-ext3-fs-on14-04-3 – vanadium Oct 30 '21 at 12:27

0 Answers0