368 lines
8.2 KiB
HTML
368 lines
8.2 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of KERNEL-INSTALL</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>KERNEL-INSTALL</H1>
|
|
Section: kernel-install (8)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
kernel-install - Add and remove kernel and initramfs images to and from /boot
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>kernel-install</B> COMMAND [OPTIONS...] <I>KERNEL-VERSION</I> <I>KERNEL-IMAGE</I> [<I>INITRD-FILE</I>...]
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<B>kernel-install</B>
|
|
<DD>is used to install and remove kernel and initramfs images to and from the boot loader partition, referred to as
|
|
<I>$BOOT</I>
|
|
here. It will usually be one of
|
|
/boot,
|
|
/efi, or
|
|
/boot/efi, see below.
|
|
<P>
|
|
|
|
<B>kernel-install</B>
|
|
will execute the files located in the directory
|
|
/usr/lib/kernel/install.d/
|
|
and the local administration directory
|
|
/etc/kernel/install.d/. All files are collectively sorted and executed in lexical order, regardless of the directory in which they live. However, files with identical filenames replace each other. Files in
|
|
/etc/kernel/install.d/
|
|
take precedence over files with the same name in
|
|
/usr/lib/kernel/install.d/. This can be used to override a system-supplied executables with a local file if needed; a symbolic link in
|
|
/etc/kernel/install.d/
|
|
with the same name as an executable in
|
|
/usr/lib/kernel/install.d/, pointing to
|
|
/dev/null, disables the executable entirely. Executables must have the extension
|
|
".install"; other extensions are ignored.
|
|
<P>
|
|
|
|
An executable should return
|
|
<B>0</B>
|
|
on success. It may also return
|
|
<B>77</B>
|
|
to cause the whole operation to terminate (executables later in lexical order will be skipped).
|
|
<A NAME="lbAE"> </A>
|
|
<H2>COMMANDS</H2>
|
|
|
|
<P>
|
|
|
|
The following commands are understood:
|
|
<P>
|
|
|
|
<B>add </B><B></B><I>KERNEL-VERSION</I><B> </B><B></B><I>KERNEL-IMAGE</I><B> [</B><B></B><I>INITRD-FILE</I><B> ...]</B>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
This command expects a kernel version string and a path to a kernel image file as arguments.
|
|
<B>kernel-install</B>
|
|
calls the executables from
|
|
/usr/lib/kernel/install.d/*.install
|
|
and
|
|
/etc/kernel/install.d/*.install
|
|
with the following arguments:
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
add <I>KERNEL-VERSION</I> $BOOT/<I>MACHINE-ID</I>/<I>KERNEL-VERSION</I>/ <I>KERNEL-IMAGE</I> [<I>INITRD-FILE</I> ...]
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
Three default plugins execute the following operations in this case:
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
•
|
|
|
|
|
|
00-entry-directory.install
|
|
creates the directory
|
|
$BOOT/<I>MACHINE-ID</I>/<I>KERNEL-VERSION</I>/
|
|
if
|
|
$BOOT/<I>MACHINE-ID</I>/
|
|
already exists.
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
•
|
|
|
|
|
|
50-depmod.install
|
|
runs
|
|
<B><A HREF="/cgi-bin/man/man2html?8+depmod">depmod</A></B>(8)
|
|
for the
|
|
<I>KERNEL-VERSION</I>.
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
•
|
|
|
|
|
|
90-loaderentry.install
|
|
copies
|
|
<I>KERNEL-IMAGE</I>
|
|
to
|
|
$BOOT/<I>MACHINE-ID</I>/<I>KERNEL-VERSION</I>/linux. If an
|
|
<I>INITRD-FILE</I>
|
|
is provided, it also copies
|
|
<I>INITRD-FILE</I>
|
|
to
|
|
$BOOT/<I>MACHINE-ID</I>/<I>KERNEL_VERSION</I>/<I>INITRD-FILE</I>. It also creates a boot loader entry according to the
|
|
m[blue]<B>Boot Loader Specification</B>m[]<FONT SIZE="-2">[1]</FONT>
|
|
in
|
|
$BOOT/loader/entries/<I>MACHINE-ID</I>-<I>KERNEL-VERSION</I>.conf. The title of the entry is the
|
|
<I>PRETTY_NAME</I>
|
|
parameter specified in
|
|
/etc/os-release
|
|
or
|
|
/usr/lib/os-release
|
|
(if the former is missing), or "Linux
|
|
<I>KERNEL-VERSION</I>", if unset.
|
|
<P>
|
|
If the entry directory
|
|
$BOOT/<I>MACHINE-ID</I>/<I>KERNEL-VERSION</I>/
|
|
does not exist, this plugin does nothing.
|
|
</DL>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>remove </B><B></B><I>KERNEL-VERSION</I>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
This command expects a kernel version string as single argument. This calls executables from
|
|
/usr/lib/kernel/install.d/*.install
|
|
and
|
|
/etc/kernel/install.d/*.install
|
|
with the following arguments:
|
|
<P>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
remove <I>KERNEL-VERSION</I> $BOOT/<I>MACHINE-ID</I>/<I>KERNEL-VERSION</I>/
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
Afterwards,
|
|
<B>kernel-install</B>
|
|
removes the directory
|
|
$BOOT/<I>MACHINE-ID</I>/<I>KERNEL-VERSION</I>/
|
|
and its contents.
|
|
<P>
|
|
Two default plugins execute the following operations in this case:
|
|
<P>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
•
|
|
|
|
|
|
50-depmod.install
|
|
removes the files generated by
|
|
<B>depmod</B>
|
|
for this kernel again.
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
•
|
|
|
|
|
|
90-loaderentry.install
|
|
removes the file
|
|
$BOOT/loader/entries/<I>MACHINE-ID</I>-<I>KERNEL-VERSION</I>.conf.
|
|
</DL>
|
|
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>THE FI$BOOTFR PARTITION</H2>
|
|
|
|
<P>
|
|
|
|
The partition where the kernels and
|
|
m[blue]<B>Boot Loader Specification</B>m[]<FONT SIZE="-2">[1]</FONT>
|
|
snippets are located is called
|
|
<I>$BOOT</I>.
|
|
<B>kernel-install</B>
|
|
determines the location of this partition by checking
|
|
/efi/,
|
|
/boot/, and
|
|
/boot/efi
|
|
in turn. The first location where
|
|
$BOOT/loader/entries/
|
|
or
|
|
$BOOT/$MACHINE_ID/
|
|
exists is used.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
The following options are understood:
|
|
<P>
|
|
|
|
<B>-v</B>, <B>--verbose</B>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
Output additional information about operations being performed.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-h</B>, <B>--help</B>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
Print a short help text and exit.
|
|
</DL>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>ENVIRONMENT VARIABLES</H2>
|
|
|
|
<P>
|
|
|
|
If
|
|
<B>--verbose</B>
|
|
is used,
|
|
<I>$KERNEL_INSTALL_VERBOSE=1</I>
|
|
will be set for the plugins. They may output additional logs in this case.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>EXIT STATUS</H2>
|
|
|
|
<P>
|
|
|
|
If every executable returns 0 or 77, 0 is returned, and a non-zero failure code otherwise.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<P>
|
|
|
|
/usr/lib/kernel/install.d/*.install /etc/kernel/install.d/*.install
|
|
<DL COMPACT><DT id="13"><DD>
|
|
Drop-in files which are executed by kernel-install.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/kernel/cmdline /proc/cmdline
|
|
<DL COMPACT><DT id="14"><DD>
|
|
Read by
|
|
90-loaderentry.install. The content of the file
|
|
/etc/kernel/cmdline
|
|
specifies the kernel command line to use. If that file does not exist,
|
|
/proc/cmdline
|
|
is used.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/kernel/tries
|
|
<DL COMPACT><DT id="15"><DD>
|
|
Read by
|
|
90-loaderentry.install. If this file exists a numeric value is read from it and the naming of the generated entry file is slightly altered to include it as
|
|
$BOOT/loader/entries/<I>MACHINE-ID</I>-<I>KERNEL-VERSION</I>+<I>TRIES</I>.conf. This is useful for boot loaders such as
|
|
<B><A HREF="/cgi-bin/man/man2html?7+systemd-boot">systemd-boot</A></B>(7)
|
|
which implement boot attempt counting with a counter embedded in the entry file name.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/machine-id
|
|
<DL COMPACT><DT id="16"><DD>
|
|
The content of the file specifies the machine identification
|
|
<I>MACHINE-ID</I>.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/os-release /usr/lib/os-release
|
|
<DL COMPACT><DT id="17"><DD>
|
|
The content of the file specifies the operating system title
|
|
<I>PRETTY_NAME</I>.
|
|
</DL>
|
|
|
|
<A NAME="lbAK"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+machine-id">machine-id</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+os-release">os-release</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+depmod">depmod</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?7+systemd-boot">systemd-boot</A></B>(7),
|
|
m[blue]<B>Boot Loader Specification</B>m[]<FONT SIZE="-2">[1]</FONT>
|
|
<A NAME="lbAL"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="18"> 1.<DD>
|
|
Boot Loader Specification
|
|
<DL COMPACT><DT id="19"><DD>
|
|
<A HREF="https://systemd.io/BOOT_LOADER_SPECIFICATION">https://systemd.io/BOOT_LOADER_SPECIFICATION</A>
|
|
</DL>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="20"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="21"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="22"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="23"><A HREF="#lbAE">COMMANDS</A><DD>
|
|
<DT id="24"><A HREF="#lbAF">THE FI$BOOTFR PARTITION</A><DD>
|
|
<DT id="25"><A HREF="#lbAG">OPTIONS</A><DD>
|
|
<DT id="26"><A HREF="#lbAH">ENVIRONMENT VARIABLES</A><DD>
|
|
<DT id="27"><A HREF="#lbAI">EXIT STATUS</A><DD>
|
|
<DT id="28"><A HREF="#lbAJ">FILES</A><DD>
|
|
<DT id="29"><A HREF="#lbAK">SEE ALSO</A><DD>
|
|
<DT id="30"><A HREF="#lbAL">NOTES</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:13 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|