This will explain the steps to set up a basic PXE Server with which to test the PXE boot capabilities of the Edge Computers (752-9800 & 752-940X). PXE allows a device to boot completely from the network and does not require an internal SSD. This can be an advantage with a large number of devices, where loading software would be otherwise difficult to manage. PXE ensures that each time the device boots it loads the latest version of OS and applications from a central location.
PXE uses DHCP to find the PXE server. Since most networks have a DHCP server already, and you can only have one DHCP server on your network, this example uses the WiFi to communicate with the existing network and a local isolated network segment is used to test the PXE devices. In this way, there are no conflicts for the test setup as shown above. The Edge devices do not need internet access, only a network connection to the PXE server.
These are the commands used on the Raspberry Pi 4. The rPi is useful for benchtesting as there are many tutorials available and the OS is well documented/supported. You should be able to set this up on a Linux Server with a little modification.
See following webpage from which this How To is based:
https://linuxconfig.org/how-to-configure-a-raspberry-pi-as-a-pxe-boot-server
-
Image an SD card using Raspberry Pi Imager software (free utility) with the Raspberry Pi 64 Bit Lite image to a blank SD card. Click on the gear icon and enable ssh. Enter your wifi and password if needed at this time, then click the Write button.
-
Insert the SD card into the rPi4 and boot from it. Then ssh to the rPi and type the following commands.
sudo nano /etc/dhcpcd.conf
Edit this file to assign a static IP for eth0 network.
Example static IP configuration:
interface eth0
static ip_address=192.168.0.10/24
static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.0.1
sudo apt-get update && sudo apt-get install dnsmasq pxelinux syslinux-efi ufw
sudo mkdir /mnt/data/netboot/{bios,efi64}
sudo cp \
/usr/lib/syslinux/modules/bios/{ldlinux,vesamenu,libcom32,libutil}.c32 \
/usr/lib/PXELINUX/pxelinux.0 \
/mnt/data/netboot/bios
sudo cp \
/usr/lib/syslinux/modules/efi64/ldlinux.e64 \
/usr/lib/syslinux/modules/efi64/{vesamenu,libcom32,libutil}.c32 \
/usr/lib/SYSLINUX.EFI/efi64/syslinux.efi \
/mnt/data/netboot/efi64
sudo mkdir /mnt/data/netboot/boot
sudo mkdir /mnt/data/isos
sudo mkdir /mnt/data/netboot/boot/amd64/debian/11
sudo wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.4.0-amd64-netinst.iso
sudo mount -o loop -t iso9660 /mnt/data/isos/debian-11.4.0-amd64-netinst.iso /media
sudo rsync -av /media/ /mnt/data/netboot/boot/amd64/debian/11
sudo umount /media
sudo mkdir /mnt/data/netboot/pxelinux.cfg
Type this into the file, this will add menu selections for the PXE options;
MENU TITLE PXE Boot Menu
DEFAULT vesamenu.c32LABEL local MENU LABEL Boot from local drive LOCALBOOT 0xffff MENU BEGIN amd64 MENU TITLE amd64 MENU BEGIN Debian MENU TITLE Debian LABEL installgui MENU LABEL ^Graphical install KERNEL ::boot/amd64/debian/11/install.amd/vmlinuz APPEND vga=788 initrd=::boot/amd64/debian/11/install.amd/gtk/initrd.gz --- quiet LABEL install MENU LABEL ^Install KERNEL ::boot/amd64/debian/11/install.amd/vmlinuz APPEND vga=788 initrd=::boot/amd64/debian/11/install.amd/initrd.gz --- quiet MENU END MENU END
cd /mnt/data/netboot
sudo ln -rs pxelinux.cfg bios && sudo ln -rs pxelinux.cfg efi64
sudo nano /etc/dnsmasq.conf
Type this into the file;
port=0
interface=eth0
dhcp-range=192.168.0.100,192.168.0.200,12h
enable-tftp
tftp-root=/mnt/data/netboot
pxe-service=x86PC,“PXELINUX (BIOS)”,bios/pxelinux.0
pxe-service=x86-64_EFI,“PXELINUX (EFI)”,efi64/syslinux.efi
log-queries
log-facility=/var/log/dnsmasq.log
sudo ufw allow 67/udp
sudo ufw allow 69/udp
sudo ufw allow 4011/udp
sudo systemctl restart dnsmasq
Now go into the BIOS of the Edge Computer and enable PXE Boot.
Select PXE as the boot location.
Press F4 to save changes and reboot the Edge computer. It should now boot the ISO file for Debian net install, which demonstrates PXE works.
Here is what it looks like;
To learn more about the Preboot eXecution Environment, see this wiki;
https://en.wikipedia.org/wiki/Preboot_Execution_Environment