[Ilugc] Mounting root "/" as read only
- From: siva@xxxxxxxxxxx (Sivasankar Chander)
- Date: Wed Apr 13 17:23:56 2005
Lately am fixed up with a problem of mounting my root
"/" as readonly but guess in vain. Has anybody in this group tried it?
Not me. What exactly is the problem you got? I have a feeling it is
not possible to do this - lots of stuff expects writable /etc and /dev
(at the very least).
It depends on the nature of the distro - a lot of minimal router-centric
distros will and must run as read-only root. Examples are routerlinux,
OpenWRT (for the Linksys WRT54G) and the debian-based Personal-Telco distro.
Usually, the packages in these distros are configured during build to
put their temporaries and other modifiable files in /var/<package_name>/...
or /tmp/... or similar, and /var and /tmp in turn are mounted on a
ramdisk device, or symlinked to a directory on a ramdisk device.
/etc is mounted on a read-mostly device like flash or diskonchip.
/dev does not have to be on a writable filesystem - its entries are
special and the kernel knows how to handle it.
-Siva
Other related posts: