iPXE discussion forum
[solved] Can dhcpd.conf 'filename' point to a http server? - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: [solved] Can dhcpd.conf 'filename' point to a http server? (/showthread.php?tid=6052)



[solved] Can dhcpd.conf 'filename' point to a http server? - stefanlasiewski - 2012-10-11 00:40

I am attempting to configure my ISC DHCP Server to load undionly.kpxe over TFTP, using the method described at http://ipxe.org/howto/dhcpd

Code:
if exists user-class and option user-class = "iPXE" {
      filename "http://my.web.server/real_boot_script.php";
  } else {
      filename "undionly.kpxe";
  }

Does this require TFTP? Or can I do this load over HTTP?

I ask, because the the gPXE docs at http://etherboot.org/wiki/httpboot suggest that I can load gPXE over HTTP. Am I misunderstanding what they are saying?

Quote:Booting from HTTP with gPXE is as simple as replacing the DHCP filename field with an http:// URL. For example, if you currently have /etc/dhcpd.conf containing

next-server my.tftp.server;
filename "/pxe.0";
then you can just copy pxe.0 to your web server and edit /etc/dhcpd.conf to contain

filename "http://my.web.server/pxe.0";

As does http://ipxe.org/howto/sccm#booting

Quote: You should now be able to configure iPXE to boot from the file sccm.ipxe on your web server. For example, if you are using ISC dhcpd then you can edit /etc/dhcpd.conf to contain

filename "http://my.web.server/sccm.ipxe";



RE: Can dhcpd.conf 'filename' point to a http server? - robinsmidsrod - 2012-10-11 09:03

If you're booting all your machines with iPXE burned into the ROM of the network adapters or always boot iPXE from USB or CD you can just use http:// URLs directly in your DHCP configuration (or you can use an embedded script to skip filename configuration from DHCP at all), because iPXE understands HTTP natively. But that is not the setup most people have, which is why the chainloading feature exists.

It enables you to load iPXE just once from TFTP and then do the rest through HTTP (or some other method). If you want to have chainloading from traditional PXE firmware work you definitely need to have a TFTP server running. But it only needs to contain one file, namely undionly.kpxe (or ipxe.pxe if you prefer to use native iPXE drivers for all your hardware).


RE: Can dhcpd.conf 'filename' point to a http server? - stefanlasiewski - 2012-10-11 17:56

Great! Thank you for the clarification.