# How To: PXE Boot Edge Computer

**URL:** <https://www.wago.community/t/how-to-pxe-boot-edge-computer/232>\
**Category:** Hardware and Linux\
**Tags:** edge-computer, linux\
**Created:** [August 31, 2022, 1:05am UTC](https://www.wago.community/t/how-to-pxe-boot-edge-computer/232 "2022-08-31T01:05:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WagoKurt](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagokurt/32/11_2.png) [@WagoKurt](https://www.wago.community/u/WagoKurt)\
**Post date:** [August 31, 2022, 1:05am UTC](https://www.wago.community/t/how-to-pxe-boot-edge-computer/232/1 "2022-08-31T01:05:58Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/f245c23e395ceb9b3fcc5e7740dcb329ce2553a2.jpeg)

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.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/fdab54dbdc06ca6a40f859606565decbc85503f9.jpeg)

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](https://linuxconfig.org/how-to-configure-a-raspberry-pi-as-a-pxe-boot-server)

1. 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.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/14508c5105d95a933e5ab1638f8a8d583b204146.png)

2. 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

```auto
sudo apt-get update && sudo apt-get install dnsmasq pxelinux syslinux-efi ufw
sudo mkdir /mnt/data/netboot/{bios,efi64}

```

```auto
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.c32
> 
> ```
> LABEL 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
> 
> ```

```auto
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

```auto
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.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/9a1c14fad2c7b9bfd7f0dffba5f52afdac54e584.jpeg)  
Select PXE as the boot location.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/1fb7ee58ca71430130edd3ea370a91aabe0506d3.jpeg)

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;

[![](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/c071cf3fad0de5aaec86665416e486f780d3cc63.jpeg "PXE Booting") ](https://www.youtube.com/watch?v=dqI6G_-jwyE)

To learn more about the Preboot eXecution Environment, see this wiki;  
[https://en.wikipedia.org/wiki/Preboot\_Execution\_Environment](https://en.wikipedia.org/wiki/Preboot_Execution_Environment)

---

<div class="post-metadata">

**Author:** ![quenorha](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/quenorha/32/429_2.png) [@quenorha](https://www.wago.community/u/quenorha)\
**Post date:** [August 31, 2022, 6:18am UTC](https://www.wago.community/t/how-to-pxe-boot-edge-computer/232/2 "2022-08-31T06:18:35Z")

</div>

Very interesting Kurt, thanks !
