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