]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/kernel-install.xml
kernel-install: add kernel-install tool
[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>
52 <command>kernel-install</command> <arg choice="req">COMMAND</arg> <arg choice="req">KERNEL VERSION</arg> <arg choice="req">KERNEL IMAGE</arg>
53 </cmdsynopsis>
54 </refsynopsisdiv>
55
56 <refsect1>
57 <title>Description</title>
58 <para>
59 <command>kernel-install</command> is used to install and remove kernel and
60 initramfs images to and from <filename>/boot</filename>.
61 </para>
62
63 <para>kernel-install will execute the files located in the directory <filename>/usr/lib/kernel/install.d/</filename>
64 and the local administration directory <filename>/etc/kernel/install.d/</filename>.
65 All files are collectively sorted and executed in lexical order, regardless of the directories in
66 which they live. However, files with identical file names replace each other.
67 Files in <filename>/etc/kernel/install.d/</filename> take precedence over files with the same name
68 in <filename>/usr/lib/kernel/install.d/</filename>. This can be used to override a system-supplied
69 executables with a local file if needed; a symbolic link in <filename>/etc/kernel/install.d/</filename>
70 with the same name as an executable in <filename>/usr/lib/kernel/install.d/</filename>,
71 pointing to /dev/null, disables the executable entirely. Executables must have the
72 extension .install; other extensions are ignored.</para>
73
74 </refsect1>
75
76 <refsect1>
77 <title>Commands</title>
78 <para>The following commands are understood:</para>
79 <variablelist>
80 <varlistentry>
81 <term>add &lt;KERNEL VERSION> &lt;KERNEL IMAGE></term>
82 <listitem>
83 <para>calls every executable <filename>/usr/lib/kernel/install.d/*.install</filename>
84 and <filename>/etc/kernel/install.d/*.install</filename> with the arguments
85 "add &lt;KERNEL VERSION> <filename>/boot/&lt;MACHINE-ID>/&lt;KERNEL VERSION>/</filename>"</para>
86
87 <para>kernel-install copies &lt;KERNEL IMAGE> to
88 <filename>/boot/&lt;MACHINE-ID>/&lt;KERNEL VERSION>/linux</filename>.</para>
89
90 <para>kernel-install also creates a boot loader entry according to the boot loader specification
91 in <filename>/boot/loader/entries/&lt;OS-ID>-&lt;KERNEL VERSION>-&lt;MACHINE-ID>.conf</filename>.
92 If the file <filename>initrd</filename> is found next to the <filename>linux</filename> file,
93 the initrd will be added to the configuration.</para>
94 </listitem>
95 </varlistentry>
96 <varlistentry>
97 <term>remove &lt;KERNEL VERSION> &lt;KERNEL IMAGE></term>
98 <listitem><para>calls every executable <filename>/usr/lib/kernel/install.d/*.install</filename>
99 and <filename>/etc/kernel/install.d/*.install</filename> with the arguments:
100 "remove &lt;KERNEL VERSION> <filename>/boot/&lt;MACHINE-ID>/&lt;KERNEL VERSION>/</filename>"
101 </para>
102 <para>kernel-install removes the entire directory <filename>/boot/&lt;MACHINE-ID>/&lt;KERNEL VERSION>/</filename>
103 and the file <filename>/boot/loader/entries/&lt;OS-ID>-&lt;KERNEL VERSION>-&lt;MACHINE-ID>.conf</filename></para>
104 </listitem>
105 </varlistentry>
106
107 </variablelist>
108
109 </refsect1>
110
111 <refsect1>
112 <title>Exit status</title>
113 <para>If every executable returns with 0, 0 is returned, a non-zero failure code otherwise.</para>
114 </refsect1>
115
116 <refsect1>
117 <title>Files</title>
118 <variablelist>
119 <varlistentry>
120 <term>
121 <filename>/usr/lib/kernel/install.d/*.install</filename>
122 <filename>/etc/kernel/install.d/*.install</filename>
123 </term>
124 <listitem>
125 <para>Drop-in files, which are executed by kernel-install.</para>
126 </listitem>
127 </varlistentry>
128 </variablelist>
129 </refsect1>
130
131 <refsect1>
132 <title>See Also</title>
133 <para>
134 <ulink url="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec">Boot loader specification</ulink>
135 </para>
136 </refsect1>
137
138</refentry>