Booting with PXE

Overview

Goal: Enable PXE booting on the home network for both BIOS and UEFI machines.

The following tools will be used:

  • Ubiquiti EdgeRouter X w/ dnsmasq for DNS & DHCP

  • Synology will host the TFTP server and images

  • Hyper-V / Parallels will be used for testing

For starters we need an bootable image, I have opted to use netboot for image sources. A suitable alternative would be pxelinux.

Setting up the TFTP server

Before we can tell the machines to boot anything we need to configure the TFTP server. As mentioned this will reside on our Synology. -> https://synology.home.local

Enabling TFTP and setting the root folder

  • Login into the web UI

  • Click on Control Panel

  • Click on File Services

  • Select the TFTP tab

    • Check the box next to "Enable TFTP service"

    • Be sure to the set the root of your TFTP server below this box.

    • Optional: Under advanced settings you can enable file transfer logs if need be.

    • Click Apply

  • Using your system's file browser navigate to the network share. e.g. \\synology.home.local\PXE\ (this folder should be empty for now)

Adding an image or three

I found it easiest to start with using a Gen 1 machine in Hyper-V or even easier to use Parallels and build a legacy (BIOS) machine. And in order to have an image that will boot with BIOS, from the downloads page, you can choose either:

To keep things organized create a folder named bin in the root of your share drive and copy 1 or both of these files to the newly created bin/ folder.

Testing the TFTP server

The easiest way I have found to test is from either WSL or a *nix-based OS, install tftp which is a client. Then you can use the following commands: tftp & get, to verify that you can download the images via TFTP. The output should look like so:

user@localhost:~$ tftp <your synology IP>
tftp> get bin/<image-name>
Received 91646 bytes in 0.1 seconds
tftp>quit

Congratulations if you see the ##### bytes received, you can successfully download a bootable image via tftp.

Configuring DHCP options for PXE

Resource that were helpful in figuring out how to work with dnsmasq and ER-X.

Last updated

Was this helpful?