PXE Install with Grub2

I have been installing IPFire with PXE which has worked well. I’m also running several utilities and different installs. I haven’t updated IPFire yet.
The pxelinux.cfg/default menu looks like this:

label IP Fire
	MENU LABEL IPFire 27 Core 166
	KERNEL /memdisk
	INITRD /images/ipfire/ipfire-2.27.x86_64-full-core166.iso
	APPEND iso raw

Now because new motherboards require efi I need to do this same thing with grub2. efi and BIOS use the same menu.
The menuentry look like this:

menuentry "IPFire" {
	set gfxpayload=keep
	set ISO="${IMG}/ipfire/ipfire-2.27.x86_64-full-core166.iso"
	set DEV="${devroot}${ISO}"
	loopback loop "(${root})/${ISO}"
    echo "Loading IPFire Core 166.  Takes 10 Minutes"
	linux '(loop)/boot/isolinux/vmlinux'
	initrd '(loop)/distro.img'
}

This is not a good idea and it’s probably wrong. So my question is what do I put in here to run ipxe.kpxe ?

Thanks

Are you sure you need grub? When I was researching the topic I found this from the redhat documentation and it seems possible to serve an img when efi is required.

1 Like

The comment about Grub2 was just for a little background. I have already converted most of our stuff to Grub2. My question is how to use ipxe.kpxe with either bios or grub2:
Grub:

menuentry "IPFire" {
	set gfxpayload=keep
     echo "Loading IPFire.  Takes 4 Minutes"
	linux16 /$IMG/memdisk harddisk
	initrd16 /$IMG/ipfire/ipxe.kpxe

}

pxeboot.cfg/default:

label IP Fire
       MENU LABEL IPFire 
       KERNEL /img/memdisk
        INITRD /img/ipfire/ipxe.kpxe
       APPEND raw

What is the correct way of doing those?
Thanks