all my base are belong to me and me alone

11/16/2011

Specifying a PXE Boot Server on OpenWRT

This was super-frustrating, which I would have written as "uber-frustrating" if I was trying to be a cool geek. I already had a TFTP server setup with pxelinux.0 and the gang. I had this working from a few months ago when I was still using DD-WRT on my router.

Well, I recently switched to OpenWRT and I haven't needed to network boot since then. So when the need arose yesterday, I had to work on getting it setup in OpenWRT. If you're reading this, then you likely searched everywhere just like me and only found references to making OpenWRT itself a PXE boot server. I didn't want to do that. I had everything else set up!

After much searching, I finally found the answer: https://wiki.xkyle.com/Pxe#Using_Openwrt.27s_DnsMasq

Basically, it can't (currently) be done through the GUI unless there's a dnsmasq add-on I don't know about (truthfully, I didn't look). Login to your router via telnet or ssh and navigate to /etc/config. Here, edit the file 'dhcp' using your favorite editor.

Under the 'dnsmasq' section, add the line: 'option' 'dhcp_boot' 'pxelinux.0,,192.168.1.2', where 192.168.1.2 is replaced by whatever your TFTP server's IP address is. Save the file and reset dnsmasq by sending this command: '/etc/init.d/dnsmasq restart'

Tada! You may also just send these commands:

uci set dhcp.@dnsmasq[0].dhcp_boot=pxelinux.0,,192.168.1.2
uci commit

The end.

0 comments: