Preboot Execution Environment
Preboot Execution Environment (PXE), ovvero ambiente di esecuzione pre-boot, è un metodo per eseguire il boot di un computer utilizzando una connessione di rete ethernet ed il supporto di un server, e senza bisogno di una unità disco fisso.
PXE fu introdotto come parte del framework Wired for Management di Intel, ed è descritto nella specifica (v2.1) pubblicata da Intel e Systemsoft il 20 settembre,1999. PXE utilizza molteplici protocolli di rete:
Inoltre, utilizza concetti come GUID/UUID e Universal Network Device Interface ed estende il firmware del client PXE (il computer che viene avviato via PXE con un ulteriori API.
Funzionamento
Il firmware cerca un PXE redirection service, ovvero un server DHCP che fornisca i parametri necessari per conoscere i server PXE disponibili e il nome del network bootstrap program (NBP) da scaricare. Se ne trova uno, il firmware lo scaricherà via TFTP da uno dei boot server, memorizzandolo nella propria RAM, ne verificherà la correttezza e lo eseguirà.
Piattaforme supportate
PXE è stato progettato per essere utilizzabile su molte architetture. La specifica v2.1 definisce identificatori di architettura per 6 tipi di sistemi, compresi IA64 Itanium architecture e Alpha. Tuttavia, la specifica copre competamente solo Intel 32 Bit (IA-32). Intel ha incluso PXE nella Extensible Firmware Interface per IA-64, creando uno standard de facto con la sua implementazione.
PXE Client/Server Protocol
The PXE protocol is approximately a combination of DHCP and TFTP, albeit with subtle modifications to both. DHCP is used to locate the appropriate boot server or servers, with TFTP used to download the initial bootstrap program and additional files.
To initiate a PXE bootstrap session the PXE firmware broadcasts a DHCPDISCOVER packet extended with PXE-specific options (extended DHCPDISCOVER) to port 67/UDP (DHCP server port). The PXE options identify the firmware as capable of PXE, but they will be ignored by standard DHCP servers. If the firmware receives DHCPOFFERs from such servers, it may configure itself by requesting one of the offered configurations.
Proxy DHCP
If a PXE redirection service (Proxy DHCP) receives an extended DHCPDISCOVER, it replies by broadcasting a DHCPOFFER packet extended with PXE-specific options (extended DHCPOFFER) to port 68/UDP (DHCP client port). This packet has to be broadcast, since most PXE clients will configure themselves by DHCP and cannot provide their IP address in the extended DHCPDISCOVER. Therefore the client is identified by its GUID/UUID.
An extended DHCPOFFER contains mainly:
- a PXE Discovery Control field to decide whether Multicasting, Broadcasting or Unicasting is to be used for contacting PXE boot servers
- a list of IP addresses of each available PXE Boot Server Type
- a PXE Boot Menu with each entry representing a PXE Boot Server Type
- a PXE Boot Prompt telling the user to press <F8> to see the boot menu
- a timeout to launch the first boot menu entry if it expires.
The Proxy DHCP service may also be run on the same host as the standard DHCP service. Since both services cannot share port 67/UDP, the Proxy DHCP runs on port 4011/UDP and expects the extended DHCPDISCOVER packets from PXE Clients to be DHCPREQUESTs. The standard DHCP service has to send a special combination of PXE options in its DHCPOFFER, so the PXE client knows to look for a Proxy DHCP on the same host, port 4011/UDP.
Boot Server
To contact any PXE Boot Server the firmware must have an IP address and has to consider all information from exactly one extended DHCPOFFER. After choosing an appropriate PXE Boot Server Type the firmware multicasts or unicasts a DHCPREQUEST packet extended with PXE-specific options (extended DHCPREQUEST) to port 4011/UDP or broadcasts it to port 67/UDP. This packet mainly contains the PXE Boot Server Type and the PXE Boot Layer, allowing to run many boot server types with one boot server daemon (or 'program'). The extended DHCPREQUEST may also be a DHCPINFORM.
If a PXE Boot Server receives an extended DHCPREQUEST as described above and if the boot server is configured for the requested PXE Boot Server Type and client architecture, it must respond by sending back an extended DHCPACK - a DHCPACK-packet extended with PXE-specific options - to the extended DHCPREQUEST's source port.
An extended DHCPACK contains mainly:
- the complete file path to download the NBP via TFTP.
- PXE Boot Server Type and PXE Boot Layer the boot server answered to
- the multicast TFTP configuration, if MTFTP as described in the PXE specification should be used.
A PXE Boot Server as described in version 2.1 of the PXE specification should support the Boot Integrity Services (BIS) as described in the BIS specification v1.0 published by Intel. The BIS allow a PXE Client to verify downloaded NBPs using a checksum file which is downloaded from the same boot server as the NBP was. To get the file path of this credentials file another exchange of extended DHCPREQUEST and extended DHCPACK is required.