[CentOS] UEFI booting

Thu Sep 19 12:25:42 UTC 2019
John Hodrien <J.H.Hodrien at leeds.ac.uk>

On Thu, 19 Sep 2019, Jerry Geis wrote:

> I installed my first UEFI disk yesterday. Seemed to go fine. CentOS 7.6
> x86_64
> I then took that disk "out" of that machine and put it another machine - it
> seems to not even boot.
> I put the original disk back in that machine and it boots fine.
>
> I put the UEFI disk back in the machine I built it on and it works fine.
> They are similar machines either and i3 and i7.
>
> Shouldn't that work?  Build a UEFI disk on machine A - move it to machine B?

I think the issue is that the UEFI firmware doesn't know which UEFI boot loader to load.  I think this should help:

https://noobient.com/2017/09/27/fixing-the-efi-bootloader-on-centos-7/

Boot into rescue mode, and run:

efibootmgr --create --label CentOS --disk /dev/sda1 --loader "\EFI\centos\shim.efi"

I think you then should end up in a happy place.  You can probably add that entry by hand within the UEFI config itself.

HTH,

jh