kernel-install (8) - Linux Man Pages
kernel-install: Add and remove kernel and initramfs images to and from /boot
kernel-install - Add and remove kernel and initramfs images to and from /boot
- kernel-install COMMAND [OPTIONS...] KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE...]
kernel-install 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.
The following commands are understood:
add KERNEL-VERSIONKERNEL-IMAGE [INITRD-FILE ...]
This command expects a kernel version string and a path to a kernel image file as arguments.
calls the executables from
with the following arguments:
add KERNEL-VERSION $BOOT/MACHINE-ID/KERNEL-VERSION/ KERNEL-IMAGE [INITRD-FILE ...]
Three default plugins execute the following operations in this case:
- • 00-entry-directory.install creates the directory $BOOT/MACHINE-ID/KERNEL-VERSION/ if $BOOT/MACHINE-ID/ already exists.
- • 50-depmod.install runs depmod(8) for the KERNEL-VERSION.
$BOOT/MACHINE-ID/KERNEL-VERSION/linux. If an
is provided, it also copies
$BOOT/MACHINE-ID/KERNEL_VERSION/INITRD-FILE. It also creates a boot loader entry according to the
m[blue]Boot Loader Specificationm
$BOOT/loader/entries/MACHINE-ID-KERNEL-VERSION.conf. The title of the entry is the
parameter specified in
(if the former is missing), or "Linux
KERNEL-VERSION", if unset.
If the entry directory $BOOT/MACHINE-ID/KERNEL-VERSION/ does not exist, this plugin does nothing.
This command expects a kernel version string as single argument. This calls executables from
with the following arguments:
remove KERNEL-VERSION $BOOT/MACHINE-ID/KERNEL-VERSION/
Afterwards, kernel-install removes the directory $BOOT/MACHINE-ID/KERNEL-VERSION/ and its contents.
Two default plugins execute the following operations in this case:
- • 50-depmod.install removes the files generated by depmod for this kernel again.
- • 90-loaderentry.install removes the file $BOOT/loader/entries/MACHINE-ID-KERNEL-VERSION.conf.
THE FI$BOOTFR PARTITION
The partition where the kernels and m[blue]Boot Loader Specificationm snippets are located is called $BOOT. kernel-install 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.
The following options are understood:
- Output additional information about operations being performed.
- Print a short help text and exit.
- Drop-in files which are executed by kernel-install.
- 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.
- 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/MACHINE-ID-KERNEL-VERSION+TRIES.conf. This is useful for boot loaders such as systemd-boot(7) which implement boot attempt counting with a counter embedded in the entry file name.
- The content of the file specifies the machine identification MACHINE-ID.
- The content of the file specifies the operating system title PRETTY_NAME.
Boot Loader Specification
Linux man pages generated by: SysTutorials