[RFC] Making D-Bus suitable for being run early during boot

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Jul 12 03:00:26 PDT 2010


On Fri, 09 Jul 2010 at 08:39:12 +0200, Thiago Macieira wrote:
> Are there systems where /var isn't a local filesystem? I guess just about any 
> configuration possible exists...

Debian supports NFS /var (and /usr), so you can't necessarily rely on /var
being mounted immediately. This probably isn't well-tested for desktop
configurations, but I don't see why the system bus wouldn't be useful for a
server-like configuration.

> I guess the only other possibility is /lib itself. I think that's a better fit 
> actually.

In Debian, various things that need an early writeable filesystem use
/lib/init/rw, which is a tmpfs. For instance, resolvconf(1) dynamically
creates resolv.conf by piecing together information from various ways to be
told a DNS server, and needs to run before NFS filesystems can be mounted,
so we can find out where the NFS server is :-)

If people from other distributions are interested in standardizing things like
that in the FHS, I'm sure that would be welcomed. (I'm just a userland
developer, I have no particular involvement in early boot.)

From a Debian point of view, putting more writeable files in the root
filesystem, and particularly putting /var-like files in /etc, is considered
to be a regression: resolv.conf is a symlink into a tmpfs (if you have
resolvconf, which I think is in standard installations), /etc/mtab is a symlink
into /proc, and so on; it's meant to be possible to run a "stateless"
system from a live-CD or read-only NFS root, as long as you don't want to
reconfigure it.

I realise that the D-Bus machine ID isn't entirely analogous to mtab and
resolv.conf, because those files are written during normal operation, whereas
the machine ID is generated once and not touched again (like the SSH keys).
However, the fewer special cases needed for live CDs and the like, the better
(live CDs already need to special-case the SSH keys, as I understand it).

    Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 793 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100712/5dccc03a/attachment.pgp>


More information about the dbus mailing list