FFU 13 to 16.1: Leapp fails to update the kernel on UEFI based systems and /etc/fstab does not contain the EFI partition
Environment
- Red Hat OpenStack Platform 16.1
- Framework for Upgrades 13 to 16.1 (FFU)
Issue
- During the overcloud upgrade, when running the upgrade command with the
system_upgradetag, overcloud nodes are booted from the old kernel after the Leapp upgrade and FFU fails.
Resolution
- This is already a known issue and tracked in This content is not included.RHBZ#1925078.
Note: The public visibility of the above mentioned RHBZ may change during the period of time. Contact Technical Support to get more details on RHBZ in case of any issue.
-
Following steps can be used to workaround the issue and get past the error observed in
system_upgradesteps of overcloud nodes.-
Copy
/boot/efi/EFI/redhatto/tmp/<backup>. -
As the root user, add the
/etc/fstabentry for/boot/efithat points to the EFI partition. For example:echo UUID=`blkid -s UUID -o value "$(blkid -t TYPE=vfat | grep -i efi | cut -d ':' -f1)"` /boot/efi vfat umask=0077 0 1 >> /etc/fstab -
As the root user, mount
/boot/efi:mount /boot/efi -
Copy
/tmp/<backup>to/boot/efi/EFI/redhat.NOTE : On RHEL8, ensure that
/boot/grub2/grubenvis a link to the file in/boot/efi/EFI/redhat:ll /boot/grub2/grubenv lrwxrwxrwx. 1 root root 25 Jul 8 2022 /boot/grub2/grubenv -> ../efi/EFI/redhat/grubenv -
Create the boot record:
DEVICE_PATH="$(blkid -t TYPE=vfat | grep -i efi | cut -d ':' -f1)" DEVICE="$(lsblk -no pkname $DEVICE_PATH)" PARTITION="$(echo $DEVICE_PATH | awk '{print $NF}' FS=/$DEVICE)" efibootmgr -c -L 'Red Hat Enterprise Linux' -d $(echo $DEVICE_PATH | sed s/$PARTITION\$//) -p $PARTITION -l '\EFI\redhat\shimx64.efi' -
Create the grub config file:
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg -
Reboot the system.
sudo reboot
-
Root Cause
-
It is likely that systems that use UEFI boot and a UEFI bootloader in OSP13 might run into UEFI This content is not included.RHBZ#1925078 that results in:
/etc/fstabnot being updatedgrub-installis incorrectly used on EFI system
Diagnostic Steps
-
On the affected system, check if the system was booted using EFI. The following path must exist:
stat /sys/firmware/efi -
Check if the EFI partition is present in
/etc/fstab:grep efi /etc/fstabIf it is not present, you are running into this issue.
-
Run the following command:
efibootmgr -v | grep redIf you have a boot record with the name
red, you are running into this issue.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.