Grub force install to boot sector
When upgrading OS or replacing drives, the UEFI booting may not be able to automatically installed on the boot drive, resulting not able to update the boot menu to include the new kernels.
When you do grub2-install <your boot device>, it errors out with information:
Installing for x86_64-efi platform.
grub2-install: error: This utility should not be used for EFI platforms because it does not support UEFI Secure Boot. If you really wish to proceed, invoke the –force option.
Make sure Secure Boot is disabled before proceeding.
Do not worry. Just force it,
grub2-install –force <your boot device>
then update the grub menu,
grub2-mkconfig -o /boot/grub2/grub.cfg
it will work.