iPXE does not boot local hard disk on UEFI

Problem: After configuring iPXE UEFI based KVM hosts do not boot local disk:

So after setting up iPXE as the ‘PXE loader’ in my lab I see the following results (this is all on KVM):

  • BIOS hosts: boot Discovery, OS installer and local disk
  • UEFI hosts: boot Discovery, OS installer

UEFI hosts with OVMF firmware do not boot the local disk after an OS has been installed. Instead they return to the UEFI system menu.

What I’ve seen so far:

  • Host boots
  • Starts PXE booting
  • Downloads iPXE config
  • Exits to UEFI system menu

Selecting ‘Continue’ or ‘Reset’ repeats the above sequence.

Selecting a hard disk manually will allow the system to boot up properly.

Expected outcome: UEFI systems to boot local disk when they need to

Foreman and Proxy versions:
Foreman 2.1
Katello 3.16

Distribution and version:
CentOS7

Other relevant data:
All tested systems are based on KVM

What exactly is in this config?

What is your boot order? You are expected to have the following in your EFI:

  1. Boot from PXE/UEFI
  2. Boot from the first HDD

The boot order is indeed PXE -> HDD -> CDROM (even though the CDROM is empty).

The config itself contained what I expect, ‘just’ the exit command.

I can also reproduce this by hitting CTRL+B while booting from PXE to open the command prompt. Once I enter exit it returns to the system menu.

If you replace the exit with

sanboot --no-describe --drive 0x80 

will it work? This should work for BIOS but you are in UEFI, so I am not sure. Try to google that, if you find this let’s change our default template then to “if bios then print exit else print something else”.

I found forum posts on the ipxe forums mentioning the same advice, but alas, it didn’t work.

I’ll do some further digging :slight_smile:

You can use HTTP UEFI boot via Grub2. No PXE/TFTP involved. This is fully documented.

Thanks! I’ll look into it :slight_smile: