Comment 5 for bug 1508766

Revision history for this message
Martin Pitt (pitti) wrote :

> I'm surprised the root filesystem is read-only at the point where systemd starts. Isn't it remounted rw by the initramfs? (It is in Debian.)

No, it shouldn't; Usually grub passes the "ro" option in which case initramfs should leave it as readonly (see /usr/share/initramfs-tools/init). rw mounting happens in systemd-remount-fs.service.

Sorry for the misunderstanding/false information: Indeed /etc/machine-id must at least exist (empty is okay) in order to regenerate it -- then systemd will create a new one in a temporary location in /run, bind-mount /etc/machine-id to it, and systemd-machine-id-commit.service will then write it to /etc/machine-id once the fs becomes read-write. So the message in the description as well as machine-id(5) ("Optionally, for stateless systems, it is generated during runtime at boot if it is found to be empty.") are quite correct.

So this is pretty much "wontfix" on the downstream side. There's probably a way to combine the above so that writing an entirely absent /etc/machine-id after the root fs becomes rw, but that should then happen upstream.