Loading an Image using PXE

Here is a writeup to load a QNX image using PXE aware NIC.
Comments are welcome.

> What is needed?

  • PXE enabled BIOS
  • Network card that supports PXE
  • BOOTP Server (BOOTP Desktop from Weird Solutions)
  • TFTP Server (TFTP Desktop from Weird Solutions)
  • QNX image

> Overview

  • Client with BIOS support and PXE enabled NIC boots
  • BIOS portion of the client makes a BOOTP request
  • BOOTP Server responds with IP configuration for the client, Name of the boot image and the location of the TFTP Server
  • when the Client recieves the information it contacts the TFTP Server asking for the boot image
  • TFTP Server sends the boot image file and then the client executes it
  • Boot image loads the Kernel (Main image) according to what is specified in the configuration file.
  • Client then executes the Main image
  • At the end of this execution - the boot process is complete

> Preparing for Network Boot

  • Make certain NIC supports PXE - the card I used had i82544 Controller, which supports PXE initiated boot.

  • Enable Network Boot related options in the BIOS
    Usually there are three places to enable this - enable network Boot, enable Ethernet Configuration and select the Network Boot Device with top priority. Please make note of the MAC Address of the Ethernet Configuration that has been enabled.

  • Preparing boot image
    PXEGRUB 0.95 was used with support for E1000 (compatible with i82544 Controller). It can be built either on a QNX OS or Linux OS. If QNX OS is used to build PXEGRUB - please make sure the patch for QNX is included. The output of PXEGRUB is typically referred to as “pxegrub”.For details on how to build the pxegrub please refer to the PXEGRUB documentation.

  • Install the BOOTP server (Here I am using the BOOTP Desktop from Weird Solutions)
    Though any BOOTP Server can be used - BOOTP Desktop from Weird solutions is very appropriate - simple UI, license for single user and non-commercial use is free. The following instructions are based on BOOTP Desktop v1.5 (Release build 1244)

  • download and install BOOTP

  • Click on Server | Configure

  • In the “General” tab - enable detailed logging and specify the name of the log file. Keep the default for all the other fields.

  • In “Clients” tab - press on New button and enter the MAC Address that was recorded earlier. selection the following options as the Configured options

    • “Boot file” then click on edit button to specify the location of the pxegrub - the default directory is recommended - C:\boot\grub\pxegrub
    • “DHCP Address Lease Time” and then click on edit button to set Infinite check box.
    • “Gateways” - click on the edit button to specify the IP Address of the Local gateway.
    • “IP Address” click on the edit button to specify the IP Address for the NIC.
    • "Subnet mask’ to specify the subnet mask for the network.
    • Click on Apply button
    • Click on OK button
  • TFTP Server (Here I am using the TFTP Desktop from Weird Solutions)
    Any TFTP Serve can be used - even the one that comes with the Eclipse IDE can be used.The following instructions are based on TFTP Desktop v2.5

  • click on Server | Properties

  • In the “General” tab - please specify the Default Directory - in this case to c:\boot\grub

  • Enable Log file transfers and specify the name for the Log file.

  • In security, make sure it is “No security”

    • Click on Apply button
    • Click on OK button
  • QNX image
    A Multiboot compliant QNX Image is required - “bios.boot” in a regular build file is replaced with “elf.boot”. So
    [virtual=x86,bios +compress] .boot =
    changes to
    [virtual=x86,elf +compress] .boot =

compile with -vvv options
mkifs -vvv netMainImage.src netMainImage.elf
Please make sure the warnings and error messages are understood
the name of the QNX image is netMainImage.elf

  • menu.lst ties the pxegrub and netmainImage.elf together - here is the relevant portion of the menu.lst
    kernel (nd)/boot/grub/netmainImage.elf

> Suggested sequence
Setup TFTP Server and BOOTP Server
Make pxegrub available
Build .elf image
Copy the .elf image to the directory pointed in the menu.lst
Powerup the System
Make sure the BIOS has PXE enabled

Great job!
Thanks for sharing!