Update GRUB2 configuration on both BIOS and UEFI when upgrading from CentOS Stream 9 to RHEL 10
Acceptance criteria
GRUB2 configuration is updated and GRUB2 image installed
This is mainly a protective measure to prevent issues in case the original distribution GRUB2 tooling generates images that expect different format of a config file. To be on the safe side we rather re-generate the GRUB2 config file and install the GRUB2 image.
The CentOS Stream UEFI bootloader entry is replaced with the RHEL one
For that files from /boot/efi/EFI/centos/ need to first be moved to /boot/efi/EFI/redhat/
The /boot/efi/EFI/centos/ is removed when there's no user files (i.e. only when there are just the typical files)