1SYSTEMD-MACHINE-ID-SETUP(1)systemd-machine-id-setupSYSTEMD-MACHINE-ID-SETUP(1)
2
3
4

NAME

6       systemd-machine-id-setup - Initialize the machine ID in /etc/machine-id
7

SYNOPSIS

9       systemd-machine-id-setup
10

DESCRIPTION

12       systemd-machine-id-setup may be used by system installer tools to
13       initialize the machine ID stored in /etc/machine-id at install time,
14       with a provisioned or randomly generated ID. See machine-id(5) for more
15       information about this file.
16
17       If the tool is invoked without the --commit switch, /etc/machine-id is
18       initialized with a valid, new machined ID if it is missing or empty.
19       The new machine ID will be acquired in the following fashion:
20
21        1. If a valid D-Bus machine ID is already configured for the system,
22           the D-Bus machine ID is copied and used to initialize the machine
23           ID in /etc/machine-id.
24
25        2. If run inside a KVM virtual machine and a UUID is configured (via
26           the -uuid option), this UUID is used to initialize the machine ID.
27           The caller must ensure that the UUID passed is sufficiently unique
28           and is different for every booted instance of the VM.
29
30        3. Similarly, if run inside a Linux container environment and a UUID
31           is configured for the container, this is used to initialize the
32           machine ID. For details, see the documentation of the Container
33           Interface[1].
34
35        4. Otherwise, a new ID is randomly generated.
36
37       The --commit switch may be used to commit a transient machined ID to
38       disk, making it persistent. For details, see below.
39
40       Use systemd-firstboot(1) to initialize the machine ID on mounted (but
41       not booted) system images.
42

OPTIONS

44       The following options are understood:
45
46       --root=root
47           Takes a directory path as argument. All paths operated will be
48           prefixed with the given alternate root path, including the path for
49           /etc/machine-id itself.
50
51       --commit
52           Commit a transient machine ID to disk. This command may be used to
53           convert a transient machine ID into a persistent one. A transient
54           machine ID file is one that was bind mounted from a memory file
55           system (usually "tmpfs") to /etc/machine-id during the early phase
56           of the boot process. This may happen because /etc is initially
57           read-only and was missing a valid machine ID file at that point.
58
59           This command will execute no operation if /etc/machine-id is not
60           mounted from a memory file system, or if /etc is read-only. The
61           command will write the current transient machine ID to disk and
62           unmount the /etc/machine-id mount point in a race-free manner to
63           ensure that this file is always valid and accessible for other
64           processes.
65
66           This command is primarily used by the systemd-machine-id-
67           commit.service(8) early boot service.
68
69       --print
70           Print the machine ID generated or committed after the operation is
71           complete.
72
73       -h, --help
74           Print a short help text and exit.
75
76       --version
77           Print a short version string and exit.
78

EXIT STATUS

80       On success, 0 is returned, a non-zero failure code otherwise.
81

SEE ALSO

83       systemd(1), machine-id(5), systemd-machine-id-commit.service(8), dbus-
84       uuidgen(1), systemd-firstboot(1)
85

NOTES

87        1. Container Interface
88           https://systemd.io/CONTAINER_INTERFACE
89
90
91
92systemd 245                                        SYSTEMD-MACHINE-ID-SETUP(1)
Impressum