Skip to main content

CentOS Kernel Upgrade

Kernel Packages

CentOS/RedHat Linux 與 kernel 升級相關的套件清單

  • kernel — Contains the kernel for single-core, multi-core, and multi-processor systems.
  • kernel-debug — Contains a kernel with numerous debugging options enabled for kernel diagnosis, at the expense of reduced performance.
  • kernel-devel — Contains the kernel headers and makefiles sufficient to build modules against the kernel package.
  • kernel-debug-devel — Contains the development version of the kernel with numerous debugging options enabled for kernel diagnosis, at the expense of reduced performance.
  • kernel-doc — Documentation files from the kernel source. Various portions of the Linux kernel and the device drivers shipped with it are documented in these files. Installation of this package provides a reference to the options that can be passed to Linux kernel modules at load time.
    By default, these files are placed in the /usr/share/doc/kernel-doc-kernel_version/ directory.
  • kernel-headers — Includes the C header files that specify the interface between the Linux kernel and user-space libraries and programs. The header files define structures and constants that are needed for building most standard programs.
  • linux-firmware — Contains all of the firmware files that are required by various devices to operate.
  • perf — This package contains the perf tool, which enables performance monitoring of the Linux kernel.
  • kernel-abi-whitelists — Contains information pertaining to the Red Hat Enterprise Linux kernel ABI, including a lists of kernel symbols that are needed by external Linux kernel modules and a yum plug-in to aid enforcement.
  • kernel-tools — Contains tools for manipulating the Linux kernel and supporting documentation.
Preparing  to upgrade
# Current kernel running
uname -a
# Grub2 Info for syatem booting
awk -F\' '$1=="menuentry " {print $2}' /boot/grub2/grub.cfg

grub2-editenv list

# Current kernel packages installed
rpm -qa | grep kernel
# Or
yum list installed "kernel-*"
Downloading the upgraded kernel

RedHat Custom Portal 網站下載新版的 kernel 套件 

  1. kernel-3.10.0-1062.el7.x86_64.rpm
  2. linux-firmware-20190429-72.gitddde598.el7.noarch.rpm  (這是第一項安裝的相依性檔案)
Performing the upgrade

升級 kernel 時,系統會自動使用 Dracut 工具來建立新的 initialRAM file system 開機用映像檔。請確定 Dracut 已經有安裝。

升級 kernel

# 先升級 linux-firmware
# NOTE: 安裝指令不能使用 -ivh
rpm -Uvh linux-firmware-20190429-72.gitddde598.el7.noarch.rpm

# 再升級 kernel
# NOTE: 安裝時不要使用 -Uvh 
rpm -ivh kernel-3.10.0-1062.el7.x86_64.rpm