systemd-machine-id-commit.service man page

systemd-machine-id-commit.service — Commit transient machine-id to disk





systemd-machine-id-commit.service is a service responsible for committing any transient /etc/machine-id file to a writable file system. See machine-id(5) for more information about this file.

This service is started shortly after local-fs.target if /etc/machine-id is an independent mount point (probably a tmpfs one) and /etc is writable. systemd-machine-id-commit will then write current machine ID to disk and unmount the transient /etc/machine-id file in a race-free manner to ensure that file is always valid for other processes.

Note that the traditional way to initialize the machine ID in /etc/machine-id is to use systemd-machine-id-setup by system installer tools. You can also use systemd-firstboot(1) to initialize the machine ID on mounted (but not booted) system images. The main use case for that service is /etc/machine-id being an empty file at boot and initrd chaining to systemd giving it a read only file system that will be turned read-write later during the boot process.

There is no consequence if that service fails other than a newer machine-id will be generated during next system boot.

See Also

systemd(1), systemd-machine-id-commit(1), systemd-machine-id-setup(1), machine-id(5), systemd-firstboot(1)

Referenced By

systemd.directives(7), systemd.index(7), systemd-machine-id-commit(1).

Explore man page connections for systemd-machine-id-commit.service(8).