mirror of
https://git.proxmox.com/git/systemd
synced 2025-05-29 19:22:47 +00:00
101 lines
12 KiB
HTML
101 lines
12 KiB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-firstboot</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
|
|
a.headerlink {
|
|
color: #c60f0f;
|
|
font-size: 0.8em;
|
|
padding: 0 4px 0 4px;
|
|
text-decoration: none;
|
|
visibility: hidden;
|
|
}
|
|
|
|
a.headerlink:hover {
|
|
background-color: #c60f0f;
|
|
color: white;
|
|
}
|
|
|
|
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
|
|
visibility: visible;
|
|
}
|
|
</style><a href="index.html">Index </a>·
|
|
<a href="systemd.directives.html">Directives </a>·
|
|
<a href="../python-systemd/index.html">Python </a>·
|
|
<a href="../libudev/index.html">libudev </a>·
|
|
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="systemd-firstboot"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-firstboot, systemd-firstboot.service — Initialize basic system settings on or before the first boot-up of a system</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-firstboot</code> [OPTIONS...]</p></div><p><code class="filename">systemd-firstboot.service</code></p></div><div class="refsect1"><a name="idm139823958249488"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-firstboot</strong></span> initializes the most
|
|
basic system settings interactively on the first boot, or
|
|
optionally non-interactively when a system image is created. The
|
|
following settings may be set up:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>The system locale, more specifically the two
|
|
locale variables <code class="varname">LANG=</code> and
|
|
<code class="varname">LC_MESSAGES</code></p></li><li class="listitem"><p>The system time zone</p></li><li class="listitem"><p>The system host name</p></li><li class="listitem"><p>The machine ID of the system</p></li><li class="listitem"><p>The root user's password</p></li></ul></div><p>Each of the fields may either be queried interactively from
|
|
the users, set non-interactively on the tool's command line, or be
|
|
copied from a host system that is used to set up the system
|
|
image.</p><p>If a setting is already initialized it will not be
|
|
overwritten and the user will not be prompted for the
|
|
setting.</p><p>Note that this tool operates directly on the file system and
|
|
does not involve any running system services, unlike
|
|
<a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>,
|
|
<a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>
|
|
or
|
|
<a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>.
|
|
This allows <span class="command"><strong>systemd-firstboot</strong></span> to operate on
|
|
mounted but not booted disk images and in early boot. It is not
|
|
recommended to use <span class="command"><strong>systemd-firstboot</strong></span> on the
|
|
running system while it is up.</p></div><div class="refsect1"><a name="idm139823958237984"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root">¶</a></dt><dd><p>Takes a directory path as an argument. All
|
|
paths will be prefixed with the given alternate
|
|
<em class="replaceable"><code>root</code></em> path, including config search
|
|
paths. This is useful to operate on a system image mounted to
|
|
the specified directory instead of the host system itself.
|
|
</p></dd><dt id="--locale=LOCALE"><span class="term"><code class="option">--locale=<em class="replaceable"><code>LOCALE</code></em></code>, </span><span class="term"><code class="option">--locale-messages=<em class="replaceable"><code>LOCALE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--locale=LOCALE">¶</a></dt><dd><p>Sets the system locale, more specifically the
|
|
<code class="varname">LANG=</code> and <code class="varname">LC_MESSAGES</code>
|
|
settings. The argument should be a valid locale identifier,
|
|
such as "<code class="literal">de_DE.UTF-8</code>". This controls the
|
|
<a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>
|
|
configuration file.</p></dd><dt id="--timezone=TIMEZONE"><span class="term"><code class="option">--timezone=<em class="replaceable"><code>TIMEZONE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--timezone=TIMEZONE">¶</a></dt><dd><p>Sets the system time zone. The argument should
|
|
be a valid time zone identifier, such as
|
|
"<code class="literal">Europe/Berlin</code>". This controls the
|
|
<a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>
|
|
symlink.</p></dd><dt id="--hostname=HOSTNAME"><span class="term"><code class="option">--hostname=<em class="replaceable"><code>HOSTNAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--hostname=HOSTNAME">¶</a></dt><dd><p>Sets the system hostname. The argument should
|
|
be a host name, compatible with DNS. This controls the
|
|
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>
|
|
configuration file.</p></dd><dt id="--machine-id=ID"><span class="term"><code class="option">--machine-id=<em class="replaceable"><code>ID</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--machine-id=ID">¶</a></dt><dd><p>Sets the system's machine ID. This controls
|
|
the
|
|
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
|
|
file.</p></dd><dt id="--root-password=PASSWORD"><span class="term"><code class="option">--root-password=<em class="replaceable"><code>PASSWORD</code></em></code>, </span><span class="term"><code class="option">--root-password-file=<em class="replaceable"><code>PATH</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root-password=PASSWORD">¶</a></dt><dd><p>Sets the password of the system's root user.
|
|
This creates a
|
|
<a href="shadow.html"><span class="citerefentry"><span class="refentrytitle">shadow</span>(5)</span></a>
|
|
file. This setting exists in two forms:
|
|
<code class="option">--root-password=</code> accepts the password to set
|
|
directly on the command line,
|
|
<code class="option">--root-password-file=</code> reads it from a file.
|
|
Note that it is not recommended specifying passwords on the
|
|
command line as other users might be able to see them simply
|
|
by invoking
|
|
<a href="ps.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>.</p></dd><dt id="--prompt-locale"><span class="term"><code class="option">--prompt-locale</code>, </span><span class="term"><code class="option">--prompt-timezone</code>, </span><span class="term"><code class="option">--prompt-hostname</code>, </span><span class="term"><code class="option">--prompt-root-password</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt-locale">¶</a></dt><dd><p>Prompt the user interactively for a specific
|
|
basic setting. Note that any explicit configuration settings
|
|
specified on the command line take precedence, and the user is
|
|
not prompted for it.</p></dd><dt id="--prompt"><span class="term"><code class="option">--prompt</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt">¶</a></dt><dd><p>Query the user for locale, timezone, hostname
|
|
and root password. This is equivalent to specifying
|
|
<code class="option">--prompt-locale</code>,
|
|
<code class="option">--prompt-timezone</code>,
|
|
<code class="option">--prompt-hostname</code>,
|
|
<code class="option">--prompt-root-password</code> in combination.</p></dd><dt id="--copy-locale"><span class="term"><code class="option">--copy-locale</code>, </span><span class="term"><code class="option">--copy-timezone</code>, </span><span class="term"><code class="option">--copy-root-password</code></span><a class="headerlink" title="Permalink to this term" href="#--copy-locale">¶</a></dt><dd><p>Copy a specific basic setting from the host.
|
|
This only works in combination with <code class="option">--root=</code>
|
|
(see above).</p></dd><dt id="--copy"><span class="term"><code class="option">--copy</code></span><a class="headerlink" title="Permalink to this term" href="#--copy">¶</a></dt><dd><p>Copy locale, time zone and root password from
|
|
the host. This is equivalent to specifying
|
|
<code class="option">--copy-locale</code>,
|
|
<code class="option">--copy-timezone</code>,
|
|
<code class="option">--copy-root-password</code> in combination.</p></dd><dt id="--setup-machine-id"><span class="term"><code class="option">--setup-machine-id</code></span><a class="headerlink" title="Permalink to this term" href="#--setup-machine-id">¶</a></dt><dd><p>Initialize the system's machine ID to a random
|
|
ID. This only works in combination with
|
|
<code class="option">--root=</code>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
|
|
</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm139823962093920"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure code
|
|
otherwise.</p></div><div class="refsect1"><a name="idm139823962092736"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
|
|
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
|
|
<a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>,
|
|
<a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>,
|
|
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
|
|
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
|
|
<a href="shadow.html"><span class="citerefentry"><span class="refentrytitle">shadow</span>(5)</span></a>,
|
|
<a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>,
|
|
<a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>,
|
|
<a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>,
|
|
<a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>
|
|
</p></div></div></body></html>
|