1

I am running Ubuntu 16.04 and everything is working perfectly.

I have a few drives that I use for archive storage, these drives are completly full now and will never be written to again.

I would like to change the mount options in /etc/fstab so that they are mounted as read-only at boot.

The drives are encrypted with LUKS and have an ext4 file system.

My current line in /etc/fstab for the drive in question looks like this:

/dev/disk/by-uuid/68271755-703c-48e6-a935-c1237de6b1a8 /mnt/HDD01 auto nosuid,nodev,nofail,x-gvfs-show 0 0

What do I need to change to make it mount the drive read-only, but leaving everything else as it is?

5

You simply have to add the ro mount option, which stands for "read-only".

In /etc/fstab entries, mount options are specified in the 4th column of each entry, so you could append it to that one e.g. like this:

/dev/disk/by-uuid/68271755-703c-48e6-a935-c1237de6b1a8 /mnt/HDD01 auto ro,nosuid,nodev,nofail,x-gvfs-show 0 0

More information can be found by typing man fstab and man mount.

  • If this answer solves your problem, please consider accepting it by clicking the grey check button on its left. You can learn more about how things work here on Ask Ubuntu by taking the short tour. Thanks and welcome here. – Byte Commander Oct 19 '16 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.