[ipxe-devel] On using cached dhcp info with kkpxe image

Jedrzej Kalinowski kalinoj1 at iem.pw.edu.pl
Mon May 2 22:23:16 BST 2011


 I decided to get rid of redundant dhcp query that happened when 
 autobooting after fetching undionly.kkpxe image. And I'd like to share 
 some thoughts.

 1. I couldn't find the needed option on: http://ipxe.org/howto/dhcpd 
 (maybe this doc page concerns a stable version, not top of the git tree)

 I've found in dhcp.h that the needed option is DHCP_EB_USE_CACHED that 
 means 0xb2 or 178 decimal.
 So, it could be added to the doc page like this (together with 
 scriptlet option):
 option ipxe.cached-dhcp code 178 = unsigned integer 8;
 option ipxe.scriptlet code 81 = string;

 2. My plan was to download undionly.kkpxe using the legacy PXE client 
 and then after iPXE start - run the scriptlet with instruction to 
 chainload some image with http. Unfortunately I ran into infinite loop, 
 as cached dhcp data contained "filename" field - it caused iPXE to 
 download kkpxe image again and again and again..

 I coped with this the following way:
 I've compiled iPXE image with embedded script like this:
   chain ${scriptlet}

 and dhcpd configuration like:
 filename "iPXE/VER/undionly.kkpxe";
 option ipxe.cached-dhcp 1;
 option ipxe.scriptlet "http://bootserver/bootpath/pxeboot.cgi";

 I did work, but it's a kind of hack. Maybe dhcp command run from cached 
 dhcp settings should not fetch the filename? Or some adjustment in 
 main.c should be done?

 Best regards,
 Jedrzej Kalinowski


More information about the ipxe-devel mailing list