On Fri, 13.03.15 14:20, Tobias Hunger (tobias.hun...@gmail.com) wrote: > Hi Zbyszek, > > I would expect the machine-id to be written before mount units are > processed, so for that to work I would need to mount /var in the > initrd, wouldn't I?
Yeah, /var/lib/dbus/machine-id isn't a general purpose solution, since /var ca nbe mounted very late. (Also, as mentioned in other mail, it's compat only, please don't use it.) > Currently I am trying to just write the machine-id to /etc in the > initrd. This makes systemd loose the understanding that /etc is empty > though, which might have some side-effects that I am not yet > anticipating. > > Isn't systemd started from inside the initrd once the new root has > been set up? Maybe I could set $container_uuid and feed the machine-id > to systemd that way? I am afraid that this will lead to some other > side-effects, because systemd might assume to be running inside a > container. Looks like I will have to do some testing over the > weekend:-) $container_uuid is only used in containers. If you set it in other conditions, we don't care. > Maybe I am lucky and /sys/class/dmi/id/product_uuid is set. That is only read on kvm, since on physical hardware it is more often than not filled with rubbish, that is not useful as a real machine id. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel