Cant PXE Boot = PXE-T01: File not Found
-
Moved this to bugs, because I confirmed the problem in master branch.
@Sebastian-Roth I just tried doing an install on Debian9 with 1.4.4. If you specify the installer to setup dhcp, it fails when trying to start the dhcp server. And because the /tftpboot directory is setup after dhcp is, that doesn’t get done.
I’ve been digging into the problem, it’s IPv6 related as far as I can see right now. Here’s the error:
Starting ISC DHCPv6 server: dhcpd6check syslog for diagnostics. ... failed!
Snippet from
journalctl -xe
:root@Debian9:/# journalctl -xe Dec 30 14:14:34 Debian9 dhcpd[22356]: Dec 30 14:14:34 Debian9 dhcpd[22356]: Dec 30 14:14:34 Debian9 dhcpd[22356]: Not configured to listen on any interfaces! Dec 30 14:14:34 Debian9 dhcpd[22356]: Dec 30 14:14:34 Debian9 dhcpd[22356]: If you think you have received this message due to a bug rather Dec 30 14:14:34 Debian9 dhcpd[22356]: than a configuration issue please read the section on submitting Dec 30 14:14:34 Debian9 dhcpd[22356]: bugs on either our web page at www.isc.org or in the README file Dec 30 14:14:34 Debian9 dhcpd[22356]: before submitting a bug. These pages explain the proper Dec 30 14:14:34 Debian9 dhcpd[22356]: process and the information we find helpful for debugging.. Dec 30 14:14:34 Debian9 dhcpd[22356]: Dec 30 14:14:34 Debian9 dhcpd[22356]: exiting. Dec 30 14:14:36 Debian9 isc-dhcp-server[22339]: Starting ISC DHCPv6 server: dhcpd6check syslog for diagnostics. ... failed! Dec 30 14:14:36 Debian9 isc-dhcp-server[22339]: failed! Dec 30 14:14:36 Debian9 systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1 Dec 30 14:14:36 Debian9 systemd[1]: Failed to start LSB: DHCP server. -- Subject: Unit isc-dhcp-server.service has failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- Unit isc-dhcp-server.service has failed. -- -- The result is failed. Dec 30 14:14:36 Debian9 systemd[1]: isc-dhcp-server.service: Unit entered failed state. Dec 30 14:14:36 Debian9 systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
This is
systemctl status isc-dhcp-server
:root@Debian9:/etc/dhcp# systemctl status isc-dhcp-server ● isc-dhcp-server.service - LSB: DHCP server Loaded: loaded (/etc/init.d/isc-dhcp-server; generated; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2017-12-30 14:14:36 CST; 11min ago Docs: man:systemd-sysv-generator(8) Process: 22339 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE) Tasks: 1 (limit: 4915) CGroup: /system.slice/isc-dhcp-server.service └─22351 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf Dec 30 14:14:32 Debian9 dhcpd[22350]: Wrote 0 leases to leases file. Dec 30 14:14:32 Debian9 dhcpd[22351]: Server starting service. Dec 30 14:14:34 Debian9 isc-dhcp-server[22339]: Starting ISC DHCPv4 server: dhcpd. Dec 30 14:14:34 Debian9 dhcpd[22356]: Wrote 0 NA, 0 TA, 0 PD leases to lease file. Dec 30 14:14:36 Debian9 isc-dhcp-server[22339]: Starting ISC DHCPv6 server: dhcpd6check syslog for diagnostics. ... failed! Dec 30 14:14:36 Debian9 isc-dhcp-server[22339]: failed! Dec 30 14:14:36 Debian9 systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1 Dec 30 14:14:36 Debian9 systemd[1]: Failed to start LSB: DHCP server. Dec 30 14:14:36 Debian9 systemd[1]: isc-dhcp-server.service: Unit entered failed state. Dec 30 14:14:36 Debian9 systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Snippet from the bottom of my fog error log:
Dec 20 19:59:42 Debian9 systemd[1]: Starting The PHP 7.0 FastCGI Process Manager... Dec 20 19:59:42 Debian9 systemd[1]: Started The PHP 7.0 FastCGI Process Manager. isc-dhcp-server.service is not a native service, redirecting to systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable isc-dhcp-server Job for isc-dhcp-server.service failed because the control process exited with error code. See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details. ● isc-dhcp-server.service - LSB: DHCP server Loaded: loaded (/etc/init.d/isc-dhcp-server; generated; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2017-12-20 20:00:12 CST; 2s ago Docs: man:systemd-sysv-generator(8) Process: 21889 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE) Tasks: 1 (limit: 4915) CGroup: /system.slice/isc-dhcp-server.service └─21901 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf Dec 20 20:00:10 Debian9 dhcpd[21906]: than a configuration issue please read the section on submitting Dec 20 20:00:10 Debian9 dhcpd[21906]: bugs on either our web page at www.isc.org or in the README file Dec 20 20:00:10 Debian9 dhcpd[21906]: before submitting a bug. These pages explain the proper Dec 20 20:00:10 Debian9 dhcpd[21906]: process and the information we find helpful for debugging.. Dec 20 20:00:12 Debian9 isc-dhcp-server[21889]: Starting ISC DHCPv6 server: dhcpd6check syslog for diagnostics. ... failed! Dec 20 20:00:12 Debian9 isc-dhcp-server[21889]: failed! Dec 20 20:00:12 Debian9 systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1 Dec 20 20:00:12 Debian9 systemd[1]: Failed to start LSB: DHCP server. Dec 20 20:00:12 Debian9 systemd[1]: isc-dhcp-server.service: Unit entered failed state. Dec 20 20:00:12 Debian9 systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Here’s the output of
ip addr
:root@Debian9:/# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 52:54:00:67:a2:b4 brd ff:ff:ff:ff:ff:ff inet 10.0.0.39/24 brd 10.0.0.255 scope global ens3 valid_lft forever preferred_lft forever inet6 fe80::5054:ff:fe67:a2b4/64 scope link valid_lft forever preferred_lft forever
Output of
ifconfig
root@Debian9:/# ifconfig ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.0.39 netmask 255.255.255.0 broadcast 10.0.0.255 inet6 fe80::5054:ff:fe67:a2b4 prefixlen 64 scopeid 0x20<link> ether 52:54:00:67:a2:b4 txqueuelen 1000 (Ethernet) RX packets 163559 bytes 232881890 (222.0 MiB) RX errors 0 dropped 231 overruns 0 frame 0 TX packets 44237 bytes 4542466 (4.3 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1 (Local Loopback) RX packets 46 bytes 1794 (1.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 46 bytes 1794 (1.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
This is my
dhcpd.conf
file:root@Debian9:/etc/dhcp# cat dhcpd.conf # DHCP Server Configuration file\n#see /usr/share/doc/dhcp*/dhcpd.conf.sample # This file was created by FOG #Definition of PXE-specific options # Code 1: Multicast IP Address of bootfile # Code 2: UDP Port that client should monitor for MTFTP Responses # Code 3: UDP Port that MTFTP servers are using to listen for MTFTP requests # Code 4: Number of seconds a client must listen for activity before trying # to start a new MTFTP transfer # Code 5: Number of seconds a client must listen before trying to restart # a MTFTP transfer 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; use-host-decl-names on; ddns-update-style interim; ignore client-updates; # Specify subnet of ether device you do NOT want service. # For systems with two or more ethernet devices. # subnet 136.165.0.0 netmask 255.255.0.0 {} subnet 10.0.0.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; range dynamic-bootp 10.0.0.10 10.0.0.254; default-lease-time 21600; max-lease-time 43200; option routers 10.0.0.1; option domain-name-servers 208.67.222.222; next-server 10.0.0.39; class "Legacy" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000"; filename "undionly.kkpxe"; } class "UEFI-32-2" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002"; filename "i386-efi/ipxe.efi"; } class "UEFI-32-1" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006"; filename "i386-efi/ipxe.efi"; } class "UEFI-64-1" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007"; filename "ipxe.efi"; } class "UEFI-64-2" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008"; filename "ipxe.efi"; } class "UEFI-64-3" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009"; filename "ipxe.efi"; } class "SURFACE-PRO-4" { match if substring(option vendor-class-identifier, 0, 32) = "PXEClient:Arch:00007:UNDI:003016"; filename "ipxe7156.efi"; } class "Apple-Intel-Netboot" { match if substring(option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386"; option dhcp-parameter-request-list 1,3,17,43,60; if (option dhcp-message-type = 8) { option vendor-class-identifier "AAPLBSDPC"; if (substring(option vendor-encapsulated-options, 0, 3) = 01:01:01) { # BSDP List option vendor-encapsulated-options 01:01:01:04:02:80:00:07:04:81:00:05:2a:09:0D:81:00:05:2a:08:69:50:58:45:2d:46:4f:47; filename "ipxe.efi"; } } } }
-
Figured it out. In Debian 9, you have to put the interface name into this file:
/etc/default/isc-dhcp-server
When I looked at mine, it looked like this:
INTERFACESv4="" INTERFACESv6=""
So I changed it to read like this:
INTERFACESv4="ens3" INTERFACESv6=""
Then I had to remove the pid file:
rm -f /var/run/dhcpd.pid
Then, I could finally start the dhcp service:
systemctl start isc-dhcp-server
-
@wayne-workman ok perfect, thanks for your fast reaction. I will give it a try…
So this way it should only start the DHCPv4 and ignore the v6 stuff, right?I will try to install the isc-dhcp-server first and set this up. Then i will run the installfog.sh an see what happens
Thanks
-
@404 Well, what I’d suggest for now is to run the fog installer as normal. After it fails, go edit that one file, delete the pid file, then re-run the installer again. It should succeed the second time. FOG has to carefully configure the dhcp server so that multiple architectures are supported. We’re going to write a patch here shortly to fix this in working branch.
-
@wayne-workman Thanks heaps for looking into this! Reading through a couple of old posts on the internet I kind of came to the same conclusion that it’s an issue with a missing/wrong
/etc/default/isc-dhcp-server
parameter.Hmmmm, I am wondering how we are going to fix this. Why is it working in debian 8? I’d actually expect debian (dpkg) to generate
/etc/default/isc-dhcp-server
properly! -
@sebastian-roth said in Cant PXE Boot = PXE-T01: File not Found:
Hmmmm, I am wondering how we are going to fix this.
Maybe a sed command that uses a variable. This would only match if it’s empty:
interface="ens3" sed -i "s/INTERFACESv4=\"\"/INTERFACESv4=\"$interface\"/g" /etc/default/isc-dhcp-server
-
@Wayne-Workman Yeah sure we can just force it. But I am wondering why this is the case. Searching more I found this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815319
So the issue has been around for a fair bit of time. But I still haven’t figured out if this is just an issue with the debian specific start scripts or if it’s actually a newer isc-dhcp-server version doing the env variable check… then fails if it’s not set - very poor I find.
-
Interesting… the bug report just posted ends with stating that this is fixed in version
4.3.5-1
. In the logs posted I see version4.3.5-3
being installed. Possibly a regression?Edit: Here we go I think: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862680
Although I really like debian I am still not sure if this is something we should fix. Maybe we do and next time debian is doing something different again…?!
-
This is a pretty simple fix, so I don’t see why not. If the debian team fixes it later, great. When they fix it, the sed command will stop matching. just my opinion. I think we should make the installer work on the mainstream distributions - even with their problems to an extent.
-
Seems like the newer isc-dhcp-server version does start as IPv4 and IPv6 DHCP server if no interface is given in
/etc/defaults/isc-dhcp-server
. As we don’t have any IPv6 definition in our config it fails to start. One way to fix this would be to add IPv6 defintion but as I don’t think this will be of much use to any of our FOG users I’d better follow Wayne’s idea on fixing/etc/defaults/isc-dhcp-server
.Fix is pushed in
working
branch. So here is another reason to push for the next release. -
@sebastian-roth said in Cant PXE Boot = PXE-T01: File not Found:
So here is another reason to push for the next release.
I think we are ready for another RC.