KERNEL-INSTALL(8)

  .SH "NAME" kernel-install - Add and remove kernel and initramfs images to and from /boot
  .SH "SYNOPSIS"
    .HP u
      kernel-install
       COMMAND
       KERNEL-VERSION
       [KERNEL-IMAGE]

  .SH "DESCRIPTION"

    .PP kernel-install is used to install and remove kernel and initramfs images to and from /boot.
    .PP 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.
    .PP An executable should return 0 on success. It may also return 77 to cause the whole operation to terminate (executables later in lexical order will be skipped).

  .SH "COMMANDS"

    .PP The following commands are understood:

      .PP add KERNEL-VERSION KERNEL-IMAGE

              This command expects a kernel version string and a path to a kernel image file as arguments. kernel-install creates the directory /boot/MACHINE-ID/KERNEL-VERSION/ and calls the executables from /usr/lib/kernel/install.d/*.install and /etc/kernel/install.d/*.install with the following arguments:

        add KERNEL-VERSION /boot/MACHINE-ID/KERNEL-VERSION/ KERNEL-IMAGE

              Two default plugins execute the following operations in this case:

        • 50-depmod.install runs depmod(8) for the KERNEL-VERSION.

        • 90-loaderentry.install copies KERNEL-IMAGE to /boot/MACHINE-ID/KERNEL-VERSION/linux. It also creates a boot loader entry according to the Boot Loader Specification[1] in /boot/loader/entries/MACHINE-ID-KERNEL-VERSION.conf. The title of the entry is the PRETTY_NAME parameter specified in /etc/os-release or /usr/lib/os-release (if the former is missing), or "Linux KERNEL-VERSION", if unset. If the file initrd is found next to the kernel image file, the initrd will be added to the configuration.
              .sp

          .RE
          .PP remove KERNEL-VERSION

                  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:

            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.
                  .sp

              .RE

          .SH "EXIT STATUS"

            .PP If every executable returns 0 or 77, 0 is returned, and a non-zero failure code otherwise.

          .SH "FILES"

              .PP /usr/lib/kernel/install.d/*.install /etc/kernel/install.d/*.install

                        Drop-in files which are executed by kernel-install.

                  .RE
                  .PP /etc/kernel/cmdline /proc/cmdline

                            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.

                      .RE
                      .PP /etc/kernel/tries

                                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.

                          .RE
                          .PP /etc/machine-id

                                    The content of the file specifies the machine identification MACHINE-ID.

                              .RE
                              .PP /etc/os-release /usr/lib/os-release

                                        The content of the file specifies the operating system title PRETTY_NAME.

                                  .RE

                              .SH "SEE ALSO"

                                .PP machine-id(5), os-release(5), depmod(8), systemd-boot(7), Boot Loader Specification[1]

NOTES

1.  Boot Loader Specification
    https://systemd.io/BOOT_LOADER_SPECIFICATION