Ubiquiti EdgeRouter

This document covers how to setup netboot.xyz, a service that provides iPXE-based installation and live boot of a bunch of operating systems, on a Ubiquiti EdgeRouter.

Thanks go to Sam Kottler for originally writing up this how-to. Improve setup robustness by using the embedded TFTP daemon from dnsmasq by Yan Grunenberger instead of external TFTP package.


I’ve made a few assumptions throughout this document that will probably be different for your setup:

  • There is a DHCP pool called LAN
  • The LAN pool manages

Configure tftp support in dnsmasq

By default, dnsmasq is using in the Edgerouter to provide DNS services. In order to enable it :

sudo mkdir /config/user-data/tftproot
sudo chmod ugo+rX /config/user-data/tftproot


set service dns forwarding  options enable-tftp
set service dns forwarding  options tftp-root=/config/user-data/tftproot


Setup TFTP components

Download the kpxe image for netboot.xyz and set the permissions properly:

sudo curl -o /config/user-data/tftproot/netboot.xyz.kpxe https://boot.netboot.xyz/ipxe/netboot.xyz.kpxe
sudo chmod ugo+r /config/user-data/tftproot/netboot.xyz.kpxe

At this point you should be able to use a TFTP client from a client in to fetch the image:

$ tftp
tftp> get netboot.xyz.kpxe
Received 354972 bytes in 2.0 seconds

Configure dhcpd

We’re gonna configure DHCP on the EdgeRouter to serve the right parameters to clients:


set service dhcp-server global-parameters "option client-arch code 93 = unsigned integer 16;"
edit service dhcp-server shared-network-name LAN subnet
set bootfile-server
set bootfile-name netboot.xyz.kpxe


The configuration for the LAN pool should now look something like the following:

skottler@edge1# show service dhcp-server shared-network-name LAN
 authoritative enable
 subnet {
     bootfile-name netboot.xyz.kpxe
     lease 86400
     start {

That’s it!