PXE

From Codtech

Visit http://codtech.com/cult

or The CULT of CODTECH
free download from SourceForge

Contents

Introduction

The PXE (Preboot eXecution Environment) is an Intel specification part of the Wired for Management (WfM) initiative.
It is selected as the main boot method of PXES Universal Linux Thin Client, but certainly other boot methods can also be used.

PXE Boot Sequence
Enlarge
PXE Boot Sequence

PXE imposes a limit on the NBP image size that could be transfered over the network and loaded into the computer, that's why the need of a Boot Loader arise. Using a Boot Loader you can transfer a small image first and when the Boot Loader has control it is responsible for the transfer of the kernel and PXES ram disk image.

PXE DHCP Options

DHCP Options

Tag name Tag # Length Type Data field
#UUID 97 & 61 17 Type(1)=0 UUID(16)
Client network interface identifier 94 3 Type(1)=1 UNDI-Major(1)-Minor(1)
Client system arch 93 2

0 = IA x86 PC(2)
1 = NEC/PC98(2)
2 = IA64 PC.(2)
3 = DEC Alpha (2)
4 = ArcX86 (2)
5 = Intel Lean Client (2)

Parameter request list 55 varies

This parameter request list is the minimum that must be implemented by PXE Base-Code option ROMs.
subnet(1), router(3), vendor(43), class(60) vendor options (128 through 135).

#Class identifier 60 32

“PXEClient:Arch:xxxxx:UNDI:yyyzzz” – used for transactions between client and server. “PXEServer” – used for transactions between servers. (These strings are case sensitive. This field must not be null terminated.) The information from tags 93 and 94 is embedded in the Class Identifier string xxxxx = Client Sys Architecture 0 – 65535
yyy = UNDI Major version 0 – 255
zzz = UNDI Minor version 0 – 255
Delimiter is “:” (colon)

Vendor options 43 varies

Encapsulated options below (#PXE Options). Multiple DHCP_VENDOR options can be used.

Message type 53 1

1=DHCPDISCOVER, 2=DHCPOFFER, 3=DHCPREQUEST, 4=DHCPDECLINE, 5=DHCPACK, 6=DHCPNAK, 7=DHCPRELEASE, 8=DHCPINFORM

Server ID 54 4 a1, a2, a3, a4
Message length 57 2 Max DHCP message length(2)
End of options 255 None

PXE Options

Tag name Tag # Length Type Data field
#PXE_MTFTP_IP 1 1 Multicast IP Address(4)

Multicast IP address of boot file. ||

#PXE_MTFTP_CPORT 2 1 UDP Port Number Intel order(2)

UDP port that client should monitor for MTFTP responses.

#PXE_MTFTP_SPORT 3 4 UDP Port Number Intel order(2)

UDP port that MTFTP servers are using to listen for MTFTP open requests.

#PXE_MTFTP_TMOUT 4 varies Open Timeout(1)

Number of seconds a client must listen for activity before trying to start a new MTFTP transfer.

#PXE_MTFTP_DELAY 5 varies Reopen Timeout(1)

Number of seconds a client must listen before trying to restart a MTFTP transfer.

#PXE_DISCOVERY_CONTROL 6 1 (Bit field. Bit 0 is the least significant bit.)(1)

bit 0 = If set, disable broadcast discovery.
bit 1 = If set, disable multicast discovery.
bit 2 = If set, only use/accept servers in #PXE_BOOT_SERVERS.
bit 3 = If set, and a boot file name is present in the initial DHCP or ProxyDHCP offer packet, download the boot file (do not prompt/menu/discover).
bit 4-7 = Must be 0.
If this tag is not supplied all bits assumed to be 0.

7 6 5 4 3 2 1 0
0 0 0 0 no prompt #PXE_BOOT_SERVERS only disable multicast disable broadcast
DISCOVERY_MCAST_ADDR 7 4 Multicast IP-addr(4)

Boot Server discovery mu lticast IP address. Boot Servers capable of multicast discovery must listen on this multicast address. This option is required if the multicast discovery disable bit (bit 1) in the #PXE_DISCOVERY_CONTROL option is not set

#PXE_BOOT_SERVERS 8 varies

Boot Server type(2)

Type Server
0 PXE bootstrap server
1 Microsoft Windows† Boot Server
2 Intel LCM Boot Server
3 DOS/UNDI Boot Server
4 NEC ESMPRO† Boot Server
5 IBM WSoD Boot Server
6 IBM LCCM† Boot Server
7 CA Unicenter† TNG Boot Server
8 HP OpenView† Boot Server
9 through 32767 reserved
32768 through 65534 vendor use
65535 PXE API Test server
PXE_BOOT_MENU 9 varies
PXE_MENU_PROMPT 10 varies
PXE_MCAST_ADDRS_ALLOC 11 8
#PXE_CREDENTIAL_TYPES 12 varies
#PXE_BOOT_ITEM 71 4
PXE_END 255 None

UUID

The Client UUID field specifies a universally unique ID (UUID), retrieved from the client system.

The client must have a UUID and must report it in tag #97 and #61.

Option 97: UUID/GUID-based Client Identifier (17 bytes)

See UUID programming notes in Section 5.2.1 UUID Support in PXE spec. The Client Network Interface Identifier specifies the version of the UNDI API (described below) that will support a universal network driver. The UNDI interface must be supported and its version reported in tag #94.

Option 94: Client Network Device Interface (3 bytes)

The UNDI type field must have a major version of 2 and a minor version of 1 for this version of the protocol. (Future versions may recognize more tags based on this version number.) The Client System Architecture identifier specifies the system architecture of the client.

This identifier is required and must be reported in tag #93.

Option 93: Client System Architecture (2 bytes)

Class identifier

Option 60: Vendor class identifier = "PXEClient:Arch:00000:UNDI:002001"

PXE_MTFTP_IP

Image:Important.pngIMPORTANT:

MTFTP is indicated as recommended by the specification so it is probable to find PXE implementation lacking of this protocol.

These options define the client/server port numbers and open/re-open timeouts that must be used in MTFTP open/read requests.

MTFTP IP Addr is the multicast IP address the client must use to receive the image file.

Option 43: Vendor-Specific Information (PXEClient)
       Suboption 1 : PXE mtftp IP = 239.255.0.1

PXE_MTFTP_CPORT

MTFTP Client UDP is the port the client must listen on to receive the image file.

PXE_MTFTP_SPORT

MTFTP Server UDP is the port the client must use to communicate with the MTFTP service. The client binds to the MTFTP UDP port and waits for the duration of the MTFTP transmission start delay to receive packets.

Option 43: Vendor-Specific Information (PXEClient)
       Suboption 3: PXE mtftp server port = 22276

PXE_MTFTP_DELAY

MTFTP Start Delay is the timeout to begin receiving image file packets before attempting to become the MTFTP acknowledging client (master client) upon initial connection to the MTFTP service.

PXE_MTFTP_TMOUT

MTFTP Timeout Delay is the delay multiplied by the percentage of the file received, the client must wait before attempting to become the MTFTP acknowledging client (master client) upon cessation of packet transmissions during an ongoing MTFTP transfer.

PXE_DISCOVERY_CONTROL

These options control the type of boot server discovery mechanisms used by clients. Clients must use discovery methods in this order:

  1. Multicast. If the client supports multicast discovery and multicast discovery is enabled (PXE_DISCOVERY_CONTROL, option #43 tag #6 does exist OR it does exist and bit1 is not set.) and a multicast discovery IP address is available. (DISCOVERY_MCAST_ADDR exists.)
  2. Broadcast. If broadcast discovery is enabled, (PXE_DISCOVERY_CONTROL, option #43 tag #6 doesn’t exist OR it does exist and bit 0 is not set).
  3. Unicast. If a Boot Server list is available, (PXE_BOOT_SERVERS, Option #43 tag #8).

If PXE_DISCOVERY_CONTROL bit 2 is set, the client may still use multicast and broadcast discovery (if it is permitted by bits 0 and 1); but the client may only accept replies from servers that are identified in the #PXE_BOOT_SERVERS option.

More in-depth treatement of this options can be found in PXE:Discovering boot servers.

PXE_BOOT_SERVERS

This option specifies a list of boot server types and their IP addresses.

The code for this option is 8 and its length is variable. It is basically a list containing multiple entries of the following 3 elements.

  • boot server type (2 octets long)
  • number of IP addresses (1 octet long) supporting the above type.
  • IP addresses of those servers ([4 * number of IP addresses] octets long).
   Code   Len      type1   count        'n1' IP addresses
  +-----+-----+-----+-----+-----+-----..-----+-----..----+---
  |  8  |  v  |  t1 |  t2 |  n1 | IP addr 1  | IP addr 2 | . .
  +-----+-----+-----+-----+-----+-----..-----+-----..----+---
      type2    count        'n2' IP addresses
  +-----+-----+-----+-----..-----+-----..----+---
  |  t1 |  t2 |  n2 | IP addr 1  | IP addr 2 | . .
  +-----+-----+-----+-----..-----+-----..----+---

DISCOVERY_MCAST_ADDR

This option specifies the multicast IP address that is used by the client to discover boot servers. The client sends DHCPREQUEST packets to this multicast address.


The code for this option is 7 and its length is 4.

   Code   Len   DISCOVERY_MCAST_ADDR
  +-----+-----+-----+-----+-----+-----+
  |  7  |  4  |  m1 |  m2 |  m3 |  m4 |
  +-----+-----+-----+-----+-----+-----+

PXE_CREDENTIAL_TYPES

The client must fill in this option when requesting credentials (MSbit in layer number is set).

Boot servers must not respond if they do not support the requested credential type. Clients requesting credentials must ignore any server response that does not have the credential option.

Clients must include all the supported credential types when doing a layer zero discovery.

Clients must use the same credential type, selected in the layer zero discovery, for all subsequent layers.

If the client lists more than one credential type in the discover request, the boot server must respond with the one credential type that will be used.

PXE_BOOT_ITEM

This option is required to discover Boot Servers.

Only the client may change the type field; either the client or the server may change the layer field. Layer 0 always indicates the first boot file for a particular Boot Server type.

Boot Servers capable of providing the boot file requested in the PXE_BOOT_ITEM must respond. Boot Servers not capable of providing the boot file requested.

Boot Agents

PXE boot ROMs or flashes come installed on most modern network cards, check card specs if in doubt.
If you want to create PXE-compliant boot PROM for your network card (to use with PXES, for example), check out NetBoot. Image:Pxe.png

3COM Managed Boot Agent

If you have 3Com cards you can upgrade the flash rom with MBA

Intel Boot Agent

[http://support.intel.com/support/network/adapter/pro100/bootagent/index.htm Intel boot agent home].

Boot Diskettes

If your network card does not contains a PXE boot ROM there's still the alternative to create a boot diskette that contains PXE.

Microsoft Remote Installation Services

Remote installation boot floppy (RBFG.exe)

A tool used to generate a remote installation boot floppy disk. The remote installation boot floppy disk is used to start the process of remote operating system installation for computers which lack a supported Pre-Boot eXecution Environment (PXE)-based remote boot ROM.
In the case of PXES you use this diskette to boot the client instead of starting the installation process.
You use rbfg.exe to create a Microsoft® Remote Installation Services (RIS) boot disk that contains a PXE client. This client disk can then be used to network boot client computers that do not contain a PXE enabled ROM.

Argon Technology PXE Boot Agents

Argon provides a variety of boot agents.

Etherboot

Etherboot project also provides PXE boot.

PXE server

Although most DHCP servers (i.e ISC DHCP) can handle PXE requests some advanced configuration options can only be achieved by a PXE server.

IBM pxed for AIX

External Links