Since the BL460c Gen9 came out, I have been trying to UEFI PXE boot so that I can avoid changing the Server to use Legacy BIOS mode. Originally the documentation was fairly slim. I found some non-HP specific UEFI PXE information from RHEL and various OS providers. The common theme was to set a special UEFI option in DHCPD (or whatever IP distributed method used) to distinguish between UEFI and Legacy boot. What was NOT common was the boot file that was returned, some used ELILO, some used GRUB2.
I found a post on the HP forums on how to setup ELILO to UEFI PXE boot an os, but the problem was that I wanted to PXE boot the scripting toolkit (or the SPP) and the assumption with the ELILO setup was that the PXE media (ie the image being booted into) would provide a UEFI image that understood that it was being PXE booted (or at least that’s what it seemed like). I was not able to get the Scripting Toolkit to work using this method.
I did some more searching and I found a great forum post in the Mellanox forums that describes how to UEFI PXE boot a DL380 Gen 9 using a few files provided by RHEL 7.
Read the forum post for the details, I will only note what I did to specifically PXE boot the Scripting Toolkit.
You want the shim.efi and grubx64.efi from the RHEL 7 server packages (refer to the forum post).
I placed these files into my RHEL 6 kickstart server’s tftp directory (I use to /tftpboot/EFI/redhat/ for EFI)
When a PXE boot happens, first the shim.efi file be grabbed and loaded, and then the grubx64.efi will be grabbed and loaded (I also tried without the shim.efi and it works). At this point the loaded EFI image will go back to the tftp server and look for a config file. I already use the HEXNUMBER of the IP for the name of the config file for Legacy BIOS, so I used grub.cfg-HEXNUMBER for the EFI config file. I placed this file into /tftpboot/EFI/redhat/
This is the contents of the config file, note that I use a custom version of the initrd that is provided in the toolkit.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
insmod efi_gop insmod efi_uga insmod font if loadfont /efi/boot/font.pf2 then insmod gfxterm set gfxmode=1024x768 set gfxpayload=keep fi terminal_input console terminal_output gfxterm # # New media parameter # media=net -- toolkit media is mounted over the network # media=cdrom -- toolkit media is accessible via CD/DVD ROM drive (including iLO virtual media) # media=usb -- toolkit media is accessible via a USB key # set timeout=0 set GRUB_DEFAULT=0 menuentry "HP Scripting Toolkit Linux Edition 10.02" { echo "Loading Kernel..." linuxefi /TOOLKIT/vmlinuz root=/dev/ram0 rw nameserver=DNSIP netmask=255.255.255.0 gateway=192.168.150.1 ipaddress=192.168.150.14 ks=nfs://KSERVERIP/kickstart/ksfiles/ks-testGen9.cfg esxiver=esxi5.5u2 ramdisk_size= ide=nodma ide=noraid pnpbios=off network=1 sstk_mount=KSERVERIP:/opt/SSSTK sstk_mount_type=nfs sstk_mount_options=ro,nolock echo "Loading Ram Disk..." initrdefi /TOOLKIT/initrd-custom.img } |
This is the specific entry from my dhcpd.conf, this should be covered in the forum post as well:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
host testGen9 { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address 192.168.150.14; next-server KSERVERIP; if option arch = 00:07 { filename "/EFI/redhat/shim.efi"; }else { filename "pxelinux.0"; } } |