installkernel
Install a new kernel and related files
SYNOPSIS
installkernel [options...] vmlinuz initrd System.map image
PARAMETERS
--version=<VERSION>
Specify kernel version string (e.g., 5.14.0-70.el9.x86_64)
--make-default
Set this kernel as the default boot entry
--oldname=<NAME>
Name of previous kernel image directory in /boot
--uefi
Force UEFI mode for bootloader configuration
--noefi
Force BIOS mode (disable UEFI)
DESCRIPTION
The installkernel command is a utility script primarily used in Red Hat-based distributions like Fedora and CentOS to automate the installation of new Linux kernel images. It copies the kernel binary (vmlinuz), initial ramdisk (initrd or initramfs), and System.map file to the /boot directory, creates a kernel image subdirectory, and updates the bootloader configuration, typically GRUB2.
This command is invoked automatically by package managers (e.g., RPM or DNF/Yum) during kernel package installation or updates, ensuring the new kernel is bootable without manual intervention. It handles version-specific naming, such as /boot/vmlinuz-5.14.0-70.el9.x86_64, and can regenerate initramfs if needed via integration with tools like dracut.
installkernel supports both BIOS and UEFI systems, detecting firmware type to configure GRUB appropriately. It preserves previous kernels unless explicitly removed and can set the new kernel as default. This makes it essential for sysadmins managing kernel updates in production environments, reducing errors in bootloader setup.
CAVEATS
Requires root privileges; modifies /boot and GRUB config—backup before use. May fail if /boot is full or on separate partition with space issues. Not for Debian/Ubuntu (use update-grub instead).
INVOCATION CONTEXT
Typically called by %post script in kernel RPM:
installkernel $KERNEL_IMAGE $INITRD_IMAGE $SYSTEM_MAP $KERNEL_VERSION
FILES CREATED/MODIFIED
/boot/vmlinuz-<version>, /boot/initramfs-<version>.img,
/boot/System.map-<version>, /boot/<version>/ dir,
GRUB config (/boot/grub2/grub.cfg or /etc/grub.d/)
HISTORY
Developed for Red Hat Linux ~2000s as part of RPM kernel spec. Evolved with GRUB2 support in RHEL 6+ (2010), UEFI integration in RHEL 7+ (2014). Maintained in Fedora for automated deployments.
SEE ALSO
dracut(8), grub2-mkconfig(8), mkinitrd(8), new-kernel-pkg(1)


