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 /boot
directory, or do both.
Regenerate the initramfs
image
Follow these steps to regenerate the initramfs
image.
- From a command line, using administrative privileges connect to the instance using SSH.
- Check to see if the
initramfs
file for the kernel that won't boot exists by runningls -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 theel8uek
in theinitramfs
image name:/boot/initramfs-5.15.0-305.176.4.el8uek.x86_64.img
- 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
- Regenerate the
initramfs
image for the updated kernel, for example:sudo dracut --kver 5.15.0-305.176.4.el8uek.x86_64 --force
- 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
- 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.
- From a command line, using administrative privileges connect to the instance using SSH.
- 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
.- Check the available space in
/boot
.df -h /boot
Filesystem Size Used Avail Use% Mounted on /dev/sda2 1014M 1006M 8.7M 100% /boot
- Search for the RHCKs.
sudo rpm -qa | grep kernel-core
kernel-core-4.18.0-553.40.1.el8_10.x86_64
- Remove the unwanted RHCKs.
sudo dnf remove -y kernel-core-4.18.0-553.40.1.el8_10.x86_64
- Check the available space in
- Recheck the available space in
/boot
.df -h /boot
Filesystem Size Used Avail Use% Mounted on /dev/sdb2 1014M 782M 233M 78% /boot
- Reboot the instance to verify the instance can now boot with the updated kernel.