Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3816  / 2 Years ago, thu, january 20, 2022, 6:49:28

I have a backup external USB drive.



I wonder how to tell the system to always mount it read only without explicitly telling him everytime



sudo mount -o ro /dev/sde1 /media/backup


Note: My drive is not always attached to the system. I only attach it when I need something important from the backup. So I don't want't to edit ftsab and when booting up it tells me that it has failed to mount drive because it doesn't exist


More From » mount

 Answers
2

You can still set this up using fstab, just don't set it to be mounted automatically. Get the UUID of your drive (you can use blkid for that) and add this line to your /etc/fstab:



UUID=123-ABC   /media/backup  ntfs   ro,noauto,users   0   0


Change the UUID for whatever your's is and the ntfs to your filesystem. Now, the drive won't be mounted automatically (noauto) but it can be mounted manually by a normal user with:



mount /media/backup





To make this work automatically in nautilus, use this line in /etc/fstab instead (thanks @Braiam):



UUID=123-ABC /media/backup auto noauto,nosuid,nodev,nofail,x-gvfs-show,ro 0 0

[#26511] Thursday, January 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
peafowkes

Total Points: 356
Total Questions: 102
Total Answers: 117

Location: Lebanon
Member since Tue, Oct 12, 2021
3 Years ago
peafowkes questions
;