read-only filesystems

Kevin D. Clark kclark at CetaceanNetworks.com
Wed Mar 19 10:31:40 EST 2003


So, for something I'm working on, it is desirable to have a Linux box
configured such that most of the filesystems on the box are mounted
read-only.  Ideally, only /var would be mounted read-write.

Trivially easy, right?  Not entirely...

I've done the following so far:

  o  symbolicly linked /tmp to /var/tmp

  o  symbolicly linked /etc/mtab to /proc/mounts

  o  modified some sundry other things not to place their lockfiles on
     the read-only / filesystem  (syslogd).

  o  Etc.


But then I get to /dev.  How to handle /dev?  Some of the stuff under
/dev needs to be writable.


I can re-create all of the /dev/* files out in /var/dev, and then
symbolicly link /dev -> /var/dev, but then I encounter the problem of
/dev/console needs to be available before /var is even mounted (etc.).
I'm still working on this problem.


However, what I'm wondering is:  how have other people solved this
problem?  I'm looking for turnkey, straightforward alternatives here.

One thing that I thought about using is devfs, but I'm not getting a
warm fuzzy feeling that I'm going to be able to get this going very
easily in my environment (but yes, I am using a 2.4 kernel).


So, again, how have other people solved this problem?  

(if it matters, I'm using RH 7.x and 8.x stuff as a base system, so
now you know the flavor of my init scripts)

Thanks for any ideas,

--kevin
-- 
Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA)
cetaceannetworks.com!kclark (GnuPG ID: B280F24E)
alumni.unh.edu!kdc




More information about the gnhlug-discuss mailing list