[CentOS] EFI boot order rewrite

Fri Feb 24 11:43:36 UTC 2023
James Pearson <james-p at moving-picture.com>

Florian Bauer wrote>
> we are running CentOS Stream 8 on some of our dedicated servers.
> On the newer servers that boot with efi, the system that is installed
> with the default properties in the ISO installer writes itself to the
> top of the efi boot order.
> This seems to happen every time after bootup.
> Since we run all our systems with efi network boot as the first boot
> option for rescue operation, this would be a significant problem for the
> future if the behavior cannot be turned off.
> I have already checked the use of efibootmgr and some of the related
> grub settings such as GRUB_DEFAULT and GRUB_SAVEDEFAULT (which may have
> nothing to do with it).
> On Debian, I found a debconf option that prevents updating nvram.
> This seems to prevent the described behavior.
> Does anyone have an idea for this problem?

I had a similar issue with EFI booting with CentOS 7 a while ago - my 'fix' was to add something to the %post section of the kickstart file to use efibootmgr to set 'EFI Network' as the first device in the EFI BootOrder - which seemed to work OK for subsequent boots

James Pearson