PXE Booting Blues... (Under construction)
I intend to document the stuff I learned so far in regards to pxe booting and FOG’s interaction.
Before I get into some of the details of what I’ve learned chatting with Tom and through chats with others like Sebastian, I want to cover some of the basics about pxe booting a target computer into the FOG environment.
PXE booting (known then as diskless booting) has been around in the *nix world since the mid to late 1980s. During that time it was known as network bootstrapping. In 1999 Intel defined a standard called “Wired for Management” which defined the structure that is now known as Pre eXecution Environment (PXE). If I remember correctly on-board PXE code was added as part of PC 2001 design specification by Intel (PC 201 specs also meant the death of the ISA bus). Prior to the PC 2001 specification the PXE boot code was typically added to the network adapter in a PXE boot ROM.
Booting the FOG client OS (I still don’t have a good name for the operating system that runs on the target computer, which does the actual work of imaging the target. For this document it will be known as FOS) requires several services to work in concert. If one actor drops the note the whole concert is ruined. To get the FOS system running the following actors are required. DHCP, TFTP, IPXE, and HTTP.
When the target computer is powered on and pxe booting is selected, the first thing the PXE code on the target does is attempt to acquire an IP address from the local DHCP server. Once the target has an IP address, it again queries the DHCP server for its environment. This is where the target computer learns about 2 specific and important dhcp options. These important dhcp settings are option 66 (Boot server IP) [in our case the FOG server] and option 67 (Boot file name) [in our case the iPXE network boot firmware]. These two options are passed into the PXE client’s network boot code. The typical network boot code reaches out to device referenced by dhcp option 66 (Boot server IP) using the TFTP (trivial file transfer protocol) to download the file referenced by dhcp option 67 (Boot file name). Once this file is downloaded from the tftp server the pxe boot strap code then chain executes to the file that was downloaded. In the case of the FOS booting, the file that is downloaded is a flavor of iPXE http://ipxe.org/ which is intended to extend the simple capabilities of the built in PXE environment found on the target computer’s NIC rom.
The iPXE network boot firmware then reconnects to the device pointed to by dhcp option 66 (i.e. the FOG server) and downloads its configuration file to know what to do next. The configuration file iPXE retrieves (via tftp) is the file default.ipxe. This config file instructs the iPXE network boot firmware to reconnect to the FOG server this time using the http protocol to access the boot.php web page. The iPXE environment also passes the mac address of the target computer to the boot.php page as a parameter. This web page then interacts with the FOG database to constructs the FOG boot menu. In its simplest form the iPXE network boot firmware is an executing operating system with a limited command set. You’ll notice that the PXE boot rom built into the computer will query for a IP address from your dhcp server, and then when the iPXE network boot firmware starts, it will again requrey for an IP address form your dhcp server. And when FOS starts it will again require for an IP address from your dhcp server. It sounds redundant, but each environment is an independent operating system.
FOG Boot Menu
The fog boot menu is created based on the current state of the target computer. If there is a pending job, the target computer is instructed to execute the job. If no job is pending the default FOG menu is displayed. The fog boot menu is constructed of iPXE commands to execute once the IT technician selects an option. For example if you were to look at the iPXE commands for Quick Registration. You would see the iPXE instruction to download the bzImage(32) kernel (the FOS operating system) and execute it with certain parameters as well as the instruction to download the inits(_32).xz (the FOS virtual hard drive). Both of these files will be downloaded to the target computer’s RAM over the http protocol and then executed.
Once both files required to boot FOS has been transfered to the target computer, the iPXE code chain boots the bzImage (FOS kernel) which begins execution and starts the FOS booting. During the booting process the FOS kernel connects to the downloaded virtual hard drive and starts the init process to boot the entire FOS environment. Again FOS will query your dhcp server for its IP address then execute the commands issued by the FOG Server.
More to come soon
Wayne Workman last edited by
I still don’t have a good name for the operating system that runs on the target computer which does the actual work of imaging the target. For this document it will be known as FOS
FOS it shall be named.