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

Re: ifupdown writes to /etc... a bug?

In chiark.mail.debian.devel, you wrote:

>Maybem but it probably creates a lot of headaches. /etc is the ONLY
>directory with guaranteed early write access.  Some stuff IS bound to
>have to use /etc instead of /var.

/etc is not guaranteed to be writeable, and certainly won't be if
it's shared between all of your net-bootable clients. As far as I can
tell, the easiest way to deal with this is to write to /var/run and then
cause /var/run to always point towards writeable storage even if /var
isn't mounted yet, which is the method that I implemented for a cluster
of netbooting systems. It looked something like this:

/initrd (where the ramdisk ends up if it's not unmounted)
/var (empty except for a symlink to /initrd/var/run )

And then later on, the real /var can be mounted and also contain a
symlink to the same place. It's far easier to ensure that /var/run is
always writeable than it is to ensure that /etc is writeable.

Matthew Garrett | mjg59-chiark.mail.debian.devel@srcf.ucam.org

Reply to: