Skip to content

PXE booting using OpenWRT Kamikaze

My net­work gets its addresses from dns­masq run­ning on the Kami­kaze 8.09 release of Open­WRT. This oper­at­ing sys­tem uses an unusual sys­tem for con­fig­ur­a­tion, and get­ting dns­masq set up for net­work boot­ing took a little bit of effort. So I’m doc­u­ment­ing it here, for either any­body else who’s stuck on it, or for when I inev­it­ably forget.

Edit /etc/config/dhcp, and in the config dnsmasq sec­tion add a line like this. The format is as per the dns­masq man page:

    option dhcp_boot	pxelinux.0,tftp_server_hostname,tftp_server_ipaddr

The init script does all the pars­ing of the dhcp con­fig file, con­vert­ing things in there to cmdline argu­ments to dns­masq. So you need to edit /etc/init.d/dnsmasq, and in the dnsmasq() func­tion add this line:

	append_parm "$cfg" "dhcp_boot" "--dhcp-boot"

The func­tion already has a bunch of append_parm lines. Just search for those and add your new line imme­di­ately under them.

Restart dns­masq and you’re good to go.