Project

General

Profile

Actions

Feature #12434

closed

Allow override of filename options in DHCP host entry

Added by Tim Verhoeven about 9 years ago. Updated almost 8 years ago.

Status:
Rejected
Priority:
Normal
Category:
DHCP
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello,

For me personal this is related to getting UEFI PXE booting to work, but looking at other issues logged this could also be used by other people to play with iPXE e.g.

For the moment Foreman creates an entry in DHCP for each host (if so configured). In this entry the filename is hardcoded to point to "pxelinux.0" in the TFTP root. And I could not find any way to override this value.

I wanted to get UEFI PXE booting to work for my actual servers (IBM Flex nodes) but keep BIOS PXE booting working to to deploy VM's (managed by OpenNebula). So I created this TFTP structure:

  1. ls /var/lib/tftpboot/
    BIOS boot memdisk pxelinux.cfg UEFI
  2. ls /var/lib/tftpboot/BIOS/
    boot chain.c32 linux.c32 menu.c32 pxelinux.0 pxelinux.cfg
  3. ls /var/lib/tftpboot/UEFI/
    boot chain.c32 ldlinux.e64 libutil.c32 menu.c32 pxelinux.0 pxelinux.cfg

The boot and pxelinux.cfg items in the BIOS & UEFI directories are symlinks to the ones in /var/lib/tftpboot. And the UEFI directory contains a pxelinux.0 supporting UEFI from the latest syslinux release.

I've then added this code to the main dhcpd config file:

option architecture-type code 93 = unsigned integer 16;
if option architecture-type = 00:00 {
filename "BIOS/pxelinux.0";
} elsif option architecture-type = 00:09 {
filename "UEFI/pxelinux.0";
} elsif option architecture-type = 00:07 {
filename "UEFI/pxelinux.0";
} else {
filename "BIOS/pxelinux.0";
}

But because Foreman sets the filename for each hosts this mapping of the filename based on the servertype isn't working. So for the moment I just edited the foreman-proxy code to not write out this option anymore. A very crude fix, but it works for me ;)

The simplest fix would be to somewhere add an option to be able to tell Foreman not to add the filename option to each host entry in DHCP. So that the general settings are followed.

The best to fix it would be to allow to set/override the filename depending on HW type, hostgroup, OS or any of other items present in Foreman.


Related issues 2 (0 open2 closed)

Related to Foreman - Tracker #431: [TRACKER] UEFI PXE supportResolvedLukas Zapletal

Actions
Related to Foreman - Feature #12634: New HW Model flag pxe_loader in UI/APIClosedLukas Zapletal11/30/2015Actions
Actions

Also available in: Atom PDF