/dev on a read-only filesystem?

J. Seth Henry jshamlet at comcast.net
Sun Mar 30 12:57:50 PST 2003

I have managed, through hook and crook, to get a full 4.7-REL install on a
Compaq IA-1 internet appliance. I put a kernel, /bin, /etc, /boot, /dev,
/proc, and a partial /sbin on the internal flash memory. During boot, I
mount a complete /sbin, /usr and <swap> on a microdrive. Since I want to
reduce the number of writes to the flash, I linked /tmp, /var, and /root
to directories in /usr. So far, so good - the bulk of the write/update
activity is now pointed to the microdrive which has no physical write

The trick is, if I make / read-only, I run into problems with /dev. During
boot, I get numerous error messages - and things don't seem to work quite
right. Is there a way to mount / read-only, while maintaining a working
/dev? Can /dev be mounted from another filesystem - or, preferably (since
the OS is already running) be linked to, say, /usr/dev?

If not, how much write activity to the actual, physical volume takes place
in /dev. Also, does anything happen on the physical disk with /proc. I
don't think it does squat to the physical disk, since a "procfs"
filesystem is mounted there, but I want to make sure I don't damage the
flash with periodic writes. I would feel best if the internal flash were
completely read-only. BTW - if it wasn't clear, the system boots from
flash, and them mounts the microdrive.

Also, and perhaps unrelated, if I attempt to run getty from the flash, I
get an error message about getty spawning too fast - and I can't ever
login on the console. This doesn't happen when I launch getty from the
microdrive. Odd, but unimportant - as the microdrive is necessary for the
system to "run"

Seth Henry

More information about the freebsd-questions mailing list