Unbreakable Enterprise Kernel Troubleshooting

Review the following information to troubleshoot issues with the Unbreakable Enterprise Kernel (UEK) on Oracle Linux instances in Oracle Cloud Infrastructure.

See also: Unbreakable Enterprise Kernel Known Issues.

Instance fails to boot after updating to a new kernel version

When you update to the latest UEK Release 7 kernel, the console log shows the following error:

error: ../../grub-core/fs/fshelp.c:258:file `/initramfs-5.15.0-206.153.7.el8uek.x86_64.img' not found.

This error occurs because there wasn't enough space in the /boot directory when the kernel was installed, or the initramfs file is either missing or wasn't created correctly. Try booting into a previous kernel, checking for errors in the grub boot configuration, and verifying the integrity of the initramfs image.

To troubleshoot, regenerate the initramfs image, remove unused kernels to free up space in the /bootdirectory, or do both.

Regenerate the initramfs image

Follow these steps to regenerate the initramfs image.

  1. From a command line, using administrative privileges connect to the instance using SSH.
  2. Check to see if the initramfs file for the kernel that won't boot exists by running ls -l /boot/initramfs-*.img.
    ls -l /boot/initramfs-*.img
    -rw-------. 1 root root 90917795 Feb 12 19:33 /boot/initramfs-0-rescue-7063910fe2979258f8fd66f2fb8b8567.img
    -rw-------. 1 root root 76584495 Mar 24 14:40 /boot/initramfs-4.18.0-553.40.1.el8_10.x86_64.img
    -rw-------. 1 root root 90117038 Mar 24 23:51 /boot/initramfs-5.15.0-305.176.4.el8uek.x86_64.img
    -rw-------. 1 root root 35099136 Mar 24 14:57 /boot/initramfs-5.15.0-305.176.4.el8uek.x86_64kdump.img
    Tip

    You can identify the Oracle Linux kernels by the el8uek in the initramfs image name: /boot/initramfs-5.15.0-305.176.4.el8uek.x86_64.img
  3. Back up initramfs image for the updated kernel by copying it to a directory other than /boot. For example, to copy /boot/initramfs-5.15.0-305.176.4.el8uek.x86_64.img to the /root directory, run:
    sudo cp /boot/initramfs-5.15.0-305.176.4.el8uek.x86_64.img /root
  4. Regenerate the initramfs image for the updated kernel, for example:
    sudo dracut --kver 5.15.0-305.176.4.el8uek.x86_64 --force
  5. Check that the initramfs has been regenerate, for example:
    sudo ls -l /boot/initramfs-5.15.0-305.176.4.el8uek.x86_64.img

    Notice the date change:

    -rw-------. 1 root root 90117038 Apr  2 23:51 /boot/initramfs-5.15.0-305.176.4.el8uek.x86_64.img
  6. Reboot the instance to verify the instance can now boot with the updated kernel.

Remove unused kernels

Follow these steps to free up boot space by removing unused kernels.

  1. From a command line, using administrative privileges connect to the instance using SSH.
  2. Clean up the /boot file system by removing old or unwanted kernels. For example, if you no longer need Red Hat Compatible Kernels (RHCK), they can be removed freeing up space /boot.
    1. Check the available space in /boot.
      df -h /boot
      Filesystem      Size  Used Avail Use% Mounted on
      /dev/sda2      1014M 1006M  8.7M 100% /boot 
    2. Search for the RHCKs.
      sudo rpm -qa | grep kernel-core
      kernel-core-4.18.0-553.40.1.el8_10.x86_64 
    3. Remove the unwanted RHCKs.
      sudo dnf remove -y kernel-core-4.18.0-553.40.1.el8_10.x86_64
  3. Recheck the available space in /boot.
    df -h /boot
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sdb2      1014M  782M  233M  78% /boot
  4. Reboot the instance to verify the instance can now boot with the updated kernel.