1

I am trying to setup an ipxe environment on a vmware.

I would like to configure the setup with UEFI.

I have setup a ubuntu-server and configured it as pxe-server.

via downloading ipxe, isc-dhcpd, tftp-hpa and ngnix.

The dhcp isc-dhcp.conf looks like

subnet 192.168.101.0 netmask 255.255.255.0 {
 range 192.168.101.50 192.168.101.100;
}

# add the following to /usr/local/etc/dhcpd.conf 
option client-arch code 93 = unsigned integer 16;

if exists user-class and option user-class = "iPXE" {
  filename "http://192.168.101.10/test.ipxe";
} else {
  if exists client-arch {
     if option client-arch = 00:00 {
       filename "undionly.kpxe";
     } elsif option client-arch = 00:07 {
       filename "grubx64.efi";
     } elsif option client-arch = 00:09 {
       filename "grubx64.efi";
     }
  }
}

and tftp root has been configured to serve grubx64.efi.

When I boot a network a client, I get the grub command prompt, where I am expecting to get a grub menu and select OS to boot.

enter image description here

( echo $prefix, points to folder /EFI/ubuntu , I have also tried configuring the grub in that folder along with grub.cfg .i.e. in root of tftpfolder.

what I am missing here kindly advice, Once I start getting menu I will configure the grub.cfg to load the OS.

NiKiZe
  • 1,189
  • 7
  • 17

1 Answers1

0

This is due to how iPXE works. There is a few different ways around this. One answer can be seen at https://serverfault.com/a/1069487/187998 where iPXE is built with some features disabled/enabled to allow for grub to find it's place in the world.

Another is to use some hacks via for example wimboot, to provide grub with a virtual filesystem that grub can use to load it's configuration from, see https://forum.ipxe.org/showthread.php?tid=10739&pid=18277#pid18277

However there is one hack that works, using wimboot, What you do is that you imgfetch all files that you need to have available, The bootable file that you want to boot needs to be named bootx64.efi localy which can be don with imgfetch -n bootx64.efi file://grubx64.efi and finally you chain to wimboot and that should create a virtual VFAT fs (which can be read by grub), and then boots bootx64.efi which is your grub.

imgfetch is the same thing as initrd and -n is the shorthand option for --name which you can find in the documentation.

With all this said, you should probably decide between iPXE and grub, and not try to use both.

NiKiZe
  • 1,189
  • 7
  • 17