[syslinux] One DHCP/PXE config for BIOS, EFI32, and EFI64 clients?

Ady ady-sf at hotmail.com
Thu Sep 19 10:02:07 PDT 2013


> Dear all,
> I'd like to have a DHCP/PXE server for different arch of clients, i.e. 
> BIOS, EFI32, and EFI64 clients.
> As described here:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720589
> What Daniel has proposed 
> (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720589#10) should 
> work, i.e. Using a file called pxelinux.cfg/bios containing the 
> following 2 lines:
> ===============================
> PATH bios/
> INCLUDE /pxelinux.cfg/default
> ===============================
> will solve this problem.
> However, with the following line specified in dhcpd.conf:
> ===============================
> option pxelinux.configfile "pxelinux.cfg/bios";
> ===============================
> then only the config file pxelinux.cfg/default will be used. Those file 
> names like:
> pxelinux.cfg/01-88-99-aa-bb-cc-dd
> pxelinux.cfg/C000025B
> pxelinux.cfg/C000025
> pxelinux.cfg/C00002
> pxelinux.cfg/C0000
> pxelinux.cfg/C000
> pxelinux.cfg/C00
> pxelinux.cfg/C0
> pxelinux.cfg/C
> 
> won't be loaded if I want to use some specific config file for some machine.
> 
> So, is there any method that I can make it so that those config files 
> based on MAC address and IP address could be loaded?
> Thanks in advance.
> 
> Steven.
 
There might be an alternative (and possibly others too): let the user 
select the appropriate firmware from within pxelinux.cfg/default.

So, keep using the same method you used in previous versions, instead 
of selecting the Syslinux cfg / firmware from the DHCP snippet that 
Daniel posted.

If you actually get to pxelinux.cfg/default (as you probably used to 
when you were not selecting a specific machine), _then_ you choose 
the firmware.

Try something similar to the following (I haven't tested it myself).

# pxelinux.cfg/default
# --------------------
PROMPT 1
SAY ************************************
SAY * Type "bios", "efi32", or "efi64" *
SAY ************************************
DISPLAY message.txt
# message.txt is optional e.g for initial help

LABEL bios
CONFIG /pxelinux.cfg/bios.cfg
# Note: Daniel used "pxelinux.cfg/bios"
# instead of my "pxelinux.cfg/bios.cfg"

LABEL efi32
CONFIG /pxelinux.cfg/efi32.cfg
# Note: Daniel used "pxelinux.cfg/efi32"
# instead of my "pxelinux.cfg/efi32.cfg"

LABEL efi64
CONFIG /pxelinux.cfg/efi64.cfg
# Note: Daniel used "pxelinux.cfg/efi64"
# instead of my "pxelinux.cfg/efi64.cfg"

# ____________________


# pxelinux.cfg/bios.cfg
# ---------------------
PATH /bios/
INCLUDE /pxelinux.cfg/common_config_files.cfg
# The pxelinux.cfg/common_config_files.cfg
# is what Daniel used in his pxelinux.cfg/default.

# _____________________


# pxelinux.cfg/efi32.cfg
# ----------------------
PATH /efi32/
INCLUDE /pxelinux.cfg/common_config_files.cfg
# The pxelinux.cfg/common_config_files.cfg
# is what Daniel used in his pxelinux.cfg/default.

# ______________________


# pxelinux.cfg/efi64.cfg
# ----------------------
PATH /efi64/
INCLUDE /pxelinux.cfg/common_config_files.cfg
# The pxelinux.cfg/common_config_files.cfg
# is what Daniel used in his pxelinux.cfg/default.

# ______________________


If in the future someone creates some c32 module that would be 
capable of identifying the corresponding adequate firmware (and then 
choosing a label accordingly), then the user would not need to select 
it manually.

Hopefully, someone else might suggest other alternatives.

Regards,
Ady.



More information about the Syslinux mailing list