How to Install/Upgrade Unbreakable Enterprise Kernel (UEK) in Oracle Linux

What is kernel?

A kernel is the central part of an operating system (in other word, core component or heart of an operating system).

It act as a bridge between applications and hardware. It’s responsible for enabling multiple applications to effectively share the hardware by controlling access to CPU, memory, disk I/O, printer, video card and networking.

When an operating system is loaded into memory, the kernel loads first and remains in memory until the operating system is shut down again.

Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds. The latest version of kernel 4.12 has grown to over 19+ million lines of code contributed by almost 14,000 programmers. Stable kernel updates are released on as-needed basis, usually 2-3 a month.

There are five types of kernels available, but two kernel is more popular monolithic kernels and microkernels.

Suggested Read :
(#) Ukuu – An Easy Way To Install/Upgrade Linux Kernel In Ubuntu based Systems
(#) LKU – A Set Of Shell Scripts To Compile, Install & Update Latest Kernel In Ubuntu/LinuxMint
(#) 6 Methods To Check The Running Linux Kernel Version On System
(#) How To Safely Remove Old/Unused Kernels In RHEL/CentOS/Fedora

What is Oracle UEK kernel?

Oracle Linux is the only recommended Linux distribution for Oracle applications, which provide the most secure, scalable, and reliable solution for your mission critical workloads.

Oracle Linux with the Unbreakable Enterprise Kernel provides the best performance and the latest features from Oracle and the mainline kernel community.

Oracle Linux and the Unbreakable Enterprise Kernel will ensure your environment (physical hardware or virtualized) and optimize for maximum performance and results.

The prime motivation for creating the UEK was to provide a modern, high performance Linux kernel for the Exadata and Exalogic engineered systems.

The kernel needed to scale as the number of CPUs, memory and InfiniBand connects was increased.

Oracle tests the UEK intensively with demanding Oracle workloads, and recommends the UEK for Oracle deployments and all other enterprise deployments.

We can check the kernel release/update here.

History about Unbreakable Enterprise Kernel

  • In September 2010, Oracle announced about Unbreakable Enterprise Kernel (UEK) for Oracle Linux 5 and recommended for Oracle applications
  • Oracle allowed users to choose either the Red Hat Compatible Kernel or the UEK beginning with Oracle Linux 5.5
  • UEK became the default kernel from Oracle Linux 5.6
  • Oracle releases new versions of the UEK every 12-18 months.
  • The latest version of the UEK receives quarterly patch updates including drivers for new hardware support, bug fixes, and critical security patches.
  • Oracle also provides critical security patches for previous versions of the UEK.
  • UEK Release 3 (UEK R3) is based on the mainline Linux kernel version 3.8.13.
  • UEK Release 4 (UEK R4) is based on the mainline Linux kernel version 4.1.12

Check your current installed Kernel version on your system.

# uname -a
Linux oracle.2daygeek 3.8.13-35.1.2.el6uek.x86_64 #1 SMP Thu Nov 7 17:01:44 PST 2013 x86_64 x86_64 x86_64 GNU/Linux

Check the /boot partition disk space before performing the kernel upgrade. Most of the times you may end up with error when you don’t have sufficient free space on boot partition. Hence, make sure you should have sufficient space on boot partition.

# df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       477M  131M  321M  29% /boot

Method-1:

We can upgrade the kernel in two ways. Let me explain about this. In this method we are going to use Oracle repository.

As we are using Public Yum repository. Hence, we are going to modify the below values to install latest UEK R3 kernel. Modify it to 1 from 0 to enable it.

# vi /etc/yum.repos.d/public-yum-ol6.repo
[ol6_UEKR3_latest]
name=Latest Unbreakable Enterprise Kernel Release 3 for Oracle Linux $releasever ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

Disable UEK repository if you are planning to use UEK3 kernel only. Modify it to 0 from 1 to disable it.

# vi /etc/yum.repos.d/public-yum-ol6.repo
[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

Note: If you subscribed your system to Unbreakable Linux Network (ULN) then modify your repository accordingly (ol6_x86_64_UEKR3_latest channel)

Run the following command to verify UEK R3 channel is subscribed. Yes, I could see UEK R3 repositories are successfully subscribed.

# yum repolist

Loaded plugins: aliases, changelog, presto, refresh-packagekit, security, tmprepo, ulninfo, verify, versionlock
public_ol6_UEKR3_latest                                                                                                | 1.2 kB     00:00
public_ol6_UEKR3_latest/primary                                                                                        |  35 MB     00:05
public_ol6_UEKR3_latest                                                                                                               874/874
public_ol6_latest                                                                                                      | 1.4 kB     00:00
public_ol6_latest/primary                                                                                              |  68 MB     00:13
public_ol6_latest                                                                                                                 40075/40075
repo id                                     repo name                                                                                   status
public_ol6_UEKR3_latest                     Latest Unbreakable Enterprise Kernel for Oracle Linux 6Server (x86_64)                         874
public_ol6_latest                           Oracle Linux 6Server Latest (x86_64)                                                        40,075
repolist: 40,949

Run the following command to check whether new UEK kernel is available or not.

# yum list kernel-uek
Loaded plugins: aliases, changelog, presto, refresh-packagekit, security, tmprepo, ulninfo, verify, versionlock
Installed Packages
kernel-uek.x86_64                                        3.8.13-35.1.2.el6uek                                          @anaconda-UEK3/6.5
Available Packages
kernel-uek.x86_64                                        3.8.13-118.20.3.el6uek                                        public_ol6_UEKR3_latest

By default modern Linux system will keep only 3 kernels so, enable this limit by modifying the below file.

# cat /etc/yum.conf |grep 'installonly_limit'
installonly_limit=3

Update a new value.

# vi /etc/yum.conf
installonly_limit=10

Re-check this once.

# cat /etc/yum.conf |grep 'installonly_limit'
installonly_limit=10

Once all the above mentioned activity has completed, use the below command to install the latest UEK R3 kernel.

# yum install kernel-uek
Loaded plugins: aliases, changelog, presto, refresh-packagekit, security, tmprepo, ulninfo, verify, versionlock
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kernel-uek.x86_64 0:3.8.13-118.20.3.el6uek will be installed
--> Processing Dependency: kernel-firmware = 3.8.13-118.20.3.el6uek for package: kernel-uek-3.8.13-118.20.3.el6uek.x86_64
--> Processing Dependency: ql8300-firmware >= 8.01.02-1.0.1 for package: kernel-uek-3.8.13-118.20.3.el6uek.x86_64
--> Processing Dependency: ql2600-firmware >= 8.01.02-1.0.1 for package: kernel-uek-3.8.13-118.20.3.el6uek.x86_64
--> Processing Dependency: ql2700-firmware >= 8.01.02-1.0.1 for package: kernel-uek-3.8.13-118.20.3.el6uek.x86_64
--> Running transaction check
---> Package kernel-uek-firmware.noarch 0:3.8.13-118.20.3.el6uek will be installed
---> Package ql2600-firmware.noarch 0:8.01.02-1.0.1.el6 will be installed
---> Package ql2700-firmware.noarch 0:8.01.02-1.0.1.el6 will be installed
---> Package ql8300-firmware.noarch 0:8.01.02-1.0.1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
Package                            Arch                  Version                                Repository                              Size
==============================================================================================================================================
Installing:
kernel-uek                         x86_64                3.8.13-118.20.3.el6uek                 public_ol6_UEKR3_latest                 42 M
Installing for dependencies:
kernel-uek-firmware                noarch                3.8.13-118.20.3.el6uek                 public_ol6_UEKR3_latest                2.2 M
ql2600-firmware                    noarch                8.01.02-1.0.1.el6                      public_ol6_UEKR3_latest                142 k
ql2700-firmware                    noarch                8.01.02-1.0.1.el6                      public_ol6_UEKR3_latest                145 k
ql8300-firmware                    noarch                8.01.02-1.0.1.el6                      public_ol6_UEKR3_latest                121 k

Transaction Summary
==============================================================================================================================================
Install       5 Package(s)

Total download size: 45 M
Installed size: 178 M
Is this ok [y/N]: y
Downloading Packages:

Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 45 M
(1/5): kernel-uek-3.8.13-118.20.3.el6uek.x86_64.rpm                                                                    |  42 MB     00:27
(2/5): kernel-uek-firmware-3.8.13-118.20.3.el6uek.noarch.rpm                                                           | 2.2 MB     00:00
(3/5): ql2600-firmware-8.01.02-1.0.1.el6.noarch.rpm                                                                    | 142 kB     00:00
(4/5): ql2700-firmware-8.01.02-1.0.1.el6.noarch.rpm                                                                    | 145 kB     00:00
(5/5): ql8300-firmware-8.01.02-1.0.1.el6.noarch.rpm                                                                    | 121 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                         1.0 MB/s |  45 MB     00:44
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : ql2600-firmware-8.01.02-1.0.1.el6.noarch                                                                                   1/5
  Installing : ql2700-firmware-8.01.02-1.0.1.el6.noarch                                                                                   2/5
  Installing : kernel-uek-firmware-3.8.13-118.20.3.el6uek.noarch                                                                          3/5
  Installing : ql8300-firmware-8.01.02-1.0.1.el6.noarch                                                                                   4/5
  Installing : kernel-uek-3.8.13-118.20.3.el6uek.x86_64                                                                                   5/5
  Verifying  : ql8300-firmware-8.01.02-1.0.1.el6.noarch                                                                                   1/5
  Verifying  : kernel-uek-firmware-3.8.13-118.20.3.el6uek.noarch                                                                          2/5
  Verifying  : ql2700-firmware-8.01.02-1.0.1.el6.noarch                                                                                   3/5
  Verifying  : kernel-uek-3.8.13-118.20.3.el6uek.x86_64                                                                                   4/5
  Verifying  : ql2600-firmware-8.01.02-1.0.1.el6.noarch                                                                                   5/5
 
Installed:
  kernel-uek.x86_64 0:3.8.13-118.20.3.el6uek

Dependency Installed:
  kernel-uek-firmware.noarch 0:3.8.13-118.20.3.el6uek  ql2600-firmware.noarch 0:8.01.02-1.0.1.el6  ql2700-firmware.noarch 0:8.01.02-1.0.1.el6
  ql8300-firmware.noarch 0:8.01.02-1.0.1.el6

Complete!

Method-2:

Install latest UEK R3 kernel using RPM file (It’s a manual method).

Download the latest UEK R3 kernel & firmware packages from below URL

# wget http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/x86_64/getPackage/kernel-uek-3.8.13-118.20.2.el6uek.x86_64.rpm
# wget http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/x86_64/getPackage/kernel-uek-firmware-3.8.13-118.20.2.el6uek.noarch.rpm

Create new directory uek3_latest and move the above kernel packages in it.

# mkdir uek3_latest

# cd uek3_latest

# ls
kernel-uek-3.8.13-118.20.2.el6uek.x86_64.rpm
kernel-uek-firmware-3.8.13-118.20.2.el6uek.noarch.rpm 

Run the below command to install it.

# rpm -ivh *.rpm
Preparing...                ########################################### [100%]
  1:kernel-uek-firmware    ########################################### [ 50%]
  2:kernel-uek             ########################################### [100%]

How to verify this Kernel installation

Yes, we have successfully installed latest UEK R3 kernel. To double confirm this, verify the grub.conf file whether the latest UEK R3 kernel entries are there or not.

# cat /boot/grub/grub.conf 

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg00-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda1
device (hd0) HD(1,800,64000,f596cde0-353d-4431-ace6-c552e8764384)
default=0
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Oracle Linux Server Unbreakable Enterprise Kernel (3.8.13-118.20.3.el6uek.x86_64)
        root (hd0,1)
        kernel /vmlinuz-3.8.13-118.20.3.el6uek.x86_64 ro root=/dev/mapper/vg00-lv_root rd_LVM_LV=vg00/lv_swap rd_NO_LUKS rd_LVM_LV=vg00/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16   KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM LANG=en_US.UTF-8 rhgb quiet
        initrd /initramfs-3.8.13-118.20.3.el6uek.x86_64.img
title Oracle Linux Server Red Hat Compatible Kernel (2.6.32-696.20.1.el6.x86_64)
        root (hd0,1)
        kernel /vmlinuz-2.6.32-696.20.1.el6.x86_64 ro root=/dev/mapper/vg00-lv_root rd_LVM_LV=vg00/lv_swap rd_NO_LUKS rd_LVM_LV=vg00/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16   KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM LANG=en_US.UTF-8 rhgb quiet crashkernel=auto
        initrd /initramfs-2.6.32-696.20.1.el6.x86_64.img
title Oracle Linux Server Red Hat Compatible Kernel (2.6.32-696.18.7.el6.x86_64)
        root (hd0,1)
        kernel /vmlinuz-2.6.32-696.18.7.el6.x86_64 ro root=/dev/mapper/vg00-lv_root rd_LVM_LV=vg00/lv_swap rd_NO_LUKS rd_LVM_LV=vg00/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16   KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM LANG=en_US.UTF-8 rhgb quiet crashkernel=auto
        initrd /initramfs-2.6.32-696.18.7.el6.x86_64.img
title Oracle Linux Server Red Hat Compatible Kernel (2.6.32-696.16.1.el6.x86_64)
        root (hd0,1)
        kernel /vmlinuz-2.6.32-696.16.1.el6.x86_64 ro root=/dev/mapper/vg00-lv_root rd_LVM_LV=vg00/lv_swap rd_NO_LUKS rd_LVM_LV=vg00/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16   KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM LANG=en_US.UTF-8 rhgb quiet crashkernel=auto
        initrd /initramfs-2.6.32-696.16.1.el6.x86_64.img
title Oracle Linux Server Unbreakable Enterprise Kernel (3.8.13-35.1.2.el6uek.x86_64)
        root (hd0,1)
        kernel /vmlinuz-3.8.13-35.1.2.el6uek.x86_64 ro root=/dev/mapper/vg00-lv_root rd_LVM_LV=vg00/lv_swap rd_NO_LUKS rd_LVM_LV=vg00/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16   KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM LANG=en_US.UTF-8 rhgb quiet
        initrd /initramfs-3.8.13-35.1.2.el6uek.x86_64.img

Alternatively we can check this by listing /boot directory.

                               
# ls -lh /boot

total 163M
-rw-r--r--  1 root root 106K Nov 15 15:44 config-2.6.32-696.16.1.el6.x86_64
-rw-r--r--  1 root root 106K Jan  3 17:58 config-2.6.32-696.18.7.el6.x86_64
-rw-r--r--  1 root root 106K Jan 25 16:48 config-2.6.32-696.20.1.el6.x86_64
-rw-r--r--  1 root root 129K Feb 23 14:57 config-3.8.13-118.20.3.el6uek.x86_64
-rw-r--r--. 1 root root 128K Nov  7  2013 config-3.8.13-35.1.2.el6uek.x86_64
drwx------  3 root root  16K Dec 31  1969 efi
drwxr-xr-x. 2 root root 1.0K Jan 13  2017 grub
-rw-------  1 root root  25M Nov 17 17:51 initramfs-2.6.32-696.16.1.el6.x86_64.img
-rw-r--r--  1 root root  25M Jan  5 16:48 initramfs-2.6.32-696.18.7.el6.x86_64.img
-rw-------  1 root root  25M Jan 26 18:53 initramfs-2.6.32-696.20.1.el6.x86_64.img
-rw-------  1 root root  27M Mar 16 19:20 initramfs-3.8.13-118.20.3.el6uek.x86_64.img
-rw-r--r--  1 root root  26M Jan  5 16:51 initramfs-3.8.13-35.1.2.el6uek.x86_64.img
drwx------. 2 root root  12K Aug 21  2014 lost+found
-rw-r--r--  1 root root 211K Nov 15 15:44 symvers-2.6.32-696.16.1.el6.x86_64.gz
-rw-r--r--  1 root root 211K Jan  3 17:58 symvers-2.6.32-696.18.7.el6.x86_64.gz
-rw-r--r--  1 root root 211K Jan 25 16:49 symvers-2.6.32-696.20.1.el6.x86_64.gz
-rw-r--r--  1 root root 216K Feb 23 14:57 symvers-3.8.13-118.20.3.el6uek.x86_64.gz
-rw-r--r--. 1 root root 213K Nov  7  2013 symvers-3.8.13-35.1.2.el6uek.x86_64.gz
-rw-r--r--  1 root root 2.6M Nov 15 15:44 System.map-2.6.32-696.16.1.el6.x86_64
-rw-r--r--  1 root root 2.6M Jan  3 17:58 System.map-2.6.32-696.18.7.el6.x86_64
-rw-r--r--  1 root root 2.6M Jan 25 16:48 System.map-2.6.32-696.20.1.el6.x86_64
-rw-r--r--  1 root root 2.7M Feb 23 14:57 System.map-3.8.13-118.20.3.el6uek.x86_64
-rw-r--r--. 1 root root 2.7M Nov  7  2013 System.map-3.8.13-35.1.2.el6uek.x86_64
-rwxr-xr-x  1 root root 4.1M Nov 15 15:44 vmlinuz-2.6.32-696.16.1.el6.x86_64
-rwxr-xr-x  1 root root 4.1M Jan  3 17:58 vmlinuz-2.6.32-696.18.7.el6.x86_64
-rwxr-xr-x  1 root root 4.1M Jan 25 16:48 vmlinuz-2.6.32-696.20.1.el6.x86_64
-rwxr-xr-x  1 root root 4.5M Feb 23 14:57 vmlinuz-3.8.13-118.20.3.el6uek.x86_64
-rwxr-xr-x. 1 root root 4.4M Nov  7  2013 vmlinuz-3.8.13-35.1.2.el6uek.x86_64

One more way to check this.

# rpm -qa|grep -i kernel
kernel-2.6.32-696.20.1.el6.x86_64
libreport-plugin-kerneloops-2.0.9-33.0.1.el6.x86_64
kernel-headers-2.6.32-696.20.1.el6.x86_64
kernel-uek-3.8.13-118.20.3.el6uek.x86_64
kernel-2.6.32-696.16.1.el6.x86_64
dracut-kernel-004-409.0.7.el6_8.2.noarch
abrt-addon-kerneloops-2.0.8-43.0.1.el6.x86_64
kernel-uek-3.8.13-35.1.2.el6uek.x86_64
kernel-uek- Doc ID 3.8.13 -35.1.2.el6uek.noarch
kernel-uek-firmware-3.8.13-35.1.2.el6uek.noarch
kernel-firmware-2.6.32-696.20.1.el6.noarch
kernel-uek-firmware-3.8.13-118.20.3.el6uek.noarch
kernel-2.6.32-696.18.7.el6.x86_64 

Initiate a system reboot and sit back.

# shutdown -r now

Once the system back to up. Check the kernel version.

# uname -a
Linux oracle.2daygeek 3.8.13-118.20.3.el6uek.x86_64 #1 SMP Wed Mar 21 10:15:24 PST 2018 x86_64 x86_64 x86_64 GNU/Linux

Leave a Reply

Your email address will not be published. Required fields are marked *