Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 7890  / 3 Years ago, tue, june 29, 2021, 2:23:31

I have installed Ubuntu on my machine, I have Windows on a small ssd and I would like that ssd not visible, read-only, or write-protected while I am using linux as I do not want any mistakes to mess up that drive...


More From » hard-drive

 Answers
6

You can create an entry for this partition in /etc/fstab and specify it read-only( ro ).

It will automatically mount your partition (unless noauto is specified) as read-only when you start your system.



General format of /etc/fstab file is:



file_system   mount_point   type  options     dump  pass  




Suppose your Windows partition in /dev/sad1 and you want to automatically mount is on /media/Windows (with read-only permission) .




  • open /etc/fstab in gedit using gksudo gedit /etc/fstab

  • Now append following lines in it



    #Mount Windows partition as read-only
    /dev/sda1 /media/Windows ntfs ro,suid,dev,noexec,auto,user,async 0 0





Note: If you want to prevent the auto mounting of partition during boot, you can replace auto option with noauto.





For more detail, see Community Help Wiki


[#21443] Wednesday, June 30, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
throecember

Total Points: 274
Total Questions: 118
Total Answers: 132

Location: India
Member since Thu, Jun 11, 2020
4 Years ago
;