]> git.proxmox.com Git - systemd.git/blob - man/systemd-firstboot.service.html
Imported Upstream version 220
[systemd.git] / man / systemd-firstboot.service.html
1 <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>
2 a.headerlink {
3 color: #c60f0f;
4 font-size: 0.8em;
5 padding: 0 4px 0 4px;
6 text-decoration: none;
7 visibility: hidden;
8 }
9
10 a.headerlink:hover {
11 background-color: #c60f0f;
12 color: white;
13 }
14
15 h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
16 visibility: visible;
17 }
18 </style><a href="index.html">Index </a>·
19 <a href="systemd.directives.html">Directives </a>·
20 <a href="../python-systemd/index.html">Python </a>·
21 <a href="../libudev/index.html">libudev </a>·
22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 220</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="idm140039060778768"></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
23 basic system settings interactively on the first boot, or
24 optionally non-interactively when a system image is created. The
25 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
26 locale variables <code class="varname">LANG=</code> and
27 <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
28 the users, set non-interactively on the tool's command line, or be
29 copied from a host system that is used to set up the system
30 image.</p><p>If a setting is already initialized it will not be
31 overwritten and the user will not be prompted for the
32 setting.</p><p>Note that this tool operates directly on the file system and
33 does not involve any running system services, unlike
34 <a href="http://man7.org/linux/man-pages/man1/localectl.1.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>,
35 <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>
36 or
37 <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>.
38 This allows <span class="command"><strong>systemd-firstboot</strong></span> to operate on
39 mounted but not booted disk images and in early boot. It is not
40 recommended to use <span class="command"><strong>systemd-firstboot</strong></span> on the
41 running system while it is up.</p></div><div class="refsect1"><a name="idm140039055867072"></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
42 paths will be prefixed with the given alternate
43 <em class="replaceable"><code>root</code></em> path, including config search
44 paths. This is useful to operate on a system image mounted to
45 the specified directory instead of the host system itself.
46 </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
47 <code class="varname">LANG=</code> and <code class="varname">LC_MESSAGES</code>
48 settings. The argument should be a valid locale identifier,
49 such as "<code class="literal">de_DE.UTF-8</code>". This controls the
50 <a href="http://man7.org/linux/man-pages/man5/locale.conf.5.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>
51 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
52 be a valid time zone identifier, such as
53 "<code class="literal">Europe/Berlin</code>". This controls the
54 <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>
55 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
56 be a host name, compatible with DNS. This controls the
57 <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>
58 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
59 the
60 <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
61 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.
62 This creates a
63 <a href="http://linux.die.net/man/5/shadow"><span class="citerefentry"><span class="refentrytitle">shadow</span>(5)</span></a>
64 file. This setting exists in two forms:
65 <code class="option">--root-password=</code> accepts the password to set
66 directly on the command line,
67 <code class="option">--root-password-file=</code> reads it from a file.
68 Note that it is not recommended specifying passwords on the
69 command line as other users might be able to see them simply
70 by invoking
71 <a href="http://linux.die.net/man/1/ps"><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
72 basic setting. Note that any explicit configuration settings
73 specified on the command line take precedence, and the user is
74 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
75 and root password. This is equivalent to specifying
76 <code class="option">--prompt-locale</code>,
77 <code class="option">--prompt-timezone</code>,
78 <code class="option">--prompt-hostname</code>,
79 <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.
80 This only works in combination with <code class="option">--root=</code>
81 (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
82 the host. This is equivalent to specifying
83 <code class="option">--copy-locale</code>,
84 <code class="option">--copy-timezone</code>,
85 <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
86 ID. This only works in combination with
87 <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.
88 </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="idm140039055829056"></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
89 otherwise.</p></div><div class="refsect1"><a name="idm140039055827904"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
90 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
91 <a href="http://man7.org/linux/man-pages/man5/locale.conf.5.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>,
92 <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>,
93 <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
94 <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
95 <a href="http://linux.die.net/man/5/shadow"><span class="citerefentry"><span class="refentrytitle">shadow</span>(5)</span></a>,
96 <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>,
97 <a href="http://man7.org/linux/man-pages/man1/localectl.1.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>,
98 <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>,
99 <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>
100 </p></div></div></body></html>