Running with a readonly root partition

A. Hamilton-Wright andrew at
Fri Jun 13 18:03:29 UTC 2008

As devfs is running by default, it seems to me that
it would be relatively easy to run with a readonly
root partition, assuming that the directories under
which writing is necessary (ie; /tmp, /var, /home)
are located in separate, writable partitions.

The main advantages are that none of the configuration
files or binaries in /etc and /usr (which may still
be on a separate readonly partition) are vulnerable
to attack (even from a local privilege escalation)
without remounting the partition as writable.

This used to be a very common setup in the *NIX
world, so I am surprised to find little to no mention
of it in the archives.

I set up my machine this way a couple of months back,
and have noticed some minor things (some few things
assume a writable /etc, notably including dump(8),
and the boot process update to /etc/motd).  Once these
have been rectified by relocating the files and setting
up symlinks, there have been no problems.

My questions are:
  - does anyone else do this?
  - if not, why not?

More information about the freebsd-questions mailing list