]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/loader.conf.xml
Merge pull request #20303 from andir/sysconfig-example
[thirdparty/systemd.git] / man / loader.conf.xml
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.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6 <refentry id="loader.conf" conditional='ENABLE_EFI'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8 <refentryinfo>
9 <title>loader.conf</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>loader.conf</refentrytitle>
15 <manvolnum>5</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>loader.conf</refname>
20 <refpurpose>Configuration file for systemd-boot</refpurpose>
21 </refnamediv>
22
23 <refsynopsisdiv>
24 <para><filename><replaceable>ESP</replaceable>/loader/loader.conf</filename>,
25 <filename><replaceable>ESP</replaceable>/loader/entries/*.conf</filename>
26 </para>
27 </refsynopsisdiv>
28
29 <refsect1>
30 <title>Description</title>
31
32 <para>
33 <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>
34 will read <filename><replaceable>ESP</replaceable>/loader/loader.conf</filename> and any files with the
35 <literal>.conf</literal> extension under
36 <filename><replaceable>ESP</replaceable>/loader/entries/</filename> on the EFI system partition (ESP).
37 </para>
38
39 <para>Each configuration file must consist of an option name, followed by
40 whitespace, and the option value. <literal>#</literal> may be used to start
41 a comment line. Empty and comment lines are ignored.</para>
42
43 <para>Boolean arguments may be written as
44 <literal>yes</literal>/<literal>y</literal>/<literal>true</literal>/<literal>t</literal>/<literal>on</literal>/<literal>1</literal> or
45 <literal>no</literal>/<literal>n</literal>/<literal>false</literal>/<literal>f</literal>/<literal>off</literal>/<literal>0</literal>.
46 </para>
47 </refsect1>
48
49 <refsect1>
50 <title>Options</title>
51
52 <para>The following configuration options in <filename>loader.conf</filename> are understood:</para>
53
54 <variablelist>
55 <varlistentry>
56 <term>default</term>
57
58 <listitem><para>A glob pattern to select the default entry. The default entry
59 may be changed in the boot menu itself, in which case the name of the
60 selected entry will be stored as an EFI variable, overriding this option.
61 </para>
62
63 <table>
64 <title>Automatically detected entries will use the following names:</title>
65
66 <tgroup cols='2'>
67 <colspec colname='name' />
68 <colspec colname='expl' />
69 <thead>
70 <row>
71 <entry>Name</entry>
72 <entry>Description</entry>
73 </row>
74 </thead>
75 <tbody>
76 <row>
77 <entry>auto-efi-default</entry>
78 <entry>EFI Default Loader</entry>
79 </row>
80 <row>
81 <entry>auto-efi-shell</entry>
82 <entry>EFI Shell</entry>
83 </row>
84 <row>
85 <entry>auto-osx</entry>
86 <entry>macOS</entry>
87 </row>
88 <row>
89 <entry>auto-reboot-to-firmware-setup</entry>
90 <entry>Reboot Into Firmware Interface</entry>
91 </row>
92 <row>
93 <entry>auto-windows</entry>
94 <entry>Windows Boot Manager</entry>
95 </row>
96 </tbody>
97 </tgroup>
98 </table></listitem>
99 </varlistentry>
100
101 <varlistentry>
102 <term>timeout</term>
103
104 <listitem><para>How long the boot menu should be shown before the default
105 entry is booted, in seconds. This may be changed in the boot menu itself and
106 will be stored as an EFI variable in that case, overriding this option.
107 </para>
108
109 <para>If the timeout is disabled, the default entry will be booted
110 immediately. The menu can be shown by pressing and holding a key before
111 systemd-boot is launched.</para>
112 </listitem>
113 </varlistentry>
114
115 <varlistentry>
116 <term>console-mode</term>
117
118 <listitem><para>This option configures the resolution of the console. Takes a
119 number or one of the special values listed below. The following values may be
120 used:</para>
121
122 <variablelist>
123 <varlistentry>
124 <term>0</term>
125 <listitem>
126 <para>Standard UEFI 80x25 mode</para>
127 </listitem>
128 </varlistentry>
129
130 <varlistentry>
131 <term>1</term>
132 <listitem>
133 <para>80x50 mode, not supported by all devices</para>
134 </listitem>
135 </varlistentry>
136
137 <varlistentry>
138 <term>2</term>
139 <listitem>
140 <para>the first non-standard mode provided by the device
141 firmware, if any</para>
142 </listitem>
143 </varlistentry>
144
145 <varlistentry>
146 <term>auto</term>
147 <listitem>
148 <para>Pick a suitable mode automatically using heuristics</para>
149 </listitem>
150 </varlistentry>
151
152 <varlistentry>
153 <term>max</term>
154 <listitem>
155 <para>Pick the highest-numbered available mode</para>
156 </listitem>
157 </varlistentry>
158
159 <varlistentry>
160 <term>keep</term>
161 <listitem>
162 <para>Keep the mode selected by firmware (the default)</para>
163 </listitem>
164 </varlistentry>
165 </variablelist>
166
167 </listitem>
168 </varlistentry>
169
170 <varlistentry>
171 <term>editor</term>
172
173 <listitem><para>Takes a boolean argument. Enable (the default) or disable the
174 editor. The editor should be disabled if the machine can be accessed by
175 unauthorized persons.</para></listitem>
176 </varlistentry>
177
178 <varlistentry>
179 <term>auto-entries</term>
180
181 <listitem><para>Takes a boolean argument. Enable (the default) or disable
182 entries for other boot entries found on the boot partition. In particular,
183 this may be useful when loader entries are created to show replacement
184 descriptions for those entries.</para></listitem>
185 </varlistentry>
186
187 <varlistentry>
188 <term>auto-firmware</term>
189
190 <listitem><para>Takes a boolean argument. Enable (the default) or disable
191 the "Reboot into firmware" entry.</para></listitem>
192 </varlistentry>
193
194 <varlistentry>
195 <term>random-seed-mode</term>
196
197 <listitem><para>Takes one of <literal>off</literal>, <literal>with-system-token</literal> and
198 <literal>always</literal>. If <literal>off</literal> no random seed data is read off the ESP, nor
199 passed to the OS. If <literal>with-system-token</literal> (the default)
200 <command>systemd-boot</command> will read a random seed from the ESP (from the file
201 <filename>/loader/random-seed</filename>) only if the <varname>LoaderSystemToken</varname> EFI
202 variable is set, and then derive the random seed to pass to the OS from the combination. If
203 <literal>always</literal> the boot loader will do so even if <varname>LoaderSystemToken</varname> is
204 not set. This mode is useful in environments where protection against OS image reuse is not a
205 concern, and the random seed shall be used even with no further setup in place. Use <command>bootctl
206 random-seed</command> to initialize both the random seed file in the ESP and the system token EFI
207 variable.</para>
208
209 <para>See <ulink url="https://systemd.io/RANDOM_SEEDS">Random Seeds</ulink> for further
210 information.</para></listitem>
211 </varlistentry>
212 </variablelist>
213 </refsect1>
214
215 <refsect1>
216 <title>Example</title>
217
218 <programlisting># /boot/efi/loader/loader.conf
219 timeout 0
220 default 01234567890abcdef1234567890abdf0-*
221 editor no
222 </programlisting>
223
224 <para>The menu will not be shown by default (the menu can still be shown by
225 pressing and holding a key during boot). One of the entries with files with a
226 name starting with <literal>01234567890abcdef1234567890abdf0-</literal> will be
227 selected by default. If more than one entry matches, the one with the highest
228 priority will be selected (generally the one with the highest version number).
229 The editor will be disabled, so it is not possible to alter the kernel command
230 line.</para>
231 </refsect1>
232
233 <refsect1>
234 <title>See Also</title>
235 <para>
236 <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
237 <citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
238 </para>
239 </refsect1>
240 </refentry>