]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/kernel-install.xml
keymap/findkeyboards: avoid throwaway attribute-walk
[thirdparty/systemd.git] / man / kernel-install.xml
CommitLineData
81516adc
HH
1<?xml version='1.0'?> <!--*-nxml-*-->
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5<!--
6This file is part of systemd.
7
8Copyright 2013 Harald Hoyer
9
10systemd is free software; you can redistribute it and/or modify it
11under the terms of the GNU Lesser General Public License as published by
12the Free Software Foundation; either version 2.1 of the License, or
13(at your option) any later version.
14
15systemd is distributed in the hope that it will be useful, but
16WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18Lesser General Public License for more details.
19
20You should have received a copy of the GNU Lesser General Public License
21along with systemd; If not, see <http://www.gnu.org/licenses/>.
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
81516adc
HH
70 which they live. However, files with identical file names replace each other.
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>,
75 pointing to /dev/null, disables the executable entirely. Executables must have the
76 extension .install; other extensions are ignored.</para>
77
78 </refsect1>
79
80 <refsect1>
81 <title>Commands</title>
82 <para>The following commands are understood:</para>
83 <variablelist>
84 <varlistentry>
845c5324 85 <term><command>add <replaceable>KERNEL-VERSION</replaceable> <replaceable>KERNEL-IMAGE</replaceable></command></term>
81516adc 86 <listitem>
845c5324
ZJS
87 <para>calls every executable
88 <filename>/usr/lib/kernel/install.d/*.install</filename> and
89 <filename>/etc/kernel/install.d/*.install</filename> with
90 the arguments
91 <programlisting>
92add <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
93 </programlisting>
94 </para>
95
96 <para><command>kernel-install</command> copies
97 <replaceable>KERNEL-IMAGE</replaceable> to
98 <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/linux</filename>.
99 </para>
100
101 <para><command>kernel-install</command> also creates a boot
102 loader entry according to the boot loader specification in
103 <filename>/boot/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.
104 If the file <filename>initrd</filename> is found next to the
105 <filename>linux</filename> file, the initrd will be added to
106 the configuration.</para>
81516adc
HH
107 </listitem>
108 </varlistentry>
109 <varlistentry>
845c5324
ZJS
110 <term><command>remove</command> <replaceable>KERNEL-VERSION</replaceable> <replaceable>KERNEL-IMAGE</replaceable></term>
111 <listitem>
112 <para>calls every executable <filename>/usr/lib/kernel/install.d/*.install</filename>
113 and <filename>/etc/kernel/install.d/*.install</filename> with the arguments
114 <programlisting>
115remove <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
116 </programlisting>
117 </para>
118
119 <para><command>kernel-install</command> removes the entire directory
120 <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
121 and the file
122 <filename>/boot/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename></para>
81516adc
HH
123 </listitem>
124 </varlistentry>
125
126 </variablelist>
127
128 </refsect1>
129
130 <refsect1>
131 <title>Exit status</title>
132 <para>If every executable returns with 0, 0 is returned, a non-zero failure code otherwise.</para>
133 </refsect1>
134
135 <refsect1>
136 <title>Files</title>
137 <variablelist>
138 <varlistentry>
139 <term>
140 <filename>/usr/lib/kernel/install.d/*.install</filename>
141 <filename>/etc/kernel/install.d/*.install</filename>
142 </term>
143 <listitem>
144 <para>Drop-in files, which are executed by kernel-install.</para>
145 </listitem>
146 </varlistentry>
2d0614d3
HH
147 <varlistentry>
148 <term>
149 <filename>/etc/kernel/cmdline</filename>
150 <filename>/proc/cmdline</filename>
151 </term>
152 <listitem>
7d7681f7 153 <para>The content of the file <filename>/etc/kernel/cmdline</filename> specifies the kernel command line to use.
2d0614d3
HH
154 If that file does not exist, <filename>/proc/cmdline</filename> is used.</para>
155 </listitem>
156 </varlistentry>
157 <varlistentry>
158 <term>
159 <filename>/etc/machine-id</filename>
160 </term>
161 <listitem>
845c5324 162 <para>The content of the file specifies the machine identification <replaceable>MACHINE-ID</replaceable>.</para>
2d0614d3
HH
163 </listitem>
164 </varlistentry>
165 <varlistentry>
166 <term>
167 <filename>/etc/os-release</filename>
168 </term>
169 <listitem>
845c5324 170 <para>The content of the file specifies the operating system id <replaceable>OS-ID</replaceable>.</para>
2d0614d3
HH
171 </listitem>
172 </varlistentry>
81516adc
HH
173 </variablelist>
174 </refsect1>
175
176 <refsect1>
177 <title>See Also</title>
178 <para>
2d0614d3
HH
179 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
180 <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
81516adc
HH
181 <ulink url="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec">Boot loader specification</ulink>
182 </para>
183 </refsect1>
184
185</refentry>