leapp: How to solve Risk Factor HIGH "GRUB core will be updated during upgrade"
Environment
- Red Hat Enterprise Linux 7 and later
- leapp
Issue
-
When upgrading a system from RHEL7 to RHEL8 or RHEL8 to RHEL9, the following Risk Factor is reported
Risk Factor: high Title: GRUB core will be updated during upgrade Summary: On legacy (BIOS) systems, GRUB core (located in the gap between the MBR and the first partition) does not get automatically updated when GRUB is upgraded. Key: baa75fad370c42fd037481909201cde9495dacf4
Resolution
This message is to remember that, on BIOS systems (i.e. non-UEFI), the Grub2 binary installed on the MBR of the hard disk and having its modules in /boot/grub2 directory is NOT updated when updating Grub2 packages.
Because of that, once the system got upgraded from RHEL7 to RHEL8 (or RHEL8 to RHEL9), it is recommended to install the Grub2 binary to the MBR again:
# grub2-install /dev/sda
Here above, the /dev/sda path needs to be adjusted to point to the hard disk used to boot the system (check the BIOS to know which hard disk is used).
Root Cause
The fact that Grub2 binary is not updated when updating Grub2 packages is tracked by This content is not included.BZ 2170430 - grub2-pc-modules updates are not applied to /boot/grub2/i386-pc directory.
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.