chiark / gitweb /
README: add kernel config options
[elogind.git] / man / kernel-install.xml
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 <!--
6 This file is part of systemd.
7
8 Copyright 2013 Harald Hoyer
9
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.
14
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.
19
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/>.
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       <varlistentry>
129         <term>
130           <filename>/etc/kernel/cmdline</filename>
131           <filename>/proc/cmdline</filename>
132         </term>
133           <listitem>
134             <para>The contents of the file <filename>/etc/kernel/cmdline</filename> specifies the kernel command line to use.
135             If that file does not exist, <filename>/proc/cmdline</filename> is used.</para>
136           </listitem>
137       </varlistentry>
138       <varlistentry>
139         <term>
140           <filename>/etc/machine-id</filename>
141         </term>
142           <listitem>
143             <para>The contents of the file specifies the machine identifaction &lt;MACHINE-ID>.</para>
144           </listitem>
145       </varlistentry>
146       <varlistentry>
147         <term>
148           <filename>/etc/os-release</filename>
149         </term>
150           <listitem>
151             <para>The contents of the file specifies the the operating system id &lt;OS-ID>.</para>
152           </listitem>
153       </varlistentry>
154     </variablelist>
155   </refsect1>
156
157   <refsect1>
158     <title>See Also</title>
159     <para>
160       <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
161       <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
162       <ulink url="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec">Boot loader specification</ulink>
163     </para>
164   </refsect1>
165
166 </refentry>