Table of Contents

Firmware platform setting

Name

  platform

Details

Type String
DHCP option number not applicable
ISC dhcpd syntax not applicable

Examples

Display the firmware platform

  iPXE> show platform
  builtin/platform:string = pcbios

Test whether or not current platform is (U)EFI

  iseq ${platform} efi && goto is_efi || goto not_efi

Description

Specifies the firmware platform on which iPXE is running. Possible values are:

pcbios Standard PC BIOS
efi (U)EFI
linux Linux (for development and testing purposes only)

See also

Notes

If you are using a sophisticated DHCP server such as ISC dhcpd, then you may use the contents of the DHCP request to differentiate between BIOS and EFI clients. The DHCP Client Architecture option (code 93) will indicate the client architecture as specified by RFC 4578:

DHCP option 93 Client architecture
0 Standard PC BIOS
6 32-bit x86 EFI
7 64-bit x86 EFI
9 64-bit x86 EFI (obsolete)
10 32-bit ARM EFI
11 64-bit ARM EFI

You could use this to determine which version of iPXE to provide to a particular client. For example, in /etc/dhcpd.conf:

  option client-arch code 93 = unsigned integer 16;
  if exists client-arch {
     if option client-arch = 00:00 {
       filename "bin/undionly.kpxe";
     } elsif option client-arch = 00:06 {
       filename "bin-i386-efi/ipxe.efi";
     } elsif option client-arch = 00:07 {
       filename "bin-x86_64-efi/ipxe.efi";
     } elsif option client-arch = 00:09 {
       filename "bin-x86_64-efi/ipxe.efi";
     } elsif option client-arch = 00:0a {
       filename "bin-arm32-efi/ipxe.efi";
     } elsif option client-arch = 00:0b {
       filename "bin-arm64-efi/ipxe.efi";
     }
  }