- Boot and install flexVDI USB Live Client on one computer, which will act as the PXE and DHCP server. Then open a terminal to log in as root.
You will have to configure a static IP address for the server. Use the nmcli tool:
# nmcli con show NAME UUID TYPE DEVICE eth0 e0b3394c-9463-4fa5-a415-cde1e6f1badd 802-3-ethernet eth0 # nmcli con mod eth0 connection.autoconnect true ipv4.method manual ipv4.addresses 10.0.0.1/24
You can add other settings that you need, like
- Make sure a file for your network connection has been created in
/etc/NetworkManager/system-connectionsand persist it to rootcopy.
Run the pxe-server command. The first time you run it, it will generate an empty
/etc/pxe-server.conffile and complaint that complain that it is not configured:
# pxe-server Configure /etc/pxe-server.conf properly
Edit that file, it contains the following environment variables that define how PXE clients configure their network:
# IP range and netmask for PXE clients # e.g. 10.0.0.50,10.0.0.250 PXE_RANGE= PXE_NETMASK= # Gateway and DNS server. Optional, default to this host. PXE_GATEWAY= PXE_DNS= # dnsmasq extra options DNSMASQ_EXTRA=""
- PXE_RANGE: Defines the DHCP IP address range to use for PXE clients.
- PXE_NETMASK: Netmask of the DHCP range.
- PXE_GATEWAY: IP address of the network gateway. If it is not set, PXE clients will use this server also as gateway. In that case, you will have to configure it to route network traffic.
- PXE_DNS: IP address of the DNS server. If it is not set, PXE clients will use this server also as DNS server.
- DNSMASQ_EXTRA: Additional options to pass to dnsmasq (the DHCP and DNS server). This is useful if you want to provide the clients with additional information in the DHCP response (e.g. NTP server).
- Fill in the correct values for your network, and persist it to the rootcopy directory.
- Edit the file
/mnt/sda1/boot/syslinux.cfg(BIOS boot) or
/mnt/sda1/EFI/BOOT/syslinux.cfg(UEFI boot) and append the '
pxe' kernel parameter to your default boot entry. This will start the pxe server on boot.
Run the pxe-server command again to start the PXE server now. You should see an output like this:
Preparing PXE environment - wait a while... storage= cheatcode not found or not valid, clients wont be able to save the changes over network. PXE services should be started now
Then the following directories and files should have been created:
/srv/pxe/boot. Contains the pxelinux files to boot the PXE clients, for both BIOS and UEFI.
/srv/pxe/porteus. It is bind-mounted to
/mnt/sda2/porteus, so that the PXE clients can load the OS files. Besides, the directory
/srv/pxe/porteus/rootcopy.pxeis created, where you can persist the configuration files for the PXE clients independently from the configuration of the server.