How to install a kernel on an offline RHEL 8/9/10 system?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 10
  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 8

Issue

  • How to install a kernel on an offline RHEL8/9/10 system?
  • How to install a kernel on an air-gapped RHEL8/9/10 system?

Resolution

To install a kernel on an offline RHEL system:

  • Download the following RPM packages (all must be the same version):

    • RHEL 8: kernel, kernel-core, kernel-modules
    • RHEL 9/10: kernel, kernel-core, kernel-modules, kernel-modules-core
  • Transfer the RPMs to the target system and navigate to their directory.

  • Install packages as root using dnf command:

    For RHEL 8:

    # dnf install kernel-<version>.rpm kernel-core-<version>.rpm kernel-modules-<version>.rpm
    

    For RHEL 9/10:

    # dnf install kernel-<version>.rpm kernel-core-<version>.rpm kernel-modules-<version>.rpm kernel-modules-core-<version>.rpm
    
  • Alternatively, install packages as root using rpm command:

    For RHEL 8:

    # rpm -ihv kernel-<version>.rpm kernel-core-<version>.rpm kernel-modules-<version>.rpm
    

    For RHEL 9/10:

    # rpm -ihv kernel-<version>.rpm kernel-core-<version>.rpm kernel-modules-<version>.rpm kernel-modules-core-<version>.rpm
    
  • If dependencies are missing, download required dependency RPMs, copy them to the same directory and retry the installation.

  • Reboot to activate the new kernel: Why reboot is required for new kernel?

Notes:

  • Optional kernel packages (install if needed): kernel-devel, kernel-headers, kernel-tools, kernel-tools-libs
  • Systems can maintain multiple kernel versions, only one kernel loads at boot: How to check active kernel version
  • Please refer to How to download RPM for instructions on how to download packages.

Diagnostic Steps

SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.