Pxe with uefi katello 3.16

Problem: OS not booting from local disk after loded usin pxe+uefi

Expected outcome: it will boot from local disk after loading

Foreman and Proxy versions: 3.16


When I install OEL8 using pxe+UEFI. OS is installed.It did not boot OS from local disk after loading.
i got below error
I used below templates for loading for
provisioning twmplate: Kickstart template
PXEGrub2 template: Kickstart PXE Grub2 template

This file was deployed via ‘Kickstart PXEGrub2’ template

set default=0
set timeout=10

menuentry ‘Kickstart PXEGrub2’ {
linuxefi boot/oel8-2-AVDTsljARKBR-vmlinuz ks= network ksdevice=bootif ks.device=bootif BOOTIF=00-00-50-56-8d-d7-c4 kssendmac ks.sendmac inst.ks.sendmac BOOTIF=01-$net_default_mac
initrdefi boot/oel8-2-AVDTsljARKBR-initrd.img

PXELinux template: Preseed PXE GRub2

This file was deployed via ‘Preseed PXEGrub2’ template

Supported host/hostgroup parameters:

blacklist = module1, module2

Blacklisted kernel modules

lang = en_US

System locale

set default=0
set timeout=10

menuentry ‘Preseed PXEGrub2’ {
linux boot/oel8-2-AVDTsljARKBR-vmlinuz interface=auto url= ramdisk_size=10800 root=/dev/rd/0 rw auto hostname=ol08tst02.sstech.com console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA keyboard-configuration/layoutcode=us localechooser/translation/warn-light=true localechooser/translation/warn-severe=true locale=en_US BOOTIF=01-$net_default_mac
initrd boot/oel8-2-AVDTsljARKBR-initrd.img

Please help me

Can you do this command on the OEL8:

find /boot

Pastebin the output. It probably have a different /EFI subtree structure.

[root@ol08ctl00 ~]# find /boot

That looks ok. Is the VM really UEFI one? If you use PXEGrub2 UEFI with a VM which is BIOS it wont work. Weird, investigate why grub cannot see the ESP partition, it should load.

Alternatively, just swap the EFI boot order and boot from drive, you can use efibootmgr to swap it back if you want to reinstall.

I’m using below Templates.

PXE Loader is Grub2 UEFI

I tried to boot from local disk but it shows no local disk. I tried both first disk and second disk. got below error. couldn’t go to efi boot manager

PXELinux template is incorrect. You need to have Kickstart PXELinux there, definitely not Preseed and definitely not PXEGrub2 - it has a different syntax.

From all the pictures, it really looks like your VM does not have any disk. That’s quite a challenge to boot a system without any disk. :slight_smile:

FYI: What you see (grub menu) has been downloaded from network. This will work even if there is no disk.

I changed to Kickstart default PXELinux. it could find the disk and loading os to disk.But still not booting from local disk after loading OS

below is showing from network

Switch it to boot from drive in VM settings. Does it boot?

when I hit escape when I get start from EFI network. it will load from local disk
Usually in pxe boot it try to boot from network couple of seconds and switch to local disk and boot from local disk.
But here I have to hit escp manually when it shows start from Network then it boot from local disk.
If I don’t hit escp it will try to chainload Grub2 EFI from ESP and shows error and shutdown server after 2 mins

when I change to boot from hardisk in vm settings. it is working

Can you drop to grub2 shell and invoke ls command to show all devices (hd0 etc). Maybe vmware has a different device name…


If I disable boot from EFI Network in vm bios settings it load from local harddisk after loading OS. When we install OS it usually try boot from Network for few seconds and switch to local disk and boot OS. But here in PXE+UEFI it doesn’t work.

Good, do you see the ESP files on (hd0,gpt1) then? You can list files with:

ls (hd0,gpt1)/directory1/directory2/etc

What the grub2 configuration does is it tries to find /EFI/redhat/grubx64.efi file:

search --file --no-floppy /EFI/redhat/grubx64.efi

Try that command, it should find and set root variable to the correct (hd0,gptX) entry:


Please take a lookk below

Weird, everything looks good. Now, try this:

search --file --no-floppy --set=chroot /EFI/redhat/grubx64.efi
if [ -f ($chroot)/EFI/redhat/grubx64.efi ]; then
  chainloader ($chroot)/EFI/redhat/grubx64.efi
  echo "EFI file NOT found"

This is how our template sets up TFTP template to chain load from hard drive.

If you use SecureBoot, try to load shimx64.efi instead. I see that Oracle Linux does not have shim.efi file, weird.

in which template I have to edit ?

Not a template, perform those commands in grub shell to see where it breaks.

got below error