@chanstag Well I think I found the issue but there is not much we can do about it. The issue is in the structure of the response from your dhcp server. Basically strings need to be terminated with a null character to define end of string. While I can’t post pictures at the moment, but in the dhcp server response, dhcp response 67 the ipxe.efi is being terminated with 0xFF (which also happens to be 377 octal).
If you look at the pcap with wireshark you can see the very last line is the tftp request for ipxe.efi\377 which lines up with the dhcp server Offer and ACK packets dhcp option 67. If you look at the hex codes after ipxe.efi there is an 0xFF, which should have been 0x00 to signal end of string. While what the dhcp server is sending is not incorrect because there is a byte count for that parameter, some PXE implementations don’t follow the byte count variable, but instead rely on the null character.
So what do we do?
Use dnsmasq on the fog server to supply the pxe boot information.
The quick steps are this.
- Remove the pxe boot information from your router.
- Install dnsmasq service from your linux distribution’s repo
- Make sure its at least version 2.76 by issuing this command at the fog server’s linux command prompt
sudo dnsmasq -vThe version needs to be 2.76 or later.
- Create a configuration file called
- Paste this content into that file.
# Don't function as a DNS server: port=0 # Log lots of extra information about DHCP transactions. log-dhcp # Set the root directory for files available via FTP. tftp-root=/tftpboot # The boot filename, Server name, Server Ip Address dhcp-boot=undionly.kpxe,,<fog_server_IP> # Disable re-use of the DHCP servername and filename fields as extra # option space. That's to avoid confusing some old or broken DHCP clients. dhcp-no-override # inspect the vendor class string and match the text to set the tag dhcp-vendorclass=BIOS,PXEClient:Arch:00000 dhcp-vendorclass=UEFI32,PXEClient:Arch:00006 dhcp-vendorclass=UEFI,PXEClient:Arch:00007 dhcp-vendorclass=UEFI64,PXEClient:Arch:00009 # Set the boot file name based on the matching tag from the vendor class (above) dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,,<fog_server_IP> dhcp-boot=net:UEFI,ipxe.efi,,<fog_server_IP> dhcp-boot=net:UEFI64,ipxe.efi,,<fog_server_IP> # PXE menu. The first part is the text displayed to the user. The second is the timeout, in seconds. pxe-prompt="Booting FOG Client", 1 # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86, # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI # This option is first and will be the default if there is no input from the user. pxe-service=X86PC, "Boot to FOG", undionly.kpxe pxe-service=X86-64_EFI, "Boot to FOG UEFI", ipxe.efi pxe-service=BC_EFI, "Boot to FOG UEFI PXE-BC", ipxe.efi dhcp-range=<fog_server_ip>,proxy
- Be sure to replace
<fog_server_ip>exactly with the IP address of your fog server. Be aware that
<fog_server_ip>appears multiple times in the config file.
- Save and exit your text edit.
- Issue the following command to restart dnsmasq service
sudo systemctl restart dnsmasq
- Ensure that dnsmasq service is running in memory by issuing this command
ps aux|grep dnsmasq. You should see more than one line in the response. If its running then go to step 10.
- Ensure that dnsmasq starts when the system is rebooting with
sudo systemctl enable dnsmasq
- PXE boot a target computer. With skill (luck) you should see the fog iPXE menu.