| 1 |
<?xml version='1.0'?> <!--*-nxml-*--> |
| 2 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
| 4 |
<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
| 5 |
|
| 6 |
<refentry id="systemd-firstboot" conditional='ENABLE_FIRSTBOOT' |
| 7 |
xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 8 |
|
| 9 |
<refentryinfo> |
| 10 |
<title>systemd-firstboot</title> |
| 11 |
<productname>systemd</productname> |
| 12 |
</refentryinfo> |
| 13 |
|
| 14 |
<refmeta> |
| 15 |
<refentrytitle>systemd-firstboot</refentrytitle> |
| 16 |
<manvolnum>1</manvolnum> |
| 17 |
</refmeta> |
| 18 |
|
| 19 |
<refnamediv> |
| 20 |
<refname>systemd-firstboot</refname> |
| 21 |
<refname>systemd-firstboot.service</refname> |
| 22 |
<refpurpose>Initialize basic system settings on or before the first boot-up of a system</refpurpose> |
| 23 |
</refnamediv> |
| 24 |
|
| 25 |
<refsynopsisdiv> |
| 26 |
<cmdsynopsis> |
| 27 |
<command>systemd-firstboot</command> |
| 28 |
<arg choice="opt" rep="repeat">OPTIONS</arg> |
| 29 |
</cmdsynopsis> |
| 30 |
|
| 31 |
<para><filename>systemd-firstboot.service</filename></para> |
| 32 |
</refsynopsisdiv> |
| 33 |
|
| 34 |
<refsect1> |
| 35 |
<title>Description</title> |
| 36 |
|
| 37 |
<para>The <command>systemd-firstboot.service</command> unit is one of the units which are used to |
| 38 |
initialize the machine configuration during "First Boot", i.e. when the system is freshly installed or |
| 39 |
after a factory reset. The |
| 40 |
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> manager |
| 41 |
itself will initialize |
| 42 |
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> and preset |
| 43 |
all units, enabling or disabling them according to the |
| 44 |
<citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 45 |
settings. <filename>systemd-firstboot.service</filename> is started later to interactively initialize |
| 46 |
basic system configuration. It is started only if <varname>ConditionFirstBoot=yes</varname> is met, which |
| 47 |
essentially means that <filename>/etc/</filename> is unpopulated, see |
| 48 |
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> for |
| 49 |
details. System credentials may be used to inject configuration; those settings are not queried |
| 50 |
interactively.</para> |
| 51 |
|
| 52 |
<para>The <command>systemd-firstboot</command> command can also be used to non-interactively initialize |
| 53 |
an offline system image.</para> |
| 54 |
|
| 55 |
<para>The following settings may be configured:</para> |
| 56 |
|
| 57 |
<itemizedlist> |
| 58 |
<listitem><para>The machine ID of the system</para></listitem> |
| 59 |
|
| 60 |
<listitem><para>The system locale, more specifically the two |
| 61 |
locale variables <varname>LANG=</varname> and |
| 62 |
<varname>LC_MESSAGES</varname></para></listitem> |
| 63 |
|
| 64 |
<listitem><para>The system keyboard map</para></listitem> |
| 65 |
|
| 66 |
<listitem><para>The system time zone</para></listitem> |
| 67 |
|
| 68 |
<listitem><para>The system hostname</para></listitem> |
| 69 |
|
| 70 |
<listitem><para>The machine tags</para></listitem> |
| 71 |
|
| 72 |
<listitem><para>The kernel command line used when installing kernel images</para></listitem> |
| 73 |
|
| 74 |
<listitem><para>The root user's password and shell</para></listitem> |
| 75 |
</itemizedlist> |
| 76 |
|
| 77 |
<para>Each of the fields may either be queried interactively by |
| 78 |
users, set non-interactively on the tool's command line, or be |
| 79 |
copied from a host system that is used to set up the system |
| 80 |
image.</para> |
| 81 |
|
| 82 |
<para>If a setting is already initialized, it will not be |
| 83 |
overwritten and the user will not be prompted for the |
| 84 |
setting.</para> |
| 85 |
|
| 86 |
<para>Note that this tool operates directly on the file system and |
| 87 |
does not involve any running system services, unlike |
| 88 |
<citerefentry project='man-pages'><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
| 89 |
<citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
| 90 |
or |
| 91 |
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. |
| 92 |
This allows <command>systemd-firstboot</command> to operate on |
| 93 |
mounted but not booted disk images and in early boot. It is not |
| 94 |
recommended to use <command>systemd-firstboot</command> on the |
| 95 |
running system after it has been set up.</para> |
| 96 |
</refsect1> |
| 97 |
|
| 98 |
<refsect1> |
| 99 |
<title>Options</title> |
| 100 |
|
| 101 |
<para>The following options are understood:</para> |
| 102 |
|
| 103 |
<variablelist> |
| 104 |
<varlistentry> |
| 105 |
<term><option>--root=<replaceable>root</replaceable></option></term> |
| 106 |
<listitem><para>Takes a directory path as an argument. All |
| 107 |
paths will be prefixed with the given alternate |
| 108 |
<replaceable>root</replaceable> path, including config search |
| 109 |
paths. This is useful to operate on a system image mounted to |
| 110 |
the specified directory instead of the host system itself. |
| 111 |
</para> |
| 112 |
|
| 113 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 114 |
</varlistentry> |
| 115 |
|
| 116 |
<varlistentry> |
| 117 |
<term><option>--image=<replaceable>path</replaceable></option></term> |
| 118 |
<listitem><para>Takes a path to a disk image file or block device node. If specified all operations |
| 119 |
are applied to file system in the indicated disk image. This is similar to <option>--root=</option> |
| 120 |
but operates on file systems stored in disk images or block devices. The disk image should either |
| 121 |
contain just a file system or a set of file systems within a GPT partition table, following the |
| 122 |
<ulink url="https://uapi-group.org/specifications/specs/discoverable_partitions_specification">UAPI.2 Discoverable Partitions |
| 123 |
Specification</ulink>. For further information on supported disk images, see |
| 124 |
<citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s |
| 125 |
switch of the same name.</para> |
| 126 |
|
| 127 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 128 |
</varlistentry> |
| 129 |
|
| 130 |
<varlistentry> |
| 131 |
<term><option>--locale=<replaceable>LOCALE</replaceable></option></term> |
| 132 |
<term><option>--locale-messages=<replaceable>LOCALE</replaceable></option></term> |
| 133 |
|
| 134 |
<listitem><para>Sets the system locale, more specifically the |
| 135 |
<varname>LANG=</varname> and <varname>LC_MESSAGES</varname> |
| 136 |
settings. The argument should be a valid locale identifier, |
| 137 |
such as <literal>de_DE.UTF-8</literal>. This controls the |
| 138 |
<citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 139 |
configuration file.</para> |
| 140 |
|
| 141 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 142 |
</varlistentry> |
| 143 |
|
| 144 |
<varlistentry> |
| 145 |
<term><option>--keymap=<replaceable>KEYMAP</replaceable></option></term> |
| 146 |
|
| 147 |
<listitem><para>Sets the system keyboard layout. The argument should be a valid keyboard map, |
| 148 |
such as <literal>de-latin1</literal>. This controls the <literal>KEYMAP</literal> entry in the |
| 149 |
<citerefentry project='man-pages'><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 150 |
configuration file.</para> |
| 151 |
|
| 152 |
<xi:include href="version-info.xml" xpointer="v236"/></listitem> |
| 153 |
</varlistentry> |
| 154 |
|
| 155 |
<varlistentry> |
| 156 |
<term><option>--timezone=<replaceable>TIMEZONE</replaceable></option></term> |
| 157 |
|
| 158 |
<listitem><para>Sets the system time zone. The argument should |
| 159 |
be a valid time zone identifier, such as |
| 160 |
<literal>Europe/Berlin</literal>. This controls the |
| 161 |
<citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 162 |
symlink.</para> |
| 163 |
|
| 164 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 165 |
</varlistentry> |
| 166 |
|
| 167 |
<varlistentry> |
| 168 |
<term><option>--hostname=<replaceable>HOSTNAME</replaceable></option></term> |
| 169 |
|
| 170 |
<listitem><para>Sets the system hostname. The argument should |
| 171 |
be a hostname, compatible with DNS. This controls the |
| 172 |
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 173 |
configuration file.</para> |
| 174 |
|
| 175 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 176 |
</varlistentry> |
| 177 |
|
| 178 |
<varlistentry> |
| 179 |
<term><option>--setup-machine-id</option></term> |
| 180 |
|
| 181 |
<listitem><para>Initialize the system's machine ID to a random ID. This controls the |
| 182 |
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> file. |
| 183 |
</para> |
| 184 |
|
| 185 |
<para>This option only works in combination with <option>--root=</option> or |
| 186 |
<option>--image=</option>. On a running system, <filename>machine-id</filename> is written by the |
| 187 |
manager with help from |
| 188 |
<citerefentry><refentrytitle>systemd-machine-id-commit.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. |
| 189 |
</para> |
| 190 |
|
| 191 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 192 |
</varlistentry> |
| 193 |
|
| 194 |
<varlistentry> |
| 195 |
<term><option>--machine-id=<replaceable>ID</replaceable></option></term> |
| 196 |
|
| 197 |
<listitem><para>Set the system's machine ID to the specified value. The same restrictions apply |
| 198 |
as to <option>--setup-machine-id</option>.</para> |
| 199 |
|
| 200 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 201 |
</varlistentry> |
| 202 |
|
| 203 |
<varlistentry> |
| 204 |
<term><option>--machine-tags=<replaceable>TAG</replaceable><optional>:<replaceable>TAG</replaceable>…</optional></option></term> |
| 205 |
|
| 206 |
<listitem><para>Set the machine tags to the specified colon-separated list. Machine tags are short |
| 207 |
labels that may be used to classify and group machines for management purposes, for example to |
| 208 |
identify the role a machine plays in a deployment, the fleet or organizational unit it belongs to, or |
| 209 |
any other administrator-defined attribute. Each individual tag must be 1…255 characters long and |
| 210 |
consist only of ASCII alphanumeric characters, <literal>-</literal> and <literal>.</literal>. This |
| 211 |
controls the <varname>TAGS=</varname> field of |
| 212 |
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>. The |
| 213 |
tags may later be queried and changed with the <command>tags</command> command of |
| 214 |
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, and |
| 215 |
matched against with the <varname>ConditionMachineTag=</varname>/<varname>AssertMachineTag=</varname> |
| 216 |
unit settings, see |
| 217 |
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> |
| 218 |
|
| 219 |
<para>Unlike most other settings, machine tags are not prompted for interactively.</para> |
| 220 |
|
| 221 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 222 |
</varlistentry> |
| 223 |
|
| 224 |
<varlistentry> |
| 225 |
<term><option>--root-password=<replaceable>PASSWORD</replaceable></option></term> |
| 226 |
<term><option>--root-password-file=<replaceable>PATH</replaceable></option></term> |
| 227 |
<term><option>--root-password-hashed=<replaceable>HASHED_PASSWORD</replaceable></option></term> |
| 228 |
|
| 229 |
<listitem><para>Sets the password of the system's root user. This creates/modifies the |
| 230 |
<citerefentry project='die-net'><refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum></citerefentry> and |
| 231 |
<citerefentry project='die-net'><refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 232 |
files. This setting exists in three forms: <option>--root-password=</option> accepts the password to |
| 233 |
set directly on the command line, <option>--root-password-file=</option> reads it from a file and |
| 234 |
<option>--root-password-hashed=</option> accepts an already hashed password on the command line. See |
| 235 |
<citerefentry project='die-net'><refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 236 |
for more information on the format of the hashed password. Note that it is not recommended to specify |
| 237 |
plaintext passwords on the command line, as other users might be able to see them simply by invoking |
| 238 |
<citerefentry project='die-net'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>. |
| 239 |
</para> |
| 240 |
|
| 241 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 242 |
</varlistentry> |
| 243 |
|
| 244 |
<varlistentry> |
| 245 |
<term><option>--root-shell=<replaceable>SHELL</replaceable></option></term> |
| 246 |
|
| 247 |
<listitem><para>Sets the shell of the system's root user. This creates/modifies the |
| 248 |
<citerefentry project='die-net'><refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 249 |
file.</para> |
| 250 |
|
| 251 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 252 |
</varlistentry> |
| 253 |
|
| 254 |
<varlistentry> |
| 255 |
<term><option>--kernel-command-line=<replaceable>CMDLINE</replaceable></option></term> |
| 256 |
|
| 257 |
<listitem><para>Sets the system's kernel command line. This controls the |
| 258 |
<filename>/etc/kernel/cmdline</filename> file which is used by |
| 259 |
<citerefentry><refentrytitle>kernel-install</refentrytitle><manvolnum>8</manvolnum></citerefentry>. |
| 260 |
</para> |
| 261 |
|
| 262 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 263 |
</varlistentry> |
| 264 |
|
| 265 |
<varlistentry> |
| 266 |
<term><option>--prompt-locale</option></term> |
| 267 |
<term><option>--prompt-keymap</option></term> |
| 268 |
<term><option>--prompt-timezone</option></term> |
| 269 |
<term><option>--prompt-hostname</option></term> |
| 270 |
<term><option>--prompt-root-password</option></term> |
| 271 |
<term><option>--prompt-root-shell</option></term> |
| 272 |
|
| 273 |
<listitem><para>Prompt the user interactively for a specific |
| 274 |
basic setting. Note that any explicit configuration settings |
| 275 |
specified on the command line take precedence, and the user is |
| 276 |
not prompted for it.</para> |
| 277 |
|
| 278 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 279 |
</varlistentry> |
| 280 |
|
| 281 |
<varlistentry> |
| 282 |
<term><option>--prompt</option></term> |
| 283 |
|
| 284 |
<listitem><para>Query the user for locale, keymap, timezone, hostname, |
| 285 |
root's password, and root's shell. This is equivalent to specifying |
| 286 |
<option>--prompt-locale</option>, |
| 287 |
<option>--prompt-keymap</option>, |
| 288 |
<option>--prompt-timezone</option>, |
| 289 |
<option>--prompt-hostname</option>, |
| 290 |
<option>--prompt-root-password</option>, |
| 291 |
<option>--prompt-root-shell</option> in combination.</para> |
| 292 |
|
| 293 |
<xi:include href="version-info.xml" xpointer="v216"/> |
| 294 |
</listitem> |
| 295 |
</varlistentry> |
| 296 |
|
| 297 |
<varlistentry> |
| 298 |
<term><option>--prompt-keymap-auto</option></term> |
| 299 |
|
| 300 |
<listitem><para>If invoked from a virtual terminal TTY equivalent to |
| 301 |
<option>--prompt-keymap</option>, otherwise has no effect. Or in other words, only prompts |
| 302 |
interactively for a keymap if a local keyboard is used for interactivity that requires it.</para> |
| 303 |
|
| 304 |
<xi:include href="version-info.xml" xpointer="v259"/> |
| 305 |
</listitem> |
| 306 |
</varlistentry> |
| 307 |
|
| 308 |
<varlistentry> |
| 309 |
<term><option>--copy-locale</option></term> |
| 310 |
<term><option>--copy-keymap</option></term> |
| 311 |
<term><option>--copy-timezone</option></term> |
| 312 |
<term><option>--copy-root-password</option></term> |
| 313 |
<term><option>--copy-root-shell</option></term> |
| 314 |
|
| 315 |
<listitem><para>Copy a specific basic setting from the host. |
| 316 |
This only works in combination with <option>--root=</option> or <option>--image=</option>. |
| 317 |
</para> |
| 318 |
|
| 319 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 320 |
</varlistentry> |
| 321 |
|
| 322 |
<varlistentry> |
| 323 |
<term><option>--copy</option></term> |
| 324 |
|
| 325 |
<listitem><para>Copy locale, keymap, time zone, root password and shell from the host. This is |
| 326 |
equivalent to specifying |
| 327 |
<option>--copy-locale</option>, |
| 328 |
<option>--copy-keymap</option>, |
| 329 |
<option>--copy-timezone</option>, |
| 330 |
<option>--copy-root-password</option>, |
| 331 |
<option>--copy-root-shell</option> in combination.</para> |
| 332 |
|
| 333 |
<xi:include href="version-info.xml" xpointer="v216"/> |
| 334 |
</listitem> |
| 335 |
</varlistentry> |
| 336 |
|
| 337 |
<varlistentry> |
| 338 |
<term><option>--force</option></term> |
| 339 |
|
| 340 |
<listitem><para>Write configuration even if the relevant files already exist. Without this option, |
| 341 |
<command>systemd-firstboot</command> does not modify or replace existing files. Note that when |
| 342 |
configuring the root account, even with this option, <command>systemd-firstboot</command> only |
| 343 |
modifies the entry of the <literal>root</literal> user, leaving other entries in |
| 344 |
<filename>/etc/passwd</filename> and <filename>/etc/shadow</filename> intact.</para> |
| 345 |
|
| 346 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 347 |
</varlistentry> |
| 348 |
|
| 349 |
<varlistentry> |
| 350 |
<term><option>--reset</option></term> |
| 351 |
|
| 352 |
<listitem><para>If specified, all existing files that are configured by |
| 353 |
<command>systemd-firstboot</command> are removed. Note that the files are removed regardless of |
| 354 |
whether they'll be configured with a new value or not. This operation ensures that the next boot of |
| 355 |
the image will be considered a first boot, and <command>systemd-firstboot</command> will prompt again |
| 356 |
to configure each of the removed files.</para> |
| 357 |
|
| 358 |
<xi:include href="version-info.xml" xpointer="v254"/></listitem> |
| 359 |
</varlistentry> |
| 360 |
|
| 361 |
<varlistentry> |
| 362 |
<term><option>--delete-root-password</option></term> |
| 363 |
|
| 364 |
<listitem><para>Removes the password of the system's root user, enabling login as root without a |
| 365 |
password unless the root account is locked. Note that this is extremely insecure and hence this |
| 366 |
option should not be used lightly.</para> |
| 367 |
|
| 368 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 369 |
</varlistentry> |
| 370 |
|
| 371 |
<varlistentry> |
| 372 |
<term><option>--welcome=</option></term> |
| 373 |
|
| 374 |
<listitem><para>Takes a boolean argument. By default, when prompting the user for configuration |
| 375 |
options a brief welcome text is shown before the first question is asked. Pass false to this option |
| 376 |
to turn off the welcome text.</para> |
| 377 |
|
| 378 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 379 |
</varlistentry> |
| 380 |
|
| 381 |
<varlistentry> |
| 382 |
<term><option>--chrome=</option></term> |
| 383 |
|
| 384 |
<listitem><para>Takes a boolean argument. By default the initial setup screen will show reverse color |
| 385 |
"chrome" bars at the top and and the bottom of the terminal screen, which may be disabled by setting |
| 386 |
this option to false.</para> |
| 387 |
|
| 388 |
<xi:include href="version-info.xml" xpointer="v259"/></listitem> |
| 389 |
</varlistentry> |
| 390 |
|
| 391 |
<varlistentry> |
| 392 |
<term><option>--mute-console=</option></term> |
| 393 |
|
| 394 |
<listitem><para>Takes a boolean argument. If true kernel log output and service manager status output |
| 395 |
to the system console is temporarily disabled while <command>systemd-firstboot</command> is running, |
| 396 |
so that its own output is not interrupted. Defaults to false.</para> |
| 397 |
|
| 398 |
<xi:include href="version-info.xml" xpointer="v259"/></listitem> |
| 399 |
</varlistentry> |
| 400 |
|
| 401 |
<xi:include href="standard-options.xml" xpointer="help" /> |
| 402 |
<xi:include href="standard-options.xml" xpointer="version" /> |
| 403 |
</variablelist> |
| 404 |
</refsect1> |
| 405 |
|
| 406 |
<refsect1> |
| 407 |
<title>Credentials</title> |
| 408 |
|
| 409 |
<para><command>systemd-firstboot</command> supports the service credentials logic as implemented by |
| 410 |
<varname>ImportCredential=</varname>/<varname>LoadCredential=</varname>/<varname>SetCredential=</varname> |
| 411 |
(see <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> for |
| 412 |
details). The following credentials are used when passed in:</para> |
| 413 |
|
| 414 |
<variablelist class='system-credentials'> |
| 415 |
<varlistentry> |
| 416 |
<term><varname>passwd.hashed-password.root</varname></term> |
| 417 |
<term><varname>passwd.plaintext-password.root</varname></term> |
| 418 |
|
| 419 |
<listitem><para>A hashed or plaintext version of the root password to use, in place of prompting the |
| 420 |
user. These credentials are equivalent to the same ones defined for the |
| 421 |
<citerefentry><refentrytitle>systemd-sysusers.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 422 |
service.</para> |
| 423 |
|
| 424 |
<xi:include href="version-info.xml" xpointer="v249"/></listitem> |
| 425 |
</varlistentry> |
| 426 |
|
| 427 |
<varlistentry> |
| 428 |
<term><varname>passwd.shell.root</varname></term> |
| 429 |
|
| 430 |
<listitem><para>Specifies the shell binary to use for the specified account. |
| 431 |
Equivalent to the credential of the same name defined for the |
| 432 |
<citerefentry><refentrytitle>systemd-sysusers.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 433 |
service.</para> |
| 434 |
|
| 435 |
<xi:include href="version-info.xml" xpointer="v249"/></listitem> |
| 436 |
</varlistentry> |
| 437 |
|
| 438 |
<varlistentry> |
| 439 |
<term><varname>firstboot.locale</varname></term> |
| 440 |
<term><varname>firstboot.locale-messages</varname></term> |
| 441 |
|
| 442 |
<listitem><para>These credentials specify the locale settings to set during first boot, in place of |
| 443 |
prompting the user.</para> |
| 444 |
|
| 445 |
<xi:include href="version-info.xml" xpointer="v249"/></listitem> |
| 446 |
</varlistentry> |
| 447 |
|
| 448 |
<varlistentry> |
| 449 |
<term><varname>firstboot.keymap</varname></term> |
| 450 |
|
| 451 |
<listitem><para>This credential specifies the keyboard setting to set during first boot, in place of |
| 452 |
prompting the user.</para> |
| 453 |
|
| 454 |
<para>Note the relationship to the <varname>vconsole.keymap</varname> credential understood by |
| 455 |
<citerefentry><refentrytitle>systemd-vconsole-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>: |
| 456 |
both ultimately affect the same setting, but <varname>firstboot.keymap</varname> is written into |
| 457 |
<filename>/etc/vconsole.conf</filename> on first boot (if not already configured), and then read from |
| 458 |
there by <command>systemd-vconsole-setup</command>, while <varname>vconsole.keymap</varname> is read |
| 459 |
on every boot, and is not persisted to disk (but any configuration in |
| 460 |
<filename>vconsole.conf</filename> will take precedence if present).</para> |
| 461 |
|
| 462 |
<xi:include href="version-info.xml" xpointer="v249"/></listitem> |
| 463 |
</varlistentry> |
| 464 |
|
| 465 |
<varlistentry> |
| 466 |
<term><varname>firstboot.timezone</varname></term> |
| 467 |
|
| 468 |
<listitem><para>This credential specifies the system timezone setting to set during first boot, in |
| 469 |
place of prompting the user.</para> |
| 470 |
|
| 471 |
<xi:include href="version-info.xml" xpointer="v249"/></listitem> |
| 472 |
</varlistentry> |
| 473 |
|
| 474 |
<varlistentry> |
| 475 |
<term><varname>firstboot.hostname</varname></term> |
| 476 |
|
| 477 |
<listitem><para>This credential specifies the static system hostname to set during first boot. The |
| 478 |
user will not be prompted for the hostname. Note that this controls the static hostname, not the |
| 479 |
transient hostname, and only has an effect on first boot, unlike |
| 480 |
<varname>system.hostname</varname>.</para> |
| 481 |
|
| 482 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 483 |
</varlistentry> |
| 484 |
|
| 485 |
<varlistentry> |
| 486 |
<term><varname>firstboot.machine-tags</varname></term> |
| 487 |
|
| 488 |
<listitem><para>This credential specifies the machine tags to set during first boot, as a |
| 489 |
colon-separated list, equivalent to the <option>--machine-tags=</option> switch described above. The |
| 490 |
tags are written into the <varname>TAGS=</varname> field of <filename>/etc/machine-info</filename> |
| 491 |
(if that file is not already present), and only have an effect on first boot. If the list contains |
| 492 |
invalid tags it is ignored in its entirety.</para> |
| 493 |
|
| 494 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 495 |
</varlistentry> |
| 496 |
</variablelist> |
| 497 |
|
| 498 |
<para>Note that by default the <filename>systemd-firstboot.service</filename> unit file is set up to |
| 499 |
inherit the listed credentials |
| 500 |
from the service manager. Thus, when invoking a container with an unpopulated <filename>/etc/</filename> |
| 501 |
for the first time it is possible to configure the root user's password to be <literal>systemd</literal> |
| 502 |
like this:</para> |
| 503 |
|
| 504 |
<para><programlisting># systemd-nspawn --image=… --set-credential=firstboot.locale:de_DE.UTF-8 …</programlisting></para> |
| 505 |
|
| 506 |
<para>Note that these credentials are only read and applied during the first boot. Once they are applied |
| 507 |
they remain applied for subsequent boots, and the credentials are not considered anymore.</para> |
| 508 |
</refsect1> |
| 509 |
|
| 510 |
<refsect1> |
| 511 |
<title>Exit status</title> |
| 512 |
|
| 513 |
<para>On success, 0 is returned, a non-zero failure code |
| 514 |
otherwise.</para> |
| 515 |
</refsect1> |
| 516 |
|
| 517 |
<refsect1> |
| 518 |
<title>Kernel Command Line</title> |
| 519 |
|
| 520 |
<variablelist class='kernel-commandline-options'> |
| 521 |
<varlistentry> |
| 522 |
<term><varname>systemd.firstboot=</varname></term> |
| 523 |
|
| 524 |
<listitem><para>Takes a boolean argument, defaults to on. If off, <filename>systemd-firstboot.service</filename> |
| 525 |
will not interactively query the user for basic settings at first boot, even if those settings are not |
| 526 |
initialized yet.</para> |
| 527 |
|
| 528 |
<xi:include href="version-info.xml" xpointer="v233"/></listitem> |
| 529 |
</varlistentry> |
| 530 |
</variablelist> |
| 531 |
</refsect1> |
| 532 |
|
| 533 |
<refsect1> |
| 534 |
<title>See Also</title> |
| 535 |
<para><simplelist type="inline"> |
| 536 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 537 |
<member><citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 538 |
<member><citerefentry project='man-pages'><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 539 |
<member><citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 540 |
<member><citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 541 |
<member><citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 542 |
<member><citerefentry project='die-net'><refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 543 |
<member><citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 544 |
<member><citerefentry project='man-pages'><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 545 |
<member><citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 546 |
<member><citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 547 |
</simplelist></para> |
| 548 |
</refsect1> |
| 549 |
|
| 550 |
</refentry> |