You can enable read-only on partitions by using the "ro" flag in fstab.
By example:
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
#Entry for /dev/sda6 :
UUID=85bb1632-546f-460f-8cc7-5b15fd2c046b / ext4
noatime,errors=remount-ro 0 1
Here, / will be mounted with read-only if there were errors. I guess
that if you just remove the "errors=" it will be ro everytime.
Hope it helps.
Le 26.11.2012 21:03, Amit a écrit :
Hello,
I would like to block write access by default to all drives plugged
in
to my USB port (a specific USB port). This capability would probably
be
at the kernel level to be effective.
Doing research on LWN.net, I noticed the following sentence by
Corbet:
(http://lwn.net/Articles/428533/):
Enforcing read-only: The block layer has a mechanism by which a
driver
can mark a specific device (or partition) as being read-only. This
flag
may be set if the physical device is write-locked; it can also be set
by
higher-level code (the DM or MD layers, for example) when the
administrator creates a read-only device.
Any idea on how this is done?
Thanks,
Amit
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/73a3cbf7aa6af948aeb85de3f1a7a...@neutralite.org