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...
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...
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) .
/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