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