> 
> Jeremy Impson writes:
> > /etc/HOSTNAME doesn't need to be writable (higly distribution dependent).
> 
> It does if you're using DHCP to set the hostname, which is a Good Thing to do
> for autoconfiguring embedded boxes. Running a DHCP server is even worse,
> because dhcpd wants to write its leases file in /etc.
> 
> > Use the -n argument to mount so it won't write to /etc/mtab.
> 
> This sounds good though.
> 
> > 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.
> 
> If it's copied to a ramdisk or a non-persistent partition, it's still OK; it's
> pretty ugly though, so I'm looking for a better alternative.
> 

(from memory...)

Sun OS 4.1 had a thing called a 'Translucent File System'.  It somehow
let you mount one file system on top of another, so you would see the underlying
file system unless you changed a file, in which case the changed file would
be stored in the 'top' file system.  I.E. the 'top' file system would have
changes.  Or something like that.  So if you could somehow mount a ramdisk
on top of a read-only root partition...

It sounds like the ramdisk + read-only partition approach may be the best way
to go. 

Another idea might be to use the loop devices (see losetup(8)) to get lots
of little partitions to mount on top of the ramdisk.  I'm not sure exactly
how this would work.  I used it to make boot disks once, it is kind of slick.

-- cary

Reply via email to