I am working on a mock up of a PXE server for the place I work. I am trying to put the image files and configuration file in places that keep things a little more organized. Even though my dhcpd.conf
specifies the configuration options needed to tell PXELinux where to look for config files it still does not find said files.
Here is what my /etc/dhcp/dhcpd.conf looks like, this is where I imagine the issue is.
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option arch code 93 = unsigned integer 16;
option space pxelinux;
option pxelinux.magic code 208 = string;
option pxelinux.configfile code 209 = text;
option pxelinux.pathprefix code 210 = text;
option pxelinux.reboottime code 211 = unsigned integer 32;
ddns-update-style none;
option domain-name "lab.solignis.com";
option domain-name-servers ns01.lab.solignis.com;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 192.168.147.0 netmask 255.255.255.0 {
range 192.168.147.100 192.168.147.254;
option subnet-mask 255.255.255.0;
option routers 192.168.147.2;
option broadcast-address 192.168.147.255;
default-lease-time 600;
max-lease-time 7200;
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
next-server 192.168.147.10;
if option arch = 00:00 {
option pxelinux.configfile "common.cfg";
option pxelinux.pathprefix "/configs/";
filename "/pxelinux/images/BIOS/pxelinux.0";
} elsif option arch = 00:06 {
#option pathprefix "/configs/";
#option configfile "/EFIx64/default";
filename "/images/EFIx64/syslinux.efi";
} elsif option arch = 00:07 {
#option pathprefix "/configs/";
#option configfile "/EFIx64/default";
filename "/images/EFIx64/syslinux.efi";
} elsif option arch = 00:09 {
#option pathprefix "/configs/";
#option configfile "/EFIx64/default";
filename "/images/EFIia32/syslinux.efi";
}
}
}
Parts of the config were compiled from various parts of documentation, the parts that are commented out are old pieces that I have not fixed yet disregard those. For now I just want to get standard BIOS working (arch = 00:00
).
Here is what my file structure looks like for my tftpboot directory.
server01@server01:/var/lib/tftpboot$ tree
.
└── pxelinux
├── configs
│ └── common.cfg
└── images
├── BIOS
│ ├── ldlinux.c32
│ └── pxelinux.0
├── EFIia32
│ └── syslinux.efi
└── EFIx64
└── syslinux.efi
6 directories, 5 files
I was pretty sure I have it setup right for pxelinux but it does not see the config file so something is not configured right. Can anyone provide an idea of what I misconfigured? I have been banging my head on this all day.