iPXE

This chapter contains the following sections:

About iPXE

iPXE is an open source network-boot firmware. iPXE is based on gPXE, which is an open-source PXE client firmware and bootloader derived from Etherboot. Standard PXE clients use TFTP to transfer data whereas gPXE supports more protocols.

Here is a list of additional features that iPXE provides over standard PXE:

  • Boots from a web server via HTTP, iSCSI SAN, FCoE, and so on

  • Supports both IPv4 and IPv6

  • Netboot supports HTTP/TFTP, IPv4, and IPv6

  • Supports embedded scripts into the image or served by the HTTP/TFTP, and so on

  • Supports stateless address autoconfiguration (SLAAC) and stateful IP autoconfiguration variants for DHCPv6. iPXE supports boot URI and parameters for DHCPv6 options. This depends on IPv6 router advertisement.

In addition, we have disabled some of the existing features from iPXE for security reasons such as:

  • Boot support for standard Linux image format such as bzImage+initramfs/initrd, or ISO, and so on

  • Unused network boot options such as FCoE, iSCSI SAN, Wireless, and so on

  • Loading of unsupported NBP (such as syslinux/pxelinux) because these can boot system images that are not properly code-signed.

Netboot Requirements

The primary requirements are:

  • A DHCP server with proper configuration.

  • A TFTP/HTTP server.

  • Enough space on the device's bootflash because NX-OS downloads the image when the device is PXE booted.

  • IPv4/IPv6 support—for better deployment flexibility

Guidelines and Limitations

PXE has the following configuration guidelines and limitations:

  • While auto-booting through iPXE, there is a window of three seconds where you can enter Ctrl+B to exit out of the PXE boot. The system prompts you with the following options:

    Please choose a bootloader shell:
    1). GRUB shell
    2). PXE shell
    Enter your choice:
  • HTTP image download vs. TFTP—TFTP is UDP based and it can be problematic if packet loss starts appearing. TCP is a window-based protocol and handles bandwidth sharing/losses better. As a result, TCP-based protocols support is more suitable given the sizes of the Cisco NX-OS images which are over 250 Mbytes.

  • iPXE only allows/boots Cisco signed NBI images. Other standard image format support is disabled for security reasons.

Boot Mode Configuration

VSH CLI

switch# configure terminal
switch(conf)# boot order bootflash|pxe [bootflash|pxe]
switch(conf)# end

Note

The keyword bootflash indicates it is Grub based booting.


For example, to do a PXE boot mode only, the configuration command is:

switch(conf)# boot order pxe

To boot Grub first, followed by PXE:

switch(conf)# boot order bootflash pxe

To boot PXE first, followed by Grub:

switch(conf)# boot order pxe bootflash


Note

If you set boot order pxe bootflash on supervisor A+ or B+, the supervisor continually tries to PXE boot. Supervisor A+ or B+ does not switch over to boot from GRUB without manual intervention.


If you never use the boot order command, by default the boot order is Grub.


Note

The following sections describe how you can toggle from Grub and iPXE.


Grub CLI

bootmode [-g|-p|-p2g|-g2p]

Keyword

Function

-g

Grub only

-p

PXE only

-p2g

PXE first, followed by Grub if PXE failed

-g2p

Grub first, followed by PXE if Grub failed

The Grub CLI is useful if you want to toggle the boot mode from the serial console without booting a full Cisco NX-OS image. It also can be used to get a box out of the continuous PXE boot state.

iPXE CLI

bootmode [-g|--grub] [-p|--pxe] [-a|--pxe2grub] [-b|--grub2pxe]

Keyword

Function

– – grub

Grub only

– – pxe

PXE only

– – pxe2grub

PXE first, followed by Grub if PXE failed

– – grub2pxe

Grub first, followed by PXE if Grub failed

The iPXE CLI is useful if you wish to toggle the boot mode from the serial console without booting a full Cisco NX-OS image. It also can be used to get a box out of continuous PXE boot state.

Verifying the Boot Order Configuration

To display boot order configuration information, enter the following command:

Command

Purpose

show boot order

Displays the current boot order from the running configuration and the boot order value on the next reload from the startup configuration.