Skip to main content

Optional Step: Configure a Windows/Linux DHCP server for Medulla PXE boot (BIOS & UEFI)

Applies to: Medulla Imaging / PXE
Version: All
Environment: On-Premise
Category: DHCP / PXE / Imaging

Objective

This FAQ explains how to configure a DHCP server to enable PXE booting of machines with Medulla, in both BIOS and UEFI x64 modes.

The DHCP server must be able to send the correct boot file based on the type of machine booting via PXE.


How It Works

When a machine boots via PXE, it contacts the DHCP server to obtain:

  • An IP address
  • The address of the Medulla PXE server
  • The boot file to load

The two main DHCP options are:

DHCP Option Role Expected Value
66 PXE server address Medulla server IP address
67 PXE boot file Depends on BIOS or UEFI mode

Medulla boot files

Boot type Architecture Boot file
BIOS x86 / x64 bootloader/undionly.kpxe
UEFI x64 bootloader-uefi64/ipxe.efi

Important:
The boot file is different for BIOS and UEFI machines. An incorrect value in option 67 prevents PXE booting.


Configuring a Windows DHCP Server

1. Open the DHCP console

  1. Open the DHCP console on the Windows server.
  2. Expand the IPv4 node.

2. Create Vendor Classes

Vendor classes allow the DHCP server to recognize whether the machine is requesting a PXE boot in BIOS or UEFI mode.

Create the UEFI x64 class

  1. Right-click on IPv4.
  2. Click Define Vendor Classes.
  3. Click Add.
  4. Enter the following values:
Field Value
Display Name PXEClient (UEFI x64)
Description PXEClient:Arch:00007
ASCII PXEClient:Arch:00007

Click OK.

Create the x86/x64 BIOS class

  1. Click Add again.
  2. Enter the following values:
Field Value
Display Name PXEClient (x86 & x64 BIOS)
Description PXEClient:Arch:00000
ASCII PXEClient:Arch:00000

Click OK.


3. Create the DHCP policy for BIOS machines

  1. In your DHCP scope, right-click Policies.
  2. Click New Policy.
  3. Give the policy a descriptive name.
Field Value
Policy Name PXEClient (BIOS x86 & x64)
Description PXE boot file for BIOS machines
  1. Click Next.
  2. In the conditions section, click Add.
  3. Select the Vendor PXEClient (BIOS x86 & x64) class.
  4. Check the box for " Add a wildcard (*)."
  5. Confirm, then click Next.
  6. Configure the following DHCP options:
Option Value
066 MEDULLA_SERVER_IP
067 bootloader/undionly.kpxe

Complete the wizard by clicking Next, then Finish.


4. Create the DHCP policy for UEFI machines

  1. In your DHCP scope, right-click Policies.
  2. Click New Policy.
  3. Give the policy a descriptive name.
Field Value
Policy Name PXEClient (UEFI x64)
Description PXE boot file for UEFI x64 machines
  1. Click Next.
  2. In the conditions section, click Add.
  3. Select the Vendor PXEClient (UEFI x64) class.
  4. Check the box for " Add a wildcard (*)."
  5. Confirm, then click Next.
  6. Configure the following DHCP options:
Option Value
066 MEDULLA_SERVER_IP
067 bootloader-uefi64/ipxe.efi

Complete the wizard by clicking Next, then Finish.


5. Remove global PXE options

To avoid conflicts, PXE options should not be configured both at the global scope level and in DHCP policies.

Verify that the following options are not configured in the scope’s general settings:

  • 060
  • 066
  • 067

Important:
If options 66 and 67 are set globally, they may conflict with BIOS/UEFI policies and prevent the correct boot file from being sent.


Configuring a Linux DHCP Server

On a Linux DHCP server, the principle is to detect the machine’s architecture using DHCP option 93.

Option 93 value Machine type Boot file
0000 BIOS bootloader/undionly.kpxe
0007 UEFI x64 bootloader-uefi64/ipxe.efi

Example ISC DHCP Configuration

Adjust the values between ##...## to match your environment.

# PXE definitions
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr code 7 = ip-address;

# PXE Architecture
option arch code 93 = unsigned integer 16;

# 0000 = BIOS
# 0007 = UEFI x64

class "PXE" {
    match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
    vendor-option-space PXE;
    option PXE.mtftp-ip 0.0.0.0;

    if option arch = 00:07 {
        filename "bootloader-uefi64/ipxe.efi";
    } else {
        filename "bootloader/undionly.kpxe";
    }
}

class "Etherboot" {
    match if substring(option vendor-class-identifier, 0, 11) = "Etherboot-5";
    option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
    option vendor-class-identifier "Etherboot-5.0";
    vendor-option-space PXE;
    option PXE.mtftp-ip 0.0.0.0;
}

subnet ##MEDULLA_NETWORK## netmask ##MEDULLA_NETMASK## {
    option broadcast-address ##MEDULLA_BCAST##;
    option domain-name ##MEDULLA_DOMAIN##;
    option domain-name-servers ##MEDULLA_DNS##;
    option routers ##MEDULLA_GW##;

    pool {
        range ##MEDULLA_START## ##MEDULLA_END##;
        next-server ##MEDULLA_IP##;
    }
}

Example of values to replace

Variable Description Example
##MEDULLA_NETWORK## DHCP network 192.168.1.0
##MEDULLA_NETMASK## Network mask 255.255.255.0
##MEDULLA_BCAST## Broadcast address 192.168.1.255
##MEDULLA_DOMAIN## Domain name domain.lan
##MEDULLA_DNS## DNS server 192.168.1.1
##MEDULLA_GW## Gateway 192.168.1.254
##MEDULLA_START## DHCP Range Start 192.168.1.100
##MEDULLA_END## End of DHCP range 192.168.1.200
##MEDULLA_IP## Medulla PXE server IP address 192.168.1.10

Post-configuration checks

  • Restart the DHCP service after making changes.
  • Verify that the workstations are successfully obtaining an IP address.
  • Test a machine in BIOS mode.
  • Test a machine in UEFI mode.
  • Verify that the correct boot file is sent based on the boot mode.

Restarting the Linux DHCP service

systemctl restart isc-dhcp-server

Check the status

systemctl status isc-dhcp-server

Common errors

The BIOS machine does not boot via PXE

  • Verify that option 67 points to bootloader/undionly.kpxe.
  • Verify that the machine boots correctly in Legacy/BIOS mode.
  • Verify the reachability of the Medulla server from the client network.

The UEFI machine does not boot via PXE

  • Verify that option 67 points to bootloader-uefi64/ipxe.efi.
  • Verify that the machine boots successfully in UEFI mode.
  • Verify that Secure Boot is disabled if necessary.

The wrong boot file is being sent

  • Check the Vendor classes on Windows DHCP.
  • Check the DHCP policies in the BIOS and UEFI.
  • Verify that options 66 and 67 are not set globally in addition to the policies.

The PXE client obtains an IP address but does not download the bootloader

  • Check option 66 or next-server.
  • Check connectivity between the client workstation and the Medulla server.
  • Check the network flows required for PXE.

Reference Values

Element BIOS UEFI x64
Vendor Class PXEClient:Arch:00000 PXEClient:Arch:00007
Option 66 MEDULLA_SERVER_IP MEDULLA_SERVER_IP
Option 67 bootloader/undionly.kpxe bootloader-uefi64/ipxe.efi