On Tue, 6 Apr 1999, Jeremy Impson wrote:
> On Tue, 6 Apr 1999, Graham Stoney wrote:
>
> > Just out of interest, how do you avoid the problem of files on the root
> > filesystem which need to be writable, such as /etc/mtab, /etc/HOSTNAME, and
> > /dev/tty*?
>
> /etc/HOSTNAME doesn't need to be writable (higly distribution dependent).
> Use the -n argument to mount so it won't write to /etc/mtab.
And symlink mtab to /proc/mounts.
> As far as stuff in /dev, I'm not really sure. Your /var idea would work,
> assuming you can get it mounted before you need things in /dev. But then
> this defeats the idea having everything read-only so that no fsck needs to
> be done.
>
> You could make /dev a ramdisk and run script that generates the right
> files. Again, this assumes you do it all before they are needed.
Not necessarily. Link /dev/ and /tmp to /var/dev and /var/tmp
respectively. Symlink individual files from /etc to /var/etc as well if
need be. Create the appropriate nodes in /var/tmp for booting - /dev/hda,
/dev/ram, etc. During boot, dd a disk image into a ramdisk and mount it
over /var. The original r/o contents of /var will now be hidden behind the
ramdisk mount.
--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."