Background:
I’ve been looking for a good bare metal installer for a while and came across Foreman only a week ago. I have been very impressed by the quality of the product and documentation. Many thanks to everyone here for your great work - very impressive!!!
Problem:
The strong documentation and foreman-installer made the basic installation very simple until I ran into my first roadblock - net booting my first server into discovery mode.
I tried everything over a few nights but without success until I discovered the problem was that…
- Sample dhcp.conf was missing the required net boot info.
- OMAPI interface between dhcpd and foreman wasn’t going to make good any of this gap.
- My server was, like most modern servers, based on UEFI rather than a classical BIOS.
I finally ended up setting up the host statically in Foreman and configuring the UEFI bios to legacy BIOS mode and hey presto, everything suddenly worked.
Solution:
I then started work on a better solution pulling details from RFC 4578, ISC DHCPD manual pages and various notes on this site regarding booting UEFI servers using grub2. The alternative dhcpd.conf file which I found on Google Groups written by @lzap looked close, but gave errors when I tried to run in on my version of dhcpd.
I messed around a little and came up with following configuration for dhcpd.conf using class and subclass. I have based this on the provided sample file for reference (my actual config is a little different )
ddns-update-style interim;
ignore client-updates;
authoritative;
allow booting;
allow bootp;
option pxe-arch code 93 = unsigned integer 16;
class "pxe-client" {
match if substring(option vendor-class-identifier, 0, 9) ="PXEClient";
spawn with option pxe-arch;
next-server 10.1.1.1;
}
subclass "pxe-client" 00:00 {
# Intel x86PC (BIOS) => PXELinux
filename "pxelinux.0";
}
subclass "pxe-client" 00:06 {
# EFI IA32 => Grub2
filename "grub2/shim.efi";
}
subclass "pxe-client" 00:07 {
# EFI BC => Grub2
filename "grub2/shim.efi";
}
subclass "pxe-client" 00:09 {
# EFI x86-64 => Grub2
filename "grub2/shim.efi";
}
key omapi_key {
algorithm HMAC-MD5;
secret "2wgoV3yukKdKMkmOzOn/hIsM97QgLTT4CLVzg9Zv0sWOSe1yxPxArmr7a/xb5DOJTm5e/9zGgtzL9FKna0NWis==;"
}
omapi-key omapi_key;
omapi-port 7911;
subnet 10.1.1.0 netmask 255.255.255.0 {
option routers 10.1.1.254;
option subnet-mask 255.255.255.0;
option domain-name "domain.com";
option domain-name-servers 10.1.1.1, 8.8.8.8;
option log-servers syslog;
option ntp-servers ntp;
range dynamic-bootp 10.1.1.10 10.1.1.250;
default-lease-time 21600;
max-lease-time 43200;
}
Suggestion:
I suspect I might not be the last person to run into this problem. I can see from the development topics that work has started on supporting HTTP booting for UEFI.
Can I suggest that in the meantime, that we think about updating the sample dhcpd.conf file or at least consider putting up a couple of different versions for different purposes? It would certainly have saved me several days of effort
Many thanks again for an *excellent product!!
Foreman and Proxy versions:
foreman = 1.17
foreman-discovery = 10.0
dhcp = 4.2.5