Skip to content

Instantly share code, notes, and snippets.

Last active November 3, 2022 08:47
Show Gist options
  • Save skottler/80a18086991367566aa54b24a11bb8d2 to your computer and use it in GitHub Desktop.
Save skottler/80a18086991367566aa54b24a11bb8d2 to your computer and use it in GitHub Desktop.

Setting up with an EdgeRouter

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


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

Basic setup

With that out of the way, let's get started.

First, we're going to configure the main and contrib components with a mirror for Wheezy:


set system package repository wheezy components 'main contrib'
set system package repository wheezy distribution wheezy 
set system package repository wheezy url


Update the apt cache with our newly configured repo using sudo apt-get update.

Next, install TFTPD: sudo apt-get install tftpd-hpa. The service will be running once the package is installed. It doesn't require any further configuration.

Setup TFTP components

Download the kpxe image for and set the permissions properly:

sudo curl -o /srv/tftp/
sudo chown tftp:tftp /srv/tftp/

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

$ tftp
tftp> get
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


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 {
     lease 86400
     start {

That's it!

Copy link

bswinnerton commented Dec 5, 2017

This awesome 🤘, thank you for writing this up. It worked great on my ER-X.

Copy link

Thanks for this, Sam! I had been meaning to experiment with and this worked like a charm for me.

Copy link

laradji commented Dec 23, 2019

Hey there,

I had to add this to make it work with systemd on edgeOS 2.x :


Copy link

laradji commented Dec 23, 2019

It look like you can user the dnsmasq tftp server too :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment