]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/kernel-install.xml
verify: use manager_load_startable_unit_or_warn() to load units for verification
[thirdparty/systemd.git] / man / kernel-install.xml
CommitLineData
3802a3d3 1<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
81516adc 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76 3"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
81516adc
HH
4
5<!--
572eb058
ZJS
6 SPDX-License-Identifier: LGPL-2.1+
7
5de0ccff 8 This file is part of systemd.
81516adc 9
5de0ccff 10 Copyright 2013 Harald Hoyer
81516adc 11
5de0ccff
ZJS
12 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
81516adc 16
5de0ccff
ZJS
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
81516adc 21
5de0ccff
ZJS
22 You should have received a copy of the GNU Lesser General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
81516adc
HH
24-->
25
26<refentry id="kernel-install">
27
28 <refentryinfo>
29 <title>kernel-install</title>
30 <productname>systemd</productname>
31
32 <authorgroup>
33 <author>
34 <contrib>Developer</contrib>
35 <firstname>Harald</firstname>
36 <surname>Hoyer</surname>
37 <email>harald@redhat.com</email>
38 </author>
39 </authorgroup>
40 </refentryinfo>
41
42 <refmeta>
43 <refentrytitle>kernel-install</refentrytitle>
44 <manvolnum>8</manvolnum>
45 </refmeta>
46
47 <refnamediv>
48 <refname>kernel-install</refname>
49 <refpurpose>Add and remove kernel and initramfs images to and from /boot</refpurpose>
50 </refnamediv>
51
52 <refsynopsisdiv>
53 <cmdsynopsis>
845c5324
ZJS
54 <command>kernel-install</command>
55 <arg choice="plain">COMMAND</arg>
56 <arg choice="plain"><replaceable>KERNEL-VERSION</replaceable></arg>
57 <arg choice="opt"><replaceable>KERNEL-IMAGE</replaceable></arg>
81516adc
HH
58 </cmdsynopsis>
59 </refsynopsisdiv>
60
61 <refsect1>
62 <title>Description</title>
63 <para>
64 <command>kernel-install</command> is used to install and remove kernel and
65 initramfs images to and from <filename>/boot</filename>.
66 </para>
67
845c5324
ZJS
68 <para><command>kernel-install</command> will execute the files
69 located in the directory <filename>/usr/lib/kernel/install.d/</filename>
81516adc 70 and the local administration directory <filename>/etc/kernel/install.d/</filename>.
845c5324 71 All files are collectively sorted and executed in lexical order, regardless of the directory in
e9dd9f95 72 which they live. However, files with identical filenames replace each other.
81516adc
HH
73 Files in <filename>/etc/kernel/install.d/</filename> take precedence over files with the same name
74 in <filename>/usr/lib/kernel/install.d/</filename>. This can be used to override a system-supplied
75 executables with a local file if needed; a symbolic link in <filename>/etc/kernel/install.d/</filename>
76 with the same name as an executable in <filename>/usr/lib/kernel/install.d/</filename>,
eb933128 77 pointing to <filename>/dev/null</filename>, disables the executable entirely. Executables must have the
409dee2e 78 extension <literal>.install</literal>; other extensions are ignored.</para>
81516adc 79
eb933128
ZJS
80 <para>An executable should return <constant>0</constant> on success. It may also
81 return <constant>77</constant> to cause the whole operation to terminate
82 (executables later in lexical order will be skipped).</para>
81516adc
HH
83 </refsect1>
84
85 <refsect1>
86 <title>Commands</title>
87 <para>The following commands are understood:</para>
88 <variablelist>
89 <varlistentry>
845c5324 90 <term><command>add <replaceable>KERNEL-VERSION</replaceable> <replaceable>KERNEL-IMAGE</replaceable></command></term>
81516adc 91 <listitem>
8f51399e
HH
92 <para><command>kernel-install</command> creates the directory
93 <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
c4c50112 94 and calls executables from
845c5324
ZJS
95 <filename>/usr/lib/kernel/install.d/*.install</filename> and
96 <filename>/etc/kernel/install.d/*.install</filename> with
97 the arguments
c4c50112
ZJS
98 <programlisting>add <replaceable>KERNEL-VERSION</replaceable> \
99 <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename> <replaceable>KERNEL-IMAGE</replaceable></programlisting>
845c5324
ZJS
100 </para>
101
8f51399e
HH
102 <para>The kernel-install plugin <filename>50-depmod.install</filename> runs depmod for the <replaceable>KERNEL-VERSION</replaceable>.</para>
103
5ae4d543
LP
104 <para>The kernel-install plugin
105 <filename>90-loaderentry.install</filename> copies
845c5324
ZJS
106 <replaceable>KERNEL-IMAGE</replaceable> to
107 <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/linux</filename>.
5ae4d543
LP
108 It also creates a boot loader entry according to the boot
109 loader specification in
845c5324 110 <filename>/boot/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.
5ae4d543
LP
111 The title of the entry is the
112 <replaceable>PRETTY_NAME</replaceable> parameter specified
113 in <filename>/etc/os-release</filename> or
114 <filename>/usr/lib/os-release</filename> (if the former is
115 missing), or "Linux
116 <replaceable>KERNEL-VERSION</replaceable>", if unset. If
117 the file <filename>initrd</filename> is found next to the
845c5324
ZJS
118 <filename>linux</filename> file, the initrd will be added to
119 the configuration.</para>
81516adc
HH
120 </listitem>
121 </varlistentry>
122 <varlistentry>
8f51399e 123 <term><command>remove <replaceable>KERNEL-VERSION</replaceable></command></term>
845c5324 124 <listitem>
c4c50112 125 <para>Calls executables from <filename>/usr/lib/kernel/install.d/*.install</filename>
845c5324 126 and <filename>/etc/kernel/install.d/*.install</filename> with the arguments
9fccdb0f 127 <programlisting>remove <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename></programlisting>
845c5324
ZJS
128 </para>
129
130 <para><command>kernel-install</command> removes the entire directory
8f51399e
HH
131 <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename> afterwards.</para>
132
133 <para>The kernel-install plugin <filename>90-loaderentry.install</filename> removes the file
134 <filename>/boot/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.</para>
81516adc
HH
135 </listitem>
136 </varlistentry>
137
138 </variablelist>
139
140 </refsect1>
141
142 <refsect1>
143 <title>Exit status</title>
c4c50112 144 <para>If every executable returns 0 or 77, 0 is returned, and a non-zero failure code otherwise.</para>
81516adc
HH
145 </refsect1>
146
147 <refsect1>
148 <title>Files</title>
149 <variablelist>
150 <varlistentry>
151 <term>
152 <filename>/usr/lib/kernel/install.d/*.install</filename>
153 <filename>/etc/kernel/install.d/*.install</filename>
154 </term>
155 <listitem>
409dee2e 156 <para>Drop-in files which are executed by kernel-install.</para>
81516adc
HH
157 </listitem>
158 </varlistentry>
2d0614d3
HH
159 <varlistentry>
160 <term>
161 <filename>/etc/kernel/cmdline</filename>
162 <filename>/proc/cmdline</filename>
163 </term>
164 <listitem>
7d7681f7 165 <para>The content of the file <filename>/etc/kernel/cmdline</filename> specifies the kernel command line to use.
2d0614d3
HH
166 If that file does not exist, <filename>/proc/cmdline</filename> is used.</para>
167 </listitem>
168 </varlistentry>
169 <varlistentry>
170 <term>
171 <filename>/etc/machine-id</filename>
172 </term>
173 <listitem>
845c5324 174 <para>The content of the file specifies the machine identification <replaceable>MACHINE-ID</replaceable>.</para>
2d0614d3
HH
175 </listitem>
176 </varlistentry>
177 <varlistentry>
178 <term>
179 <filename>/etc/os-release</filename>
5ae4d543 180 <filename>/usr/lib/os-release</filename>
2d0614d3
HH
181 </term>
182 <listitem>
8f51399e 183 <para>The content of the file specifies the operating system title <replaceable>PRETTY_NAME</replaceable>.</para>
2d0614d3
HH
184 </listitem>
185 </varlistentry>
81516adc
HH
186 </variablelist>
187 </refsect1>
188
189 <refsect1>
190 <title>See Also</title>
191 <para>
2d0614d3
HH
192 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
193 <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
28a0ad81 194 <ulink url="https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec">Boot loader specification</ulink>
81516adc
HH
195 </para>
196 </refsect1>
197
198</refentry>