1

I've been setting up a PXE Server to automate Linux deployments. Everything was working fun until something magically broke (i.e. I must have changed something, but cannot for the life of me figure out what it was).

snippet of dhcpd.conf (some information removed for privacy)

subnet 10.0.65.0 netmask 255.255.255.0 {
  option routers ///;
  option broadcast-address ///;
  option subnet-mask 255.255.255.0;
  range ///;
  class "pxeclients" {
    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
    next-server 10.160.65.5;

    if option architecture-type = 00:07 {
      filename "pxe/shim.efi";
    } else {
      filename "pxe/pxelinux.0";
    }
  }
}

The pxe server (which is a different server than the DHCP server) is running RedHat 7. I turned on verbose logging for the xinetd tftp daemon. It shows that the client requests pxelinux.0 (and then the client shows the PXELINUX version information), but does not show that the client requests ldlinux.c32, then eventually the client times out.

Oct 26 13:49:47 tinkerbell in.tftpd[599]: tftp: client does not accept options
Oct 26 13:49:47 tinkerbell in.tftpd[600]: RRQ from 141.212.104.234 filename pxe/pxelinux.0

I tried to hard code in some options to the pxelinux.0 file using pxelinux-options from the syslinux package, and had no luck. I've tried many versions of pxelinux.0 (currently using 6.03, compiled from source on the RedHat 7 machine).

Current hard coded options:

utils/pxelinux-options --list /y/pxe/pxelinux.0
-b domain-name          'foo.bar'
-b domain-name-servers  10.0.65.4
-a next-server          10.0.65.5
-a path-prefix          '/pxe/'
-a config-file          'pxelinux.cfg/default'

I'm at the end of my metaphorical rope. Any help is appreciated.

1 Answers1

1

this is not correct

if option architecture-type = 00:07 {
  filename "pxe/shim.efi";
} else {
  filename "pxe/pxelinux.0";

please consider

DHCP Option 93  Client's pre-OS runtime
      0              BIOS
      6              EFI32
      7              EFI64
      9              EFI64

In your case an UEFI 64 client using DHCP option 93 = 9 would get pxelinux.0 as NBP and that will never work.

This would be a better approach

           if option arch = 00:00 {
                    filename "/pxe/pxelinux.0";
            } elsif option arch = 00:06 {
                    filename "pxe/shim32.efi";
            } elsif option arch = 00:07 {
                    filename "pxe/shim64.efi";
            } elsif option arch = 00:09 {
                    filename "pxe/shim64.efi";
            }
Pat
  • 3,339
  • 2
  • 16
  • 17
  • This still wouldn't explain why it was working before and not working now. That part of the configuration did not change. – Travis DePrato Oct 26 '16 at 18:23
  • it would explain it if you booted with different UEFI clients. There's not magic here, if the pxelinux.0 is net delivered but ldlinux.c32 is never requested then either pxelinux.0 crashed or it is mishandling the next-server parameter. The last case would be a pxelinux bug that you can see running a Wireshark traffic capture. – Pat Oct 26 '16 at 18:32
  • The same client that I was able to successfully install using PXE boot now hangs at "PXELINUX 6.03 PXE Copyright (C) 1994-2014 H. Peter Anvin et al". I also did update the DHCP configuration to reflect the correct architectures. – Travis DePrato Oct 26 '16 at 18:44
  • that's typical when pxelinux.0 hangs. try replacing the binary. – Pat Oct 26 '16 at 19:15
  • I've replaced it with several binaries. One packaged with the ubuntu installation (6.03), one built from source (6.03), and one from the redhat syslinux package (version 4 and some change). Both 6.03's just hang at the version string. The version 4 binary shows "trying to load pxe/[UUID]" but the tftp server shows no record of that request. – Travis DePrato Oct 26 '16 at 22:24
  • I also tried hard coding (with pxelinux-options) the values of next-server and filename to point to a different server which was monitoring network traffic on port 69 and it showed no requests as well. – Travis DePrato Oct 26 '16 at 22:25
  • I figured out that it's some weird network issues rather than the DHCP or TFTP servers. I've accepted your answer because it included helpful information (re: dhcp config). – Travis DePrato Oct 27 '16 at 02:41
  • that's very weird because you said you were able to see at the client `"PXELINUX 6.03 PXE Copyright (C) 1994-2014 H. Peter Anvin et al"` and that means the pxelinux.0 TFTP transfer was OK – Pat Oct 27 '16 at 18:44