1 <?xml version='
1.0'
?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM
"custom-entities.ent" >
9 This file is part of systemd.
11 Copyright 2012 Lennart Poettering
13 systemd is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation; either version 2.1 of the License, or
16 (at your option) any later version.
18 systemd is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
23 You should have received a copy of the GNU Lesser General Public License
24 along with systemd; If not, see <http://www.gnu.org/licenses/>.
27 <refentry id=
"systemd-machine-id-setup"
28 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
31 <title>systemd-machine-id-setup
</title>
32 <productname>systemd
</productname>
36 <contrib>Developer
</contrib>
37 <firstname>Lennart
</firstname>
38 <surname>Poettering
</surname>
39 <email>lennart@poettering.net
</email>
45 <refentrytitle>systemd-machine-id-setup
</refentrytitle>
46 <manvolnum>1</manvolnum>
50 <refname>systemd-machine-id-setup
</refname>
51 <refpurpose>Initialize the machine ID in /etc/machine-id
</refpurpose>
56 <command>systemd-machine-id-setup
</command>
61 <title>Description
</title>
63 <para><command>systemd-machine-id-setup
</command> may be used by
64 system installer tools to initialize the machine ID stored in
65 <filename>/etc/machine-id
</filename> at install time with a
66 randomly generated ID. See
67 <citerefentry><refentrytitle>machine-id
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
68 for more information about this file.
</para>
70 <para>This tool will execute no operation if
71 <filename>/etc/machine-id
</filename> is already
74 <para>If a valid D-Bus machine ID is already configured for the
75 system, the D-Bus machine ID is copied and used to initialize the
76 machine ID in
<filename>/etc/machine-id
</filename>.
</para>
78 <para>If run inside a KVM virtual machine and a UUID is passed via
79 the
<option>-uuid
</option> option, this UUID is used to initialize
80 the machine ID instead of a randomly generated one. The caller
81 must ensure that the UUID passed is sufficiently unique and is
82 different for every booted instanced of the VM.
</para>
84 <para>Similar, if run inside a Linux container environment and a
85 UUID is set for the container this is used to initialize the
86 machine ID. For details see the documentation of the
<ulink
87 url=
"http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container
88 Interface
</ulink>.
</para>
91 <citerefentry><refentrytitle>systemd-firstboot
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
92 to initialize the machine ID on mounted (but not booted) system
98 <title>Options
</title>
100 <para>The following options are understood:
</para>
104 <term><option>--root=
<replaceable>root
</replaceable></option></term>
105 <listitem><para>Takes a directory path as an argument. All
106 paths will be prefixed with the given alternate
107 <replaceable>root
</replaceable> path, including config search
108 paths.
</para></listitem>
110 <xi:include href=
"standard-options.xml" xpointer=
"help" />
111 <xi:include href=
"standard-options.xml" xpointer=
"version" />
117 <title>Exit status
</title>
119 <para>On success,
0 is returned, a non-zero failure code
124 <title>See Also
</title>
126 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
127 <citerefentry><refentrytitle>machine-id
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
128 <citerefentry project='dbus'
><refentrytitle>dbus-uuidgen
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
129 <citerefentry><refentrytitle>systemd-firstboot
</refentrytitle><manvolnum>1</manvolnum></citerefentry>