213 lines
5.2 KiB
HTML
213 lines
5.2 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SYSTEMD-MACHINE-ID-SETUP</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SYSTEMD-MACHINE-ID-SETUP</H1>
|
|
Section: systemd-machine-id-setup (1)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
systemd-machine-id-setup - Initialize the machine ID in /etc/machine-id
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>systemd-machine-id-setup</B>
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<B>systemd-machine-id-setup</B>
|
|
<DD>may be used by system installer tools to initialize the machine ID stored in
|
|
/etc/machine-id
|
|
at install time, with a provisioned or randomly generated ID. See
|
|
<B><A HREF="/cgi-bin/man/man2html?5+machine-id">machine-id</A></B>(5)
|
|
for more information about this file.
|
|
<P>
|
|
|
|
If the tool is invoked without the
|
|
<B>--commit</B>
|
|
switch,
|
|
/etc/machine-id
|
|
is initialized with a valid, new machined ID if it is missing or empty. The new machine ID will be acquired in the following fashion:
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
1.
|
|
|
|
|
|
If a valid D-Bus machine ID is already configured for the system, the D-Bus machine ID is copied and used to initialize the machine ID in
|
|
/etc/machine-id.
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
2.
|
|
|
|
|
|
If run inside a KVM virtual machine and a UUID is configured (via the
|
|
<B>-uuid</B>
|
|
option), this UUID is used to initialize the machine ID. The caller must ensure that the UUID passed is sufficiently unique and is different for every booted instance of the VM.
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
3.
|
|
|
|
|
|
Similarly, if run inside a Linux container environment and a UUID is configured for the container, this is used to initialize the machine ID. For details, see the documentation of the
|
|
m[blue]<B>Container Interface</B>m[]<FONT SIZE="-2">[1]</FONT>.
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
4.
|
|
|
|
|
|
Otherwise, a new ID is randomly generated.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
The
|
|
<B>--commit</B>
|
|
switch may be used to commit a transient machined ID to disk, making it persistent. For details, see below.
|
|
<P>
|
|
|
|
Use
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemd-firstboot">systemd-firstboot</A></B>(1)
|
|
to initialize the machine ID on mounted (but not booted) system images.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
The following options are understood:
|
|
<P>
|
|
|
|
<B>--root=</B><B></B><I>root</I>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
Takes a directory path as argument. All paths operated will be prefixed with the given alternate
|
|
<I>root</I>
|
|
path, including the path for
|
|
/etc/machine-id
|
|
itself.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--commit</B>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
Commit a transient machine ID to disk. This command may be used to convert a transient machine ID into a persistent one. A transient machine ID file is one that was bind mounted from a memory file system (usually
|
|
"tmpfs") to
|
|
/etc/machine-id
|
|
during the early phase of the boot process. This may happen because
|
|
/etc
|
|
is initially read-only and was missing a valid machine ID file at that point.
|
|
<P>
|
|
This command will execute no operation if
|
|
/etc/machine-id
|
|
is not mounted from a memory file system, or if
|
|
/etc
|
|
is read-only. The command will write the current transient machine ID to disk and unmount the
|
|
/etc/machine-id
|
|
mount point in a race-free manner to ensure that this file is always valid and accessible for other processes.
|
|
<P>
|
|
This command is primarily used by the
|
|
<B><A HREF="/cgi-bin/man/man2html?8+systemd-machine-id-commit.service">systemd-machine-id-commit.service</A></B>(8)
|
|
early boot service.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--print</B>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
Print the machine ID generated or committed after the operation is complete.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-h</B>, <B>--help</B>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
Print a short help text and exit.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--version</B>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
Print a short version string and exit.
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXIT STATUS</H2>
|
|
|
|
<P>
|
|
|
|
On success, 0 is returned, a non-zero failure code otherwise.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemd">systemd</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+machine-id">machine-id</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+systemd-machine-id-commit.service">systemd-machine-id-commit.service</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dbus-uuidgen">dbus-uuidgen</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemd-firstboot">systemd-firstboot</A></B>(1)
|
|
<A NAME="lbAH"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="11"> 1.<DD>
|
|
Container Interface
|
|
<DL COMPACT><DT id="12"><DD>
|
|
<A HREF="https://systemd.io/CONTAINER_INTERFACE">https://systemd.io/CONTAINER_INTERFACE</A>
|
|
</DL>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="13"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="14"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="15"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="16"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="17"><A HREF="#lbAF">EXIT STATUS</A><DD>
|
|
<DT id="18"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="19"><A HREF="#lbAH">NOTES</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:28 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|