UEFI boot order, Re: Tip: Remote FAI install

Thomas Lange lange at cs.uni-koeln.de
Thu Jan 19 21:10:05 CET 2023


Hi,

I found this code that move the first boot entry (which is expected to
be the new entry after an installation) to the end of the boot list.

https://community.theforeman.org/t/efi-boot-order-with-centos-7-network-boot-vs-local-boot/10529/2

# the EFI boot manager is only installed on UEFI hosts by Anaconda
if [[ -f /sbin/efibootmgr ]]; then
    echo "- Changing EFI boot order to preserve network boot ..."
    created_entry=$(efibootmgr | grep "BootOrder" | cut -d " " -f 2 | cut -d "," -f 1)
    others=$(efibootmgr | grep "BootOrder" | cut -d " " -f 2 | cut -d "," -f 2-)
    new_order="${others},${created_entry}"
    efibootmgr -q -o ${new_order}
fi

-- 
regards Thomas


More information about the linux-fai mailing list