]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/kernel-install.xml
man: update version information
[thirdparty/systemd.git] / man / kernel-install.xml
1 <?xml version='1.0'?>
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="kernel-install" conditional='ENABLE_KERNEL_INSTALL'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>kernel-install</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>kernel-install</refentrytitle>
16 <manvolnum>8</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>kernel-install</refname>
21 <refpurpose>Add and remove kernel and initrd images to and from /boot</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <cmdsynopsis>
26 <command>kernel-install</command>
27 <arg choice="opt" rep="repeat">OPTIONS</arg>
28 <arg choice="plain">add</arg>
29 <arg choice="plain"><replaceable>KERNEL-VERSION</replaceable></arg>
30 <arg choice="plain"><replaceable>KERNEL-IMAGE</replaceable></arg>
31 <arg choice="opt" rep="repeat"><replaceable>INITRD-FILE</replaceable></arg>
32 </cmdsynopsis>
33 <cmdsynopsis>
34 <command>kernel-install</command>
35 <arg choice="opt" rep="repeat">OPTIONS</arg>
36 <arg choice="plain">remove</arg>
37 <arg choice="plain"><replaceable>KERNEL-VERSION</replaceable></arg>
38 </cmdsynopsis>
39 <cmdsynopsis>
40 <command>kernel-install</command>
41 <arg choice="opt" rep="repeat">OPTIONS</arg>
42 <arg choice="plain">inspect</arg>
43 <arg choice="opt"><replaceable>KERNEL-IMAGE</replaceable></arg>
44 </cmdsynopsis>
45 </refsynopsisdiv>
46
47 <refsect1>
48 <title>Description</title>
49 <para><command>kernel-install</command> is used to install and remove kernel and initrd images
50 <footnote>
51 <para>Nowadays actually CPIO archives used as an "initramfs", rather than "initrd". See
52 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry> for an
53 explanation.</para>
54 </footnote>
55 to and from the boot loader partition, referred to as <varname>$BOOT</varname> here. It will usually be
56 one of <filename>/boot/</filename>, <filename>/efi/</filename>, or <filename>/boot/efi/</filename>, see
57 below.</para>
58
59 <para><command>kernel-install</command> will run the executable files ("plugins") located in the
60 directory <filename>/usr/lib/kernel/install.d/</filename> and the local administration directory
61 <filename>/etc/kernel/install.d/</filename>. All files are collectively sorted and executed in lexical
62 order, regardless of the directory in which they live. However, files with identical filenames replace
63 each other. Files in <filename>/etc/kernel/install.d/</filename> take precedence over files with the
64 same name in <filename>/usr/lib/kernel/install.d/</filename>. This can be used to override a
65 system-supplied executables with a local file if needed; a symbolic link in
66 <filename>/etc/kernel/install.d/</filename> with the same name as an executable in
67 <filename>/usr/lib/kernel/install.d/</filename>, pointing to <filename>/dev/null</filename>, disables the
68 executable entirely. Executables must have the extension <literal>.install</literal>; other extensions
69 are ignored.</para>
70
71 <para>An executable placed in these directories should return <constant>0</constant> on success. It may
72 also return <constant>77</constant> to cause the whole operation to terminate (executables later in
73 lexical order will be skipped).</para>
74 </refsect1>
75
76 <refsect1>
77 <title>Commands</title>
78 <para>The following commands are understood:</para>
79 <variablelist>
80 <varlistentry>
81 <term>
82 <command>add</command>
83 <replaceable>KERNEL-VERSION</replaceable>
84 <replaceable>KERNEL-IMAGE</replaceable> [<replaceable>INITRD-FILE</replaceable> ...]
85 </term>
86
87 <listitem>
88 <para>This command expects a kernel version string and a path to a kernel image file as arguments.
89 Optionally, one or more initrd images may be specified as well (note that plugins might generate
90 additional ones).</para>
91
92 <para>The executable files from <filename>/usr/lib/kernel/install.d/*.install</filename> and
93 <filename>/etc/kernel/install.d/*.install</filename> (i.e. the plugins) are called with the
94 following arguments:</para>
95
96 <programlisting>add <replaceable>KERNEL-VERSION</replaceable> <filename>$BOOT/<replaceable>ENTRY-TOKEN</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename> <replaceable>KERNEL-IMAGE</replaceable> \
97 [<replaceable>INITRD-FILE</replaceable> ...]</programlisting>
98
99 <para>The third argument directly refers to the path where to place kernel images, initrd
100 images and other resources for
101 <ulink url="https://uapi-group.org/specifications/specs/boot_loader_specification">Boot
102 Loader Specification</ulink> Type #1 entries (the "entry directory"). If other boot loader schemes
103 are used the parameter may be ignored.</para>
104
105 <para>The <replaceable>ENTRY-TOKEN</replaceable> string is typically the machine ID and is supposed
106 to identify the local installation on the system. For details see below.</para>
107
108 <para>Two default plugins execute the following operations in this case:</para>
109
110 <itemizedlist>
111 <listitem><para><command>kernel-install</command> creates
112 <filename>$BOOT/<replaceable>ENTRY-TOKEN</replaceable>/<replaceable>KERNEL-VERSION</replaceable></filename>,
113 if enabled (see <varname>$KERNEL_INSTALL_LAYOUT</varname>).</para></listitem>
114
115 <listitem><para><filename>50-depmod.install</filename> runs
116 <citerefentry project='man-pages'><refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum></citerefentry> for the
117 <replaceable>KERNEL-VERSION</replaceable>.</para></listitem>
118
119 <listitem><para><filename>90-loaderentry.install</filename> copies
120 <replaceable>KERNEL-IMAGE</replaceable> to
121 <filename>$BOOT/<replaceable>ENTRY-TOKEN</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/linux</filename>.
122 If <replaceable>INITRD-FILE</replaceable>s are provided, it also copies them to
123 <filename>$BOOT/<replaceable>ENTRY-TOKEN</replaceable>/<replaceable>KERNEL_VERSION</replaceable>/<replaceable>INITRD-FILE</replaceable></filename>.
124 This can also be used to prepend microcode before the actual initrd. It also creates a boot loader entry according to the <ulink
125 url="https://uapi-group.org/specifications/specs/boot_loader_specification">Boot Loader Specification</ulink> (Type #1) in
126 <filename>$BOOT/loader/entries/<replaceable>ENTRY-TOKEN</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.
127 The title of the entry is the <replaceable>PRETTY_NAME</replaceable> parameter specified in
128 <filename>/etc/os-release</filename> or <filename>/usr/lib/os-release</filename> (if the former
129 is missing), or "Linux <replaceable>KERNEL-VERSION</replaceable>", if unset.</para>
130
131 <para>If <varname>$KERNEL_INSTALL_LAYOUT</varname> is not "bls", this plugin does nothing.</para></listitem>
132
133 <listitem><para><filename>90-uki-copy.install</filename> copies a file
134 <filename>uki.efi</filename> from <varname>$KERNEL_INSTALL_STAGING_AREA</varname> or if it does
135 not exist the <replaceable>KERNEL-IMAGE</replaceable> argument, only if it has a
136 <literal>.efi</literal> extension, to
137 <filename>$BOOT/EFI/Linux/<replaceable>ENTRY-TOKEN</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.efi</filename>.</para>
138
139 <para>If <varname>$KERNEL_INSTALL_LAYOUT</varname> is not "uki", this plugin does nothing.</para></listitem>
140 </itemizedlist>
141
142 <xi:include href="version-info.xml" xpointer="v198"/>
143 </listitem>
144 </varlistentry>
145 <varlistentry>
146 <term><command>remove <replaceable>KERNEL-VERSION</replaceable></command></term>
147 <listitem>
148 <para>This command expects a kernel version string as single argument.</para>
149
150 <para>The executable files from <filename>/usr/lib/kernel/install.d/*.install</filename> and
151 <filename>/etc/kernel/install.d/*.install</filename> (i.e. the plugins) are called with the
152 following arguments:</para>
153
154 <programlisting>remove <replaceable>KERNEL-VERSION</replaceable> <filename>$BOOT/<replaceable>ENTRY-TOKEN</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename></programlisting>
155
156 <para>Afterwards, <command>kernel-install</command> removes the entry directory
157 <filename>$BOOT/<replaceable>ENTRY-TOKEN</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
158 and its contents, if it exists.</para>
159
160 <para>Two default plugins execute the following operations in this case:</para>
161
162 <itemizedlist>
163 <listitem><para><filename>50-depmod.install</filename> removes the files generated by
164 <command>depmod</command> for this kernel again.</para></listitem>
165
166 <listitem><para><filename>90-loaderentry.install</filename> removes the file
167 <filename>$BOOT/loader/entries/<replaceable>ENTRY-TOKEN</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.
168 </para></listitem>
169
170 <listitem><para><filename>90-uki-copy.install</filename> removes the file
171 <filename>$BOOT/EFI/Linux/<replaceable>ENTRY-TOKEN</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.efi</filename>.
172 </para></listitem>
173 </itemizedlist>
174
175 <xi:include href="version-info.xml" xpointer="v198"/>
176 </listitem>
177 </varlistentry>
178 <varlistentry>
179 <term><command>inspect [<replaceable>KERNEL-IMAGE</replaceable>]</command></term>
180 <listitem>
181 <para>Shows the various paths and parameters configured or auto-detected. In particular shows the
182 values of the various <varname>$KERNEL_INSTALL_*</varname> environment variables listed
183 below.</para>
184
185 <xi:include href="version-info.xml" xpointer="v251"/>
186 </listitem>
187 </varlistentry>
188
189 </variablelist>
190 </refsect1>
191
192 <refsect1>
193 <title>The <varname>$BOOT</varname> partition</title>
194
195 <para>The partition where the kernels and <ulink url="https://uapi-group.org/specifications/specs/boot_loader_specification">Boot
196 Loader Specification</ulink> snippets are located is called <varname>$BOOT</varname>.
197 <command>kernel-install</command> determines the location of this partition by checking
198 <filename>/efi/</filename>, <filename>/boot/</filename>, and <filename>/boot/efi/</filename> in turn. The
199 first location where <filename>$BOOT/loader/entries/</filename> or
200 <filename>$BOOT/<replaceable>ENTRY-TOKEN</replaceable>/</filename> exists is used.</para>
201 </refsect1>
202
203 <refsect1>
204 <title>Options</title>
205 <para>The following options are understood:</para>
206
207 <variablelist>
208 <xi:include href="standard-options.xml" xpointer="esp-path"/>
209 <xi:include href="standard-options.xml" xpointer="boot-path"/>
210
211 <varlistentry>
212 <term><option>--make-entry-directory=yes|no|auto</option></term>
213 <listitem>
214 <para>Controls creation and deletion of the
215 <ulink url="https://uapi-group.org/specifications/specs/boot_loader_specification">Boot Loader Specification</ulink>
216 Type #1 entry directory on the file system containing resources such as kernel and initrd images
217 during <option>add</option> and <option>remove</option>, respectively. The directory is named after
218 the entry token, and is placed immediately below the boot root directory. When
219 <literal>auto</literal>, the directory is created or removed only when the install layout is
220 <literal>bls</literal>. Defaults to <literal>auto</literal>.</para>
221
222 <xi:include href="version-info.xml" xpointer="v254"/>
223 </listitem>
224 </varlistentry>
225
226 <varlistentry>
227 <term><option>--entry-token=</option></term>
228
229 <listitem>
230 <para>Controls how to name and identify boot loader entries for this kernel installation or
231 deletion. Takes one of <literal>auto</literal>, <literal>machine-id</literal>,
232 <literal>os-id</literal>, <literal>os-image-id</literal>, or an arbitrary string prefixed by
233 <literal>literal:</literal> as argument.</para>
234
235 <para>If set to <option>machine-id</option> the entries are named after the machine ID of the
236 running system (e.g. <literal>b0e793a9baf14b5fa13ecbe84ff637ac</literal>). See
237 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
238 details about the machine ID concept and file.</para>
239
240 <para>If set to <option>os-id</option> the entries are named after the OS ID of the running system,
241 i.e. the <varname>ID=</varname> field of
242 <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>
243 (e.g. <literal>fedora</literal>). Similarly, if set to <option>os-image-id</option> the entries are
244 named after the OS image ID of the running system, i.e. the <varname>IMAGE_ID=</varname> field of
245 <filename>os-release</filename> (e.g. <literal>vendorx-cashier-system</literal>).</para>
246
247 <para>If set to <option>auto</option> (the default), the
248 <filename>/etc/kernel/entry-token</filename> (or
249 <filename>$KERNEL_INSTALL_CONF_ROOT/entry-token</filename>) file will be read if it exists, and the
250 stored value used. Otherwise if the local machine ID is initialized it is used. Otherwise
251 <varname>IMAGE_ID=</varname> from <filename>os-release</filename> will be used, if set. Otherwise,
252 <varname>ID=</varname> from <filename>os-release</filename> will be used, if set. Otherwise a
253 randomly generated machine ID is used.</para>
254
255 <para>Using the machine ID for naming the entries is generally preferable, however there are cases
256 where using the other identifiers is a good option. Specifically: if the identification data that
257 the machine ID entails shall not be stored on the (unencrypted) <varname>$BOOT_ROOT</varname>
258 partition, or if the ID shall be generated on first boot and is not known when the entries are
259 prepared. Note that using the machine ID has the benefit that multiple parallel installations of
260 the same OS can coexist on the same medium, and they can update their boot loader entries
261 independently. When using another identifier (such as the OS ID or the OS image ID), parallel
262 installations of the same OS would try to use the same entry name. To support parallel
263 installations, the installer must use a different entry token when adding a second installation.
264 </para>
265
266 <xi:include href="version-info.xml" xpointer="v254"/>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry>
271 <term><option>-v</option></term>
272 <term><option>--verbose</option></term>
273 <listitem>
274 <para>Output additional information about operations being performed.</para>
275
276 <xi:include href="version-info.xml" xpointer="v242"/>
277 </listitem>
278 </varlistentry>
279
280 <xi:include href="standard-options.xml" xpointer="help" />
281 <xi:include href="standard-options.xml" xpointer="version" />
282 </variablelist>
283 </refsect1>
284
285 <refsect1>
286 <title>Environment variables</title>
287
288 <refsect2>
289 <title>Environment variables exported for plugins</title>
290
291 <para>If <option>--verbose</option> is used, <varname>$KERNEL_INSTALL_VERBOSE=1</varname> will be
292 exported for plugins. They may output additional logs in this case.</para>
293
294 <para><varname>$KERNEL_INSTALL_MACHINE_ID</varname> is set for the plugins to the desired machine-id to
295 use. It's always a 128-bit ID. Normally it's read from <filename>/etc/machine-id</filename>, but it can
296 also be overridden via <varname>$MACHINE_ID</varname> (see below). If not specified via these methods,
297 a fallback value will generated by <command>kernel-install</command> and used only for a single
298 invocation.</para>
299
300 <para><varname>$KERNEL_INSTALL_ENTRY_TOKEN</varname> is set for the plugins to the desired entry
301 "token" to use. It's an identifier that shall be used to identify the local installation, and is often
302 the machine ID, i.e. same as <varname>$KERNEL_INSTALL_MACHINE_ID</varname>, but might also be a
303 different type of identifier, for example a fixed string or the <varname>ID=</varname>,
304 <varname>IMAGE_ID=</varname> values from <filename>/etc/os-release</filename>. The string passed here
305 will be used to name Boot Loader Specification entries, or the directories the kernel image and initial
306 RAM disk images are placed into.</para>
307
308 <para>Note that while <varname>$KERNEL_INSTALL_ENTRY_TOKEN</varname> and
309 <varname>$KERNEL_INSTALL_MACHINE_ID</varname> are often set to the same value, the latter is guaranteed
310 to be a valid 32 character ID in lowercase hexadecimals while the former can be any short string. The
311 entry token to use is read from <filename>/etc/kernel/entry-token</filename>, if it exists. Otherwise a
312 few possible candidates below <varname>$BOOT</varname> are checked for Boot Loader Specification Type 1
313 entry directories, and if found the entry token is derived from that. If that is not successful,
314 <varname>$KERNEL_INSTALL_MACHINE_ID</varname> is used as fallback.</para>
315
316 <para><varname>$KERNEL_INSTALL_BOOT_ROOT</varname> is set for the plugins to the absolute path of the
317 root directory (mount point, usually) of the hierarchy where boot loader entries, kernel images, and
318 associated resources should be placed. This usually is the path where the XBOOTLDR partition or the ESP
319 (EFI System Partition) are mounted, and also conceptually referred to as <varname>$BOOT</varname>. Can
320 be overridden by setting <varname>$BOOT_ROOT</varname> (see below).</para>
321
322 <para><varname>$KERNEL_INSTALL_LAYOUT=auto|bls|uki|other|...</varname> is set for the plugins to specify the
323 installation layout. Additional layout names may be defined by convention. If a plugin uses a special layout,
324 it's encouraged to declare its own layout name and configure <varname>layout=</varname> in
325 <filename>install.conf</filename> upon initial installation. The following values are currently
326 understood:</para>
327
328 <variablelist>
329 <varlistentry>
330 <term>bls</term>
331 <listitem>
332 <para>Standard <ulink url="https://uapi-group.org/specifications/specs/boot_loader_specification">Boot Loader
333 Specification</ulink> Type #1 layout, compatible with
334 <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>:
335 entries in
336 <filename>$BOOT/loader/entries/<replaceable>ENTRY-TOKEN</replaceable>-<replaceable>KERNEL-VERSION</replaceable>[+<replaceable>TRIES</replaceable>].conf</filename>,
337 kernel and initrds under
338 <filename>$BOOT/<replaceable>ENTRY-TOKEN</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename></para>
339 <para>Implemented by <filename>90-loaderentry.install</filename>.</para>
340
341 <xi:include href="version-info.xml" xpointer="v250"/>
342 </listitem>
343 </varlistentry>
344 <varlistentry>
345 <term>uki</term>
346 <listitem>
347 <para>Standard <ulink
348 url="https://uapi-group.org/specifications/specs/boot_loader_specification">Boot Loader
349 Specification</ulink> Type #2 layout, compatible with
350 <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>:
351 unified kernel images under <filename>$BOOT/EFI/Linux</filename> as
352 <filename>$BOOT/EFI/Linux/<replaceable>ENTRY-TOKEN</replaceable>-<replaceable>KERNEL-VERSION</replaceable>[+<replaceable>TRIES</replaceable>].efi</filename>.</para>
353 <para>Implemented by <filename>90-uki-copy.install</filename>.</para>
354
355 <xi:include href="version-info.xml" xpointer="v253"/>
356 </listitem>
357 </varlistentry>
358 <varlistentry>
359 <term>other</term>
360 <listitem>
361 <para>Some other layout not understood natively by <command>kernel-install</command>.</para>
362
363 <xi:include href="version-info.xml" xpointer="v250"/>
364 </listitem>
365 </varlistentry>
366 <varlistentry>
367 <term>auto</term>
368 <listitem>
369 <para>Pick the layout automatically. If the kernel is a UKI set layout to
370 <option>uki</option>. If not default to <option>bls</option> if
371 <filename>$BOOT/loader/entries.srel</filename> with content <literal>type1</literal> or
372 <filename>$BOOT/<replaceable>ENTRY-TOKEN</replaceable></filename> exists, or
373 <option>other</option> otherwise.</para>
374 <para>Leaving layout blank has the same effect. This is the default.</para>
375
376 <xi:include href="version-info.xml" xpointer="v254"/>
377 </listitem>
378 </varlistentry>
379 </variablelist>
380
381 <para><varname>$KERNEL_INSTALL_INITRD_GENERATOR</varname> and <varname>$KERNEL_INSTALL_UKI_GENERATOR</varname>
382 are set for plugins to select the initrd and/or UKI generator. This may be configured as
383 <varname>initrd_generator=</varname> and <varname>uki_generator=</varname> in <filename>install.conf</filename>, see below.</para>
384
385 <para><varname>$KERNEL_INSTALL_STAGING_AREA</varname> is set for plugins to a path to a directory.
386 Plugins may drop files in that directory, and they will be installed as part of the loader entry, based
387 on the file name and extension: Files named <filename>initrd*</filename> will be installed as <replaceable>INITRD-FILE</replaceable>s,
388 and files named <filename>microcode*</filename> will be prepended before <replaceable>INITRD-FILE</replaceable>s.</para>
389
390 </refsect2>
391
392 <refsect2>
393 <title>Environment variables understood by <command>kernel-install</command></title>
394
395 <para><varname>$KERNEL_INSTALL_CONF_ROOT</varname> can be set to override the location of the
396 configuration files read by <command>kernel-install</command>. When set,
397 <filename>install.conf</filename>, <filename>entry-token</filename>, and other files will be
398 read from this directory.</para>
399
400 <para><varname>$KERNEL_INSTALL_PLUGINS</varname> can be set to override the list of plugins executed by
401 <command>kernel-install</command>. The argument is a whitespace-separated list of paths.
402 <literal>KERNEL_INSTALL_PLUGINS=:</literal> may be used to prevent any plugins from running.
403 </para>
404
405 <para><varname>$MACHINE_ID</varname> can be set for <command>kernel-install</command> to override
406 <varname>$KERNEL_INSTALL_MACHINE_ID</varname>, the machine ID.</para>
407
408 <para><varname>$BOOT_ROOT</varname> can be set for <command>kernel-install</command> to override
409 <varname>$KERNEL_INSTALL_BOOT_ROOT</varname>, the installation location for boot entries.</para>
410
411 <para>The last two variables may also be set in <filename>install.conf</filename>. Variables set in the
412 environment take precedence over the values specified in the config file.</para>
413 </refsect2>
414 </refsect1>
415
416 <refsect1>
417 <title>Exit status</title>
418 <para>If every executable returns 0 or 77, 0 is returned, and a non-zero failure code otherwise.</para>
419 </refsect1>
420
421 <refsect1>
422 <title>Files</title>
423 <variablelist>
424 <varlistentry>
425 <term>
426 <filename>/usr/lib/kernel/install.d/*.install</filename>
427 <filename>/etc/kernel/install.d/*.install</filename>
428 </term>
429 <listitem>
430 <para>Drop-in files which are executed by kernel-install.</para>
431
432 <xi:include href="version-info.xml" xpointer="v198"/>
433 </listitem>
434 </varlistentry>
435 <varlistentry>
436 <term>
437 <filename>/usr/lib/kernel/cmdline</filename>
438 <filename>/etc/kernel/cmdline</filename>
439 <filename>/proc/cmdline</filename>
440 </term>
441 <listitem>
442 <para>Read by <filename>90-loaderentry.install</filename>. The content of the file
443 <filename>/etc/kernel/cmdline</filename> specifies the kernel command line to use. If that file
444 does not exist, <filename>/usr/lib/kernel/cmdline</filename> is used. If that also does not
445 exist, <filename>/proc/cmdline</filename> is used. <varname>$KERNEL_INSTALL_CONF_ROOT</varname>
446 may be used to override the path.</para>
447
448 <xi:include href="version-info.xml" xpointer="v198"/>
449 </listitem>
450 </varlistentry>
451 <varlistentry>
452 <term>
453 <filename>/etc/kernel/tries</filename>
454 </term>
455 <listitem>
456 <para>Read by <filename>90-loaderentry.install</filename> and
457 <filename>90-uki-copy.install</filename>. If this file exists a numeric value is read from it
458 and the naming of the generated entry file or UKI is slightly altered to include it as
459 <filename>$BOOT/loader/entries/<replaceable>ENTRY-TOKEN</replaceable>-<replaceable>KERNEL-VERSION</replaceable>+<replaceable>TRIES</replaceable>.conf</filename>
460 or
461 <filename>$BOOT/EFI/Linux/<replaceable>ENTRY-TOKEN</replaceable>-<replaceable>KERNEL-VERSION</replaceable>+<replaceable>TRIES</replaceable>.efi</filename>, respectively. This
462 is useful for boot loaders such as
463 <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>
464 which implement boot attempt counting with a counter embedded in the entry file name.
465 <varname>$KERNEL_INSTALL_CONF_ROOT</varname> may be used to override the path.</para>
466
467 <xi:include href="version-info.xml" xpointer="v240"/>
468 </listitem>
469 </varlistentry>
470 <varlistentry>
471 <term>
472 <filename>/etc/kernel/entry-token</filename>
473 </term>
474 <listitem>
475 <para>If this file exists it is read and used as "entry token" for this system, i.e. is used for
476 naming Boot Loader Specification entries, see <varname>$KERNEL_INSTALL_ENTRY_TOKEN</varname>
477 above for details. <varname>$KERNEL_INSTALL_CONF_ROOT</varname> may be used to override the
478 path.</para>
479
480 <xi:include href="version-info.xml" xpointer="v251"/>
481 </listitem>
482 </varlistentry>
483 <varlistentry>
484 <term>
485 <filename>/etc/machine-id</filename>
486 </term>
487 <listitem>
488 <para>The content of this file specifies the machine identification
489 <replaceable>MACHINE-ID</replaceable>.</para>
490
491 <xi:include href="version-info.xml" xpointer="v198"/>
492 </listitem>
493 </varlistentry>
494 <varlistentry>
495 <term>
496 <filename>/etc/os-release</filename>
497 <filename>/usr/lib/os-release</filename>
498 </term>
499 <listitem>
500 <para>Read by <filename>90-loaderentry.install</filename>.
501 If available, <varname>PRETTY_NAME=</varname> is read from these files and used as the title of the boot menu entry.
502 Otherwise, <literal>Linux <replaceable>KERNEL-VERSION</replaceable></literal> will be used.</para>
503
504 <xi:include href="version-info.xml" xpointer="v198"/>
505 </listitem>
506 </varlistentry>
507 <varlistentry>
508 <term>
509 <filename>/usr/lib/kernel/install.conf</filename>
510 <filename>/etc/kernel/install.conf</filename>
511 </term>
512 <listitem>
513 <para>Configuration options for <command>kernel-install</command>, as a series of
514 <varname>KEY=</varname><replaceable>VALUE</replaceable> assignments, compatible with shell
515 syntax, following the same rules as described in
516 <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
517 <filename>/etc/kernel/install.conf</filename> will be read if present, and
518 <filename>/usr/lib/kernel/install.conf</filename> otherwise. This file is optional.
519 <varname>$KERNEL_INSTALL_CONF_ROOT</varname> may be used to override the path.
520 </para>
521
522 <para>Currently, the following keys are supported:
523 <varname>MACHINE_ID=</varname>,
524 <varname>BOOT_ROOT=</varname>,
525 <varname>layout=</varname>,
526 <varname>initrd_generator=</varname>,
527 <varname>uki_generator=</varname>.
528 See the Environment variables section above for details.</para>
529
530 <xi:include href="version-info.xml" xpointer="v250"/>
531 </listitem>
532 </varlistentry>
533 <varlistentry>
534 <term>
535 <filename>/etc/kernel/uki.conf</filename>
536 </term>
537 <listitem>
538 <para>Ini-style configuration file for
539 <citerefentry><refentrytitle>ukify</refentrytitle><manvolnum>1</manvolnum></citerefentry> which
540 is only effective when <varname>$KERNEL_INSTALL_LAYOUT</varname> or <varname>layout=</varname> in
541 <filename>install.conf</filename> is set to <option>uki</option> and
542 <varname>$KERNEL_INSTALL_UKI_GENERATOR</varname> or <varname>uki_generator=</varname> in
543 <filename>install.conf</filename> is set to <option>ukify</option>.
544 <varname>$KERNEL_INSTALL_CONF_ROOT</varname> may be used to override the path.
545 </para>
546
547 <xi:include href="version-info.xml" xpointer="v255"/>
548 </listitem>
549 </varlistentry>
550 </variablelist>
551 </refsect1>
552
553 <refsect1>
554 <title>See Also</title>
555 <para>
556 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
557 <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
558 <citerefentry project='man-pages'><refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
559 <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
560 <citerefentry><refentrytitle>ukify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
561 <ulink url="https://uapi-group.org/specifications/specs/boot_loader_specification">Boot Loader Specification</ulink>
562 </para>
563 </refsect1>
564
565 </refentry>