Network Boot
PXE booting with SYSTEM
and /storage
mounted via NFS is supported on Generic x86_64 and Raspberry Pi devices. In the following writeup the server is Ubuntu 18.04 LTS.
Client (LibreELEC)
Download the image for your device.
Create a readonly nfs export and place
KERNEL
andSYSTEM
files into itCreate a read-write nfs export for storage
Create
pxelinux.cfg
with the MAC address of your device, e.g.90-91-92-93-94-95
Edit this file and add:
Replace 192.168.0.1
with the NFS server IP address. The overlay
parameter is not required if you only intend to boot one system. LibreELEC is now configured to boot using TFTP and NFS!
Server (Ubuntu)
In Ubuntu we need to install and configure DHCP, TFTP, and NFS services:
DHCP
Edit /etc/dhcp/dhcpd.conf
and change the DHCP range
if needed. Create entries in the host
section for your client(s):
Edit /etc/default/isc-dhcp-server
to set the interface name handling DHCP requests:
NFS
Create the directories that will contain your /storage
userdata and TFTP boot files, e.g.
Copy the KERNEL
and SYSTEM
files into the /mnt/tftpboot
directory:
Then add the following lines to the /etc/exports
file:
TFTP
Create directories for the TFTP bootfiles. In this example they are served from a different disk:
You may also want to copy the KERNEL
and SYSTEM
files to /mnt/tftpboot
Add the following lines to /etc/default/tftpd-hpa
and save the file:
Create /mnt/tftpboot/pxelinux.cfg/default
and insert the following:
Firewall
If using the default Ubuntu firewall (UFW) add the following rules to allow ports for TFTP (69) and ONRPC (111):
Clients normally connect to the NFS server on random ports, so it the firewall is active "mountd" needs to be told to use a fixed port allowed through the firewall, or boot will hang.
Edit /etc/default/nfs-kernel-server
and replace the current RPCMOUNTDOPTS
line. In the example below 8765
is a randomly chosen port:
Create a matching firewall rule to allow the port:
Services
And finally, start services:
Last updated