Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. 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.
  2. You will have to configure a static IP address for the server. Use the nmcli tool:

    No Format
    # 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 ipv4.gateway and ipv4.dns.

  3. Make sure a file for your network connection has been created in /etc/NetworkManager/system-connections and persist it to rootcopy.
  4. Run the pxe-server command. The first time you run it, it will generate an empty /etc/pxe-server.conf file and complaint that complain that it is not configured:

    No Format
    # pxe-server
    Configure /etc/pxe-server.conf properly


  5. Edit that file, it contains the following environment variables that define how PXE clients configure their network:

    No Format
    # 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=""


    1. PXE_RANGE: Defines the DHCP IP address range to use for PXE clients.
    2. PXE_NETMASK: Netmask of the DHCP range.
    3. 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.
    4. PXE_DNS: IP address of the DNS server. If it is not set, PXE clients will use this server also as DNS server.
    5. 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).
  6. Fill in the correct values for your network, and persist it to the rootcopy directory.
  7. 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.
  8. Run the pxe-server command again to start the PXE server now. You should see an output like this:

    No Format
    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:

    1. /srv/pxe/boot. Contains the pxelinux files to boot the PXE clients, for both BIOS and UEFI.
    2. /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.pxe is created, where you can persist the configuration files for the PXE clients independently from the configuration of the server.

...