3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 This file is part of systemd.
7 Copyright 2014 Didier Roche
9 systemd is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public License
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 <refentry id="systemd-machine-id-commit.service">
25 <title>systemd-machine-id-commit.service</title>
26 <productname>systemd</productname>
30 <contrib>Developer</contrib>
31 <firstname>Didier</firstname>
32 <surname>Roche</surname>
33 <email>didrocks@ubuntu.com</email>
39 <refentrytitle>systemd-machine-id-commit.service</refentrytitle>
40 <manvolnum>8</manvolnum>
44 <refname>systemd-machine-id-commit.service</refname>
45 <refpurpose>Commit transient machine-id to disk</refpurpose>
49 <para><filename>systemd-machine-id-commit.service</filename></para>
50 <para><filename>/usr/lib/systemd/systemd-machine-id-commit</filename></para>
54 <title>Description</title>
56 <para><filename>systemd-machine-id-commit.service</filename> is
57 a service responsible for commiting any transient
58 <filename>/etc/machine-id</filename> file to a writable file
60 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
61 for more information about this file.</para>
63 <para>This service is started shortly after
64 <filename>local-fs.target</filename> if
65 <filename>/etc/machine-id</filename> is an independent mount
66 point (probably a tmpfs one) and /etc is writable.
67 <command>systemd-machine-id-commit</command> will then
68 write current machine ID to disk and unmount the transient
69 <filename>/etc/machine-id</filename> file in a race-free
70 manner to ensure that file is always valid for other
73 <para>Note that the traditional way to initialize the machine
74 ID in <filename>/etc/machine-id</filename> is to use
75 <command>systemd-machine-id-setup</command> by system
76 installer tools. You can also use
77 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
78 to initialize the machine ID on mounted (but not
79 booted) system images. The main use case for that service is
80 <filename>/etc/machine-id</filename> being an empty file at
81 boot and initrd chaining to systemd giving it a read only file
82 system that will be turned read-write later during the boot
85 <para>There is no consequence if that service fails other than
86 a newer machine-id will be generated during next system boot.
91 <title>See Also</title>
93 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
94 <citerefentry><refentrytitle>systemd-machine-id-commit</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
95 <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
96 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
97 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>