installkernel
Install a new kernel and related files
SYNOPSIS
installkernel kernel-version kernel-image initrd-image
PARAMETERS
kernel-version
The version string of the kernel to be installed (e.g., 5.15.0-101-generic).
kernel-image
The path to the kernel image file (e.g., vmlinuz-5.15.0-101-generic).
initrd-image
The path to the initial ramdisk image file (e.g., initrd.img-5.15.0-101-generic). May be optional in some distributions.
DESCRIPTION
The installkernel script is designed to install a new Linux kernel and its associated modules into the appropriate directories in the boot file system. It automates the process of copying the kernel image (vmlinuz), initrd image and the kernel modules to the /boot directory (or another specified boot directory). It's often called by the make install process after compiling a kernel, simplifying the kernel upgrade procedure.
The script typically performs the following actions: copies the kernel image (vmlinuz) to /boot, generates an initrd image (if specified), copies the system map file (.map) to /boot, updates the bootloader configuration (grub.conf or lilo.conf) to include the new kernel, and installs the kernel modules into the correct directory under /lib/modules/.
Essentially, installkernel abstracts away the manual steps involved in replacing a Linux kernel, helping ensure a consistent and error-free kernel update process.
CAVEATS
The exact behavior of installkernel can vary depending on the distribution and the specific implementation of the script. It is crucial to review the script itself to understand its precise actions and configuration.
BOOTLOADER CONFIGURATION
The way installkernel interacts with the bootloader (GRUB or LILO) varies. Some versions directly modify the bootloader configuration files, while others rely on separate utilities (like grub-mkconfig) to regenerate the configuration based on the installed kernels.
MODULE INSTALLATION
installkernel ensures that the kernel modules are placed in the correct subdirectory under /lib/modules/kernel-version/. This allows the kernel to find and load the necessary drivers and modules during boot.
HISTORY
The installkernel script has evolved as part of the Linux kernel build and installation process. It was developed to streamline the often complex task of upgrading the kernel. Historically, this involved many manual steps, increasing the risk of errors. Over time, different distributions have adapted and customized installkernel to meet their specific needs and bootloader configurations.
SEE ALSO
mkinitrd(8), grub-mkconfig(8), update-initramfs(8)