4.10 grubby fatal error during kernel upgrade when /boot is on a btrfs subvolume

If /boot is hosted on a btrfs subvolume, GRUB 2 is unable to correctly process the initramfs and vmlinuz pathnames. This problem occurs when you update or install a new kernel and grubby attempts to update the GRUB 2 configuration. In the case where you are running a fresh installation of Oracle Linux 7 Update 7 (aarch64), and you upgrade the UEK kernel, the following error is displayed:

grubby fatal error: unable to find a suitable template

When the system is rebooted after the kernel update, the system boots to the old kernel.

The workaround for this problem is to use grub2-mkconfig to regenerate the /etc/grub2/grub.cfg file immediately after the kernel has been installed or upgraded, for example:

# grub2-mkconfig -o /boot/grub2/grub.cfg

Obtain a listing of the kernel menu entries in the generated configuration as follows:

# grep -P "submenu|^menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2

From the listing, select the kernel entry that you want to run as the default kernel and set this entry as the default using the following command, substituting menu entry title with the title of the kernel entry that you identified in the listing:

# grub2-set-default "menu entry title"

You can use the grub2-editenv list command to check that the saved_entry has been updated with the selected kernel menu title.

Reboot and use uname -a to check that the correct kernel is now running.

(Bug ID 22750169)