[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /run and read-only /etc



Overall I think it is wonderful to see support for read-only root being
worked on.

On Wed, 2003-04-09 at 15:41, Matthew Garrett wrote:
> Jeremy Jackson wrote:
> 
> (doing this with bind mounts)
> 
> >2.2 kernels are out though.
> 
> As are BSDs. I have no idea whether the Hurd supports bind mounting.
> 
Can it be assumed that all systems that may use this support ramdisks?  
What other schemes would allow a read-only root?  Mounting a small fs on
/run (although I hope it's not in the root directory)?

> In most cases, just moving the files somewhere more sensible like
> /var/run is sensible. The only argument should be over files that need
> to be written before /var has been mounted, of which there should be a
> very small number. It should be possible to deal with this in a simple
> fashion.

The technique involving bind mounts can be done with a regular mount, it
would just take a few more steps:

Mount ramdisk or whatever other rw fs on /etc/run very early in boot. 
Whatever needs to scribble in it does so, and everything works. If later
the root FS is mounted rw, copy contents of /run to temp dir, unmount
/etc/run, clear it out, then copy it all back.

I think it's the least invasive technique, although I agree that some
things that are messing about in /etc and can do it in /var should be
fixed.

-- 
Jeremy Jackson <jerj@coplanar.net>



Reply to: