This was a port of an old article from my gitbook.com page. The information within may be out of date.
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 on 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 Up the Root Folder#
- Login to 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 set the root of your TFTP server below this box
- (Optional) Under advanced settings you can enable file transfer logs
- Click Apply
- Using your system’s file browser navigate to the network share (e.g.
\\synology.home.local\PXE
)
Adding an Image or Three#
I found it easist to start with using a Gen 1 machien 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 shared drive and copy one or both of these files to the newly created bin/folder.
Testing the TFTP Server#
The easist 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>
Recieved 91646 bytes in 0.1 seconds
tftp>quit
Congratulations! If you see the #### bytes received, you can successfuly download a bootable image via TFTP.
Configured DHCP options for PXE#
Resources that were helpful in figuring out how to ork with dnsmasq and ER-X.