2014-07-07 20:45:53 +04:00
<?xml version='1.0'?> <!-- * - nxml - * -->
< !DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2015-06-18 20:47:44 +03:00
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
2014-07-07 20:45:53 +04:00
<!--
2017-11-18 19:22:32 +03:00
SPDX-License-Identifier: LGPL-2.1+
2014-07-07 20:45:53 +04:00
This file is part of systemd.
Copyright 2014 Lennart Poettering
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http: / / w w w . g n u . o r g / l i c e n s e s /> .
-->
2015-02-04 23:31:26 +03:00
<refentry id= "systemd-firstboot" conditional= 'ENABLE_FIRSTBOOT'
2015-02-04 05:14:13 +03:00
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo >
<title > systemd-firstboot</title>
<productname > systemd</productname>
<authorgroup >
<author >
<contrib > Developer</contrib>
<firstname > Lennart</firstname>
<surname > Poettering</surname>
<email > lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta >
<refentrytitle > systemd-firstboot</refentrytitle>
<manvolnum > 1</manvolnum>
</refmeta>
<refnamediv >
<refname > systemd-firstboot</refname>
<refname > systemd-firstboot.service</refname>
<refpurpose > Initialize basic system settings on or before the first boot-up of a system</refpurpose>
</refnamediv>
<refsynopsisdiv >
<cmdsynopsis >
<command > systemd-firstboot</command>
<arg choice= "opt" rep= "repeat" > OPTIONS</arg>
</cmdsynopsis>
<para > <filename > systemd-firstboot.service</filename> </para>
</refsynopsisdiv>
<refsect1 >
<title > Description</title>
<para > <command > systemd-firstboot</command> initializes the most
basic system settings interactively on the first boot, or
2017-01-31 10:25:19 +03:00
optionally non-interactively when a system image is created.
The service is started if <varname > ConditionFirstBoot=yes</varname>
is satisfied. This essentially means that <filename > /etc</filename>
is empty, see
<citerefentry > <refentrytitle > systemd.unit</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
for details.</para>
<para > The following settings may be set up:</para>
2015-02-04 05:14:13 +03:00
<itemizedlist >
<listitem > <para > The system locale, more specifically the two
locale variables <varname > LANG=</varname> and
<varname > LC_MESSAGES</varname> </para> </listitem>
2017-11-10 12:31:44 +03:00
<listitem > <para > The system keyboard map</para> </listitem>
2015-02-04 05:14:13 +03:00
<listitem > <para > The system time zone</para> </listitem>
<listitem > <para > The system host name</para> </listitem>
<listitem > <para > The machine ID of the system</para> </listitem>
<listitem > <para > The root user's password</para> </listitem>
</itemizedlist>
2014-08-03 09:11:37 +04:00
<para > Each of the fields may either be queried interactively by
users, set non-interactively on the tool's command line, or be
2015-02-04 05:14:13 +03:00
copied from a host system that is used to set up the system
image.</para>
2014-08-03 09:11:12 +04:00
<para > If a setting is already initialized, it will not be
2015-02-04 05:14:13 +03:00
overwritten and the user will not be prompted for the
setting.</para>
<para > Note that this tool operates directly on the file system and
does not involve any running system services, unlike
2015-03-14 05:22:39 +03:00
<citerefentry project= 'man-pages' > <refentrytitle > localectl</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> ,
2015-02-04 05:14:13 +03:00
<citerefentry > <refentrytitle > timedatectl</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry>
or
<citerefentry > <refentrytitle > hostnamectl</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> .
This allows <command > systemd-firstboot</command> to operate on
mounted but not booted disk images and in early boot. It is not
recommended to use <command > systemd-firstboot</command> on the
running system while it is up.</para>
</refsect1>
<refsect1 >
<title > Options</title>
<para > The following options are understood:</para>
<variablelist >
<varlistentry >
<term > <option > --root=<replaceable > root</replaceable> </option> </term>
<listitem > <para > Takes a directory path as an argument. All
paths will be prefixed with the given alternate
<replaceable > root</replaceable> 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.
</para> </listitem>
</varlistentry>
<varlistentry >
<term > <option > --locale=<replaceable > LOCALE</replaceable> </option> </term>
<term > <option > --locale-messages=<replaceable > LOCALE</replaceable> </option> </term>
<listitem > <para > Sets the system locale, more specifically the
<varname > LANG=</varname> and <varname > LC_MESSAGES</varname>
settings. The argument should be a valid locale identifier,
such as <literal > de_DE.UTF-8</literal> . This controls the
2015-03-14 05:22:39 +03:00
<citerefentry project= 'man-pages' > <refentrytitle > locale.conf</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
2015-02-04 05:14:13 +03:00
configuration file.</para> </listitem>
</varlistentry>
2017-11-10 12:31:44 +03:00
<varlistentry >
<term > <option > --keymap=<replaceable > KEYMAP</replaceable> </option> </term>
<listitem > <para > Sets the system keyboard layout. The argument should be a valid keyboard map,
such as <literal > de-latin1</literal> . This controls the <literal > KEYMAP</literal> entry in the
<citerefentry project= 'man-pages' > <refentrytitle > vconsole.conf</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
configuration file.</para> </listitem>
</varlistentry>
2015-02-04 05:14:13 +03:00
<varlistentry >
<term > <option > --timezone=<replaceable > TIMEZONE</replaceable> </option> </term>
<listitem > <para > Sets the system time zone. The argument should
be a valid time zone identifier, such as
<literal > Europe/Berlin</literal> . This controls the
<citerefentry > <refentrytitle > localtime</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
symlink.</para> </listitem>
</varlistentry>
<varlistentry >
<term > <option > --hostname=<replaceable > HOSTNAME</replaceable> </option> </term>
<listitem > <para > Sets the system hostname. The argument should
be a host name, compatible with DNS. This controls the
<citerefentry > <refentrytitle > hostname</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
configuration file.</para> </listitem>
</varlistentry>
<varlistentry >
<term > <option > --machine-id=<replaceable > ID</replaceable> </option> </term>
<listitem > <para > Sets the system's machine ID. This controls
the
<citerefentry > <refentrytitle > machine-id</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
file.</para> </listitem>
</varlistentry>
<varlistentry >
<term > <option > --root-password=<replaceable > PASSWORD</replaceable> </option> </term>
<term > <option > --root-password-file=<replaceable > PATH</replaceable> </option> </term>
<listitem > <para > Sets the password of the system's root user.
This creates a
2015-03-14 05:22:39 +03:00
<citerefentry project= 'die-net' > <refentrytitle > shadow</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
2015-02-04 05:14:13 +03:00
file. This setting exists in two forms:
<option > --root-password=</option> accepts the password to set
2014-08-03 09:11:37 +04:00
directly on the command line, and
2015-02-04 05:14:13 +03:00
<option > --root-password-file=</option> reads it from a file.
2014-08-03 09:11:37 +04:00
Note that it is not recommended to specify passwords on the
2014-08-03 09:11:12 +04:00
command line, as other users might be able to see them simply
2015-02-04 05:14:13 +03:00
by invoking
2015-03-14 05:22:39 +03:00
<citerefentry project= 'die-net' > <refentrytitle > ps</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> .</para> </listitem>
2015-02-04 05:14:13 +03:00
</varlistentry>
<varlistentry >
<term > <option > --prompt-locale</option> </term>
2017-11-10 12:31:44 +03:00
<term > <option > --prompt-keymap</option> </term>
2015-02-04 05:14:13 +03:00
<term > <option > --prompt-timezone</option> </term>
<term > <option > --prompt-hostname</option> </term>
<term > <option > --prompt-root-password</option> </term>
<listitem > <para > 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.</para> </listitem>
</varlistentry>
<varlistentry >
<term > <option > --prompt</option> </term>
2017-11-10 12:31:44 +03:00
<listitem > <para > Query the user for locale, keymap, timezone, hostname
2015-02-04 05:14:13 +03:00
and root password. This is equivalent to specifying
<option > --prompt-locale</option> ,
2017-11-10 12:31:44 +03:00
<option > --prompt-keymap</option> ,
2015-02-04 05:14:13 +03:00
<option > --prompt-timezone</option> ,
<option > --prompt-hostname</option> ,
<option > --prompt-root-password</option> in combination.</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <option > --copy-locale</option> </term>
2017-11-10 12:31:44 +03:00
<term > <option > --copy-keymap</option> </term>
2015-02-04 05:14:13 +03:00
<term > <option > --copy-timezone</option> </term>
<term > <option > --copy-root-password</option> </term>
<listitem > <para > Copy a specific basic setting from the host.
This only works in combination with <option > --root=</option>
(see above).</para> </listitem>
</varlistentry>
<varlistentry >
<term > <option > --copy</option> </term>
2017-11-10 12:31:44 +03:00
<listitem > <para > Copy locale, keymap, time zone and root password from
2015-02-04 05:14:13 +03:00
the host. This is equivalent to specifying
<option > --copy-locale</option> ,
2017-11-10 12:31:44 +03:00
<option > --copy-keymap</option> ,
2015-02-04 05:14:13 +03:00
<option > --copy-timezone</option> ,
<option > --copy-root-password</option> in combination.</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <option > --setup-machine-id</option> </term>
<listitem > <para > Initialize the system's machine ID to a random
ID. This only works in combination with
<option > --root=</option> .</para> </listitem>
</varlistentry>
<xi:include href= "standard-options.xml" xpointer= "help" />
<xi:include href= "standard-options.xml" xpointer= "version" />
</variablelist>
</refsect1>
<refsect1 >
<title > Exit status</title>
<para > On success, 0 is returned, a non-zero failure code
otherwise.</para>
</refsect1>
2016-12-09 03:11:42 +03:00
<refsect1 >
<title > Kernel Command Line</title>
<variablelist class= 'kernel-commandline-options' >
<varlistentry >
<term > <varname > systemd.firstboot=</varname> </term>
2017-01-15 03:48:04 +03:00
<listitem > <para > Takes a boolean argument, defaults to on. If off, <filename > systemd-firstboot.service</filename>
won't interactively query the user for basic settings at first boot, even if those settings are not
2016-12-09 03:11:42 +03:00
initialized yet.</para> </listitem>
</varlistentry>
</variablelist>
</refsect1>
2015-02-04 05:14:13 +03:00
<refsect1 >
<title > See Also</title>
<para >
<citerefentry > <refentrytitle > systemd</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> ,
2015-03-14 05:22:39 +03:00
<citerefentry project= 'man-pages' > <refentrytitle > locale.conf</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
2017-11-10 12:31:44 +03:00
<citerefentry project= 'man-pages' > <refentrytitle > vconsole.conf</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
2015-02-04 05:14:13 +03:00
<citerefentry > <refentrytitle > localtime</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
<citerefentry > <refentrytitle > hostname</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
<citerefentry > <refentrytitle > machine-id</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
2015-03-14 05:22:39 +03:00
<citerefentry project= 'die-net' > <refentrytitle > shadow</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
2015-02-04 05:14:13 +03:00
<citerefentry > <refentrytitle > systemd-machine-id-setup</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> ,
2015-03-14 05:22:39 +03:00
<citerefentry project= 'man-pages' > <refentrytitle > localectl</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> ,
2015-02-04 05:14:13 +03:00
<citerefentry > <refentrytitle > timedatectl</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> ,
<citerefentry > <refentrytitle > hostnamectl</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry>
</para>
</refsect1>
2014-07-07 20:45:53 +04:00
</refentry>