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

EXIT STATUS

85       On success, 0 is returned, a non-zero failure code otherwise.
86

SEE ALSO

88       systemd(1), machine-id(5), systemd-machine-id-commit.service(8), dbus-
89       uuidgen(1), systemd-firstboot(1)
90

NOTES

92        1. Container Interface
93           https://systemd.io/CONTAINER_INTERFACE
94
95
96
97systemd 250                                        SYSTEMD-MACHINE-ID-SETUP(1)
Impressum