[Kea-users] KEA and pxeboot

Joshua Schaeffer jschaeffer at harmonywave.com
Wed Feb 23 18:26:11 UTC 2022


I don't have any specific documentation and my setup might be limited to my environment, but just thought I'd share what I have. I've got the next server and filename parameters specified in a client class and then add that to certain pools:

     {
"Dhcp4": {
     ...
     "client-classes": [
     {
     "name": "pxe_bios_x86",
"test": "substring(option[60].hex,0,9) == 'PXEClient' and option[93].hex == 0x0000",
             "next-server": "10.2.84.194",
         "boot-file-name": "/pxeboot/pxelinux.0"
}
     ]
"subnet4": [
{
"id": 12
             "subnet": "10.2.24.0/22"
         ...
     "pools": [
     ...
{
"pool": "10.2.27.65 - 10.2.27.96"
                     "client-class": "pxe_bios_x86"
             }
     ]
         }
]
}
}

On my tftp server I use tftpd-hpa:

user at ftphost:~$ cat /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS="10.2.84.194:69"
TFTP_OPTIONS="--listen --secure --port-range 58000:58999 -vvv"

And under my pxeboot directory I have my PXE configuration:

user at ftphost:~$ ls -l /srv/tftp/pxeboot/
total 79376
drwxr-xr-x 5 root root        5 Feb 19  2020 centos
drwxr-xr-x 5 root root        5 Feb 19  2020 debian
drwxr-xr-x 4 root root        4 Feb 19  2020 fedora
drwxr-xr-x 4 root root        7 Feb  1  2020 gtk
-rw-r--r-- 1 root root   115812 Feb 19  2020 ldlinux.c32
-rw-r--r-- 1 root root   180568 Feb 20  2020 libcom32.c32
-rw-r--r-- 1 root root    23052 Feb 20  2020 libutil.c32
-rw-r--r-- 1 root root 50331648 Feb  1  2020 mini.iso
-rw-r--r-- 1 root root 37343759 Feb  1  2020 netboot.tar.gz
drwxr-xr-x 4 root root        4 Feb 19  2020 opensuse
-rw-r--r-- 1 root root    42430 Feb  1  2020 pxelinux.0
drwxr-xr-x 2 root root       10 Jun 10  2021 pxelinux.cfg
drwxr-xr-x 7 root root        7 Feb 19  2020 ubuntu
drwxr-xr-x 4 root root        4 Feb 19  2020 windows
drwxr-xr-x 2 root root        5 Feb  1  2020 xen

user at ftphost:~$ cat /srv/tftp/pxeboot/pxelinux.cfg/default
# Menu setup
path gtk/debian-installer/amd64/boot-screens/
default gtk/debian-installer/amd64/boot-screens/vesamenu.c32
prompt      0
timeout     0
menu title Harmonywave PXE boot menu

# Main menu
label linux
menu label      ^Linux boot options
         menu default
kernel gtk/debian-installer/amd64/boot-screens/vesamenu.c32
append pxelinux.cfg/linux.cfg

label windows
menu label      ^Windows boot options
kernel gtk/debian-installer/amd64/boot-screens/vesamenu.c32
append          pxelinux.cfg/windows.cfg

The main menu takes you to various other sub-menus (i.e. Linux -> Ubuntu -> "Various Ubuntu distro options", etc) which are defined in their own files. Also this only works for BIOS (CSM) systems on x86 over IPv4. I've yet to configure UEFI for IPv4 or anything for IPv6.

On 2/23/22 08:46, Stephen Berg, Code 7309 via Kea-users wrote:
> On 2/23/2022 9:17 AM, Stephen Berg, Code 7309 via Kea-users wrote:
>> Where can I find documentation on setting up pxebooting to do linux installs?  I'm running kea-1.8.0-2 on Rocky Linux 8.5.  I want to be able to pxeboot different OS's like centos 7.x, rocky 8.x and future releases.  The tftp-server is installed and setup, syslinux packages are installed.  I've got just a couple clients defined in dhcp as reserved leases and added next-server and filename options for one but when I boot the network from that client it never seems to get to the pxelinux.0 or the defined kernel in the "pxelinux.cfg/01-macaddress" file.
>>
>> I figure I'm probably missing some setup in the kea-dhcp4.conf file but can't find what the missing parts might be.
>>
>> My old setup is centos 6, dhcp-4.1.1.  I'd add the next-server and filename lines for a particular host reservation then use pxeboot to setup the pxelinux.cfg file and that would have kernel parameters to boot the installer and read a kickstart file.  Right now I can get the new system to boot from the network, it gets an IP from kea but then fails to find the tftp file to boot from.
>
> Additional related issue: On my previous dhcpd setup I'd setup a new system to boot and install from the network with the pxeboot command and it would create the pxelinux.cfg/<host identifier> file with the kernel that's available from tftp and an append line.  I can't find the pxeboot command anywhere in Rocky Linux 8.x.  I can hand jam those files if needed but was curious if the utility is available somewhere. There's a pxeos.xml file in that setup and it's also seemingly not available in RL8 or kea.
>
>

-- 
Thanks,
Joshua Schaeffer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20220223/cf2d2385/attachment-0001.htm>


More information about the Kea-users mailing list