Network Booting with netboot.xyz & OPNsense
Network booting is useful when you want to image a machine without having to carry around a USB drive. My main use case for setting this up is to eventually netboot raspberry pi's and mount their boot drives over NFS.
Resources
- netboot.xyz
- General steps to setting up netbooting on OPNsense by u/Asche77
- In-depth guide on netbooting with OPNsense
- Complete netbootxyz/unifi/proxmox guide by TechnoTim
Related
What is what
- OPNsense IP is
192.168.1.1
- TFTP server will be
192.168.1.1
- DHCP server is
192.168.1.1
- netbootxyz server is
192.168.1.11
How To
netboot.xyz Docker Setup
- Setup is pretty easy, just choose your install method. I'll use a docker compose file to install the container on a Debian LXC Container.
version: "2.1"
services:
netbootxyz:
image: ghcr.io/netbootxyz/netbootxyz
container_name: netbootxyz
volumes:
- ./config:/config
- ./assets:/assets
ports:
- 3000:3000
- 69:69/udp
- 8080:80
restart: unless-stopped
TFTP Server & OPNsense Settings
-
Install the TFTP server on OPNsense by going to [System] -> [Plugin] -> search for
tft
, and installos-tftp
-
The server won't start unless the
/usr/local/tftp
directory exists, so create it. -
Download the netboot.xyz efi files from the releases page and place them in the directory you created. You can use the fetch command in freebsd like
fetch https://github.com/netbootxyz/netboot.xyz/releases/download/2.0.82/netboot.xyz.efi
I'll download the following:
- netboot.xyz-arm64.efi
- netboot.xyz.efi
- netboot.xyz.kpxe
-
Add your netboot server to your DHCP server by going to [Services] -> [ISC DHCPv4] -> [Interface] -> [Network booting].
-
Add your netboot server under [Services] -> [ISC DHCPv4] -> [Interface] -> [TFTP server].
- You should be able to now boot from the network