Question - How to use "readonly-root"

Jayakrishnan M jay.krishnanm at gmail.com
Mon Aug 17 05:19:42 UTC 2009


Hi John,

> In /etc/sysconfig, there is a configuration file named "readonly-root", that
> would seem to allow mounting the root filesystem read-only with a writable
> partition in tmpfs. I'd really like to use this on a little box I've built
> that boots from flash memory. But, I don't know what I need to do to move
> /etc and /var into a tmpfs.

I have made a read only rootfs by giving readonlyroot as a command
line parameter to kernel. The changes to etc and var depends on the
applications you need. You might want to move /etc/mtab to tmpfs; one
easier way is to make it as a softlink to /proc/partitions (but this
makes output of mount command a bit too long). Most of the rw
locations will be mounted as tmpfs by init scripts. But a few
applications like dhcpd might fail. You can modify the init script to
move the temporary files needed by these applications to tmpfs.

Jayakrishnan




More information about the users mailing list