Knowledgebase
ThinLinX Support > ThinLinX Help Desk > Knowledgebase

Search help:


Can I install/upgrade/run TLXOS via PXE boot?

Solution

Yes, except on early models of Raspberry Pi.  Pis earlier than the Pi 3 can't network boot at all, the Pi 3B's network boot firmware is so buggy as to be unusable, and while the the Pi 3B+ can network boot, its firmware will never attempt network boot if an SD card is present.  You can, however, boot the Raspberry Pi 3B+ in "diskless" mode, i.e. with no local mass storage device.  X86 platforms can also boot diskless, although in the RePC case it requires TLXOS 4.6.0 or later.

The Pi 4B is capable of both PXE boot modes (provisioning and diskless), but depending on how recently you bought it, it may require an EEPROM upgrade first, and you will need to change the default EEPROM boot order, because by default it will never attempt network boot (it will boot from SD card only).

Only Ethernet is supported - PXE booting via WiFi is not possible.  On x86 platforms, TLXOS PXE boot services support UEFI PXE boot as well as legacy PXE boot.

To set up PXE boot provisioning or diskless boot, you must first install one instance of TLXOS on the type of device you want to deploy, using either SD card imaging (RPi / RPi IoT) or a USB stick (other).  You can then use TMS or the local configuration tool (Tlxconfig) to promote that device to a PXE server.  In TMS, select Device->Network Configuration->Optional Services->Configure PXE Server option, or in Tlxconfig, select Enable PXE Server in the Misc tab, and provide the necessary details.  If you have no other local DHCP server, you can optionally choose to have the PXE server function as a general purpose DHCP server by selecting "Respond to all DHCP requests", otherwise the device will only respond to PXE boot requests.

Please note that this service will clash with any other PXE boot service on the same IP subnet or VLAN, including other types of TLXOS devices.  In other words, only a Pi can boot Pis, only a RePC can boot RePCs, and so forth, and if you want to use PXE boot for either provisioning or diskless boot of TLXOS devices then you must ensure that these devices are separated by IP subnet or VLAN such that types are not mixed, and that there is no other PXE service (e.g. for server provisioning) operating in each subnet/VLAN.

Moreover, since we use ATA-over-Ethernet (AoE), which is an OSI layer 2 rather than an OSI layer 3 protocol, TLXOS PXE boot clients must be on the same Ethernet segment as their boot server.  AoE services on the same Ethernet will span IP subnets and VLANs, ignoring all layer 3 separation, but we have used different AoE addresses for different firmware types so that TLXOS boot services will not clash in this situation.  The boot server does not have to have a static IP address (it can itself be a DHCP client).

Here's how it works:

  1. dnsmasq on the designated PXE server receives a broadcast DHCP solicitation from a device identifying itself as a PXE client and offers a temporary DHCP lease.  The response includes boot file details, nominating the PXE server as a TFTP bootstrap server.  If the PXE server is in diskless mode, it will immediately begin preparing a 512 MB loopback filesystem just for that particular client in a file in /config/midlayers, and will share it via AoE when ready.
  2. dnsmasq on the designated PXE server provides the client requested file(s) via TFTP.
  3. On x86 platforms only, the PXE server provides the client with an iPXE boot ROM that is configured to automatically boot from a fixed ATA-over-Ethernet (AoE) address.
  4. On x86 platforms, the PXE server provides read-only access to the block device containing either the /tfm (Provision mode) or /boot (Diskless mode) filesystem via the AoE protocol.  On the RPi platform, the PXE server provides the client each of the files that the client requests, from its own /boot area, via TFTP.
  5. The client proceeds to boot using the files/filesystems provided.  The client's initramfs will try to use the AoE protocol to discover all of the other filesystems that it needs (the root filesystem, /boot, /tfm, and (diskless mode only) /config).  In each case except /config, the PXE server will be sharing its own copies of these read-only vie AoE.  Client-specific /config areas (prepared in step #1) will be shared read-write via AoE to that particular client's MAC address only.
  6. The client will either run the ThinLinX Maintenance Mode image (which is the exact same thing as the USB stick installer) to bootstrap TLXOS, or boot the PXE server's copy of TLXOS but using its own AUFS midlayer (/config), depending on whether you are using Provisioning or Diskless Mode.  At this point the O/S will issue a non-PXE-boot DHCP request, and unless you have chosen to allow the PXE server respond to all DHCP requests, will therefore get an IP address from your regular DHCP server and stop using the temporary one offered by your PXE server.  Because AoE is a layer 2 protocol, clients do not need to have fixed IP address assignments (reservations) on your regular DHCP server, and can even have static (non-DHCP) IP address assignments; their use of the DHCP during the PXE boot phase is only temporary.

If TLXOS is already installed on a local storage device, the Provisioning mode installer will check to see whether the version of TLXOS that it has detected via PXE boot is later than what is installed locally, and if it is - and if you have a paid license that is still within its support period - it will upgrade the locally installed O/S rather than reinstall it. The USB stick installer will do the same thing (because it uses the same code).  In this way, you can perform a rolling TLXOS upgrade without using TMS by first upgrading your PXE server using a USB stick, then performing a one-time-only Provision mode PXE boot of clients of the same type on the same IP subnet/VLAN and Ethernet segment.

Related articles Can I upgrade TLXOS without using TMS or reinstalling from scratch?
Can TMS be used to manage remote devices connecting via the Internet?
I can't boot the USB installer! What's wrong?
Network booting TLXOS RPi from an x86 server
The RePC ISO installer wants me to use TMS. Why do I have to do this?
Article details
Article ID: 26
Category: Frequently Asked Questions
Date added: 2019-06-01 01:17:18
Views: 976

 
« Go back