Reply
Highlighted
New Member
Posts: 17
Registered: ‎04-24-2013
Kudos: 10
Solutions: 2
Accepted Solution

Issue with DHCP Options 66/67 (PXE), "File not found"

[ Edited ]

I am working on setting up my new ERL, and am having some issues with PXE booting. I have set my DHCP options using the same parameters as my previous DHCP server, but am receiving a File Not Found error on the clients. I am, however, able to tftp to the server and download the boot file with no issues. Switching back to my old DHCP server (or a linux box with dhcpd) resolves the issue, so I'm almost certain the settings are good. Any help would be greatly appreciated, my DHCP config is below (Removed all the static mappings):

>name@router# show service dhcp-server
disabled false
shared-network-name domain.com {
 authoritative disable
 subnet 192.168.69.0/24 {
  bootfile-name /pxe-boot/pxelinux.0
  bootfile-server 192.168.69.100
  default-router 192.168.69.254
  dns-server 192.168.69.100
  dns-server 8.8.8.8
  domain-name domain.com
  lease 86400
  start 192.168.69.100 {
   stop 192.168.69.200
  }
 }
}

Accepted Solutions
Ubiquiti Employee
Posts: 2,991
Registered: ‎02-04-2013
Kudos: 350
Solutions: 289

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

"service dhcp-server shared-network-name <> subnet <> bootfile-name NAME" actually puts two lines to the dhcpd.conf - option bootfile-name "NAME"; and filename "NAME";

 

To solve your issue, please try the steps logged below -

ubnt@Etr# sudo su -
root@Etr:~# mv /opt/vyatta/sbin/dhcpd-config.pl /opt/vyatta/sbin/dhcpd-config.pl.old
root@Etr:~# grep -v "option bootfile-name" /opt/vyatta/sbin/dhcpd-config.pl.old > /opt/vyatta/sbin/dhcpd-config.pl
root@Etr:~# chmod +x /opt/vyatta/sbin/dhcpd-config.pl
root@Etr:~# exit
logout
[edit]
ubnt@Etr# save
Saving configuration to '/config/config.boot'...
Done
[edit]
ubnt@Etr# delete service dhcp-server shared-network-name Test241 subnet 192.168.241.0/24 bootfile-name 
[edit]
ubnt@Etr# commit
[ service dhcp-server ]
Stopping DHCP server daemon...
Starting DHCP server daemon...

[edit]
ubnt@Etr# load
Loading configuration from '/config/config.boot'...

Load complete.  Use 'commit' to make changes active.
[edit]
ubnt@Etr# commit
[ service dhcp-server ]
Stopping DHCP server daemon...
Starting DHCP server daemon...

[edit]

 

View solution in original post

Ubiquiti Employee
Posts: 2,991
Registered: ‎02-04-2013
Kudos: 350
Solutions: 289

Re: Issue with DHCP Options 66/67 (PXE), "File not found"


lightsabersetc wrote:

 

    subnet-parameters "filename /pxe-boot/pxelinux.0;"

There's no double quotes around that filename being put in dhcpd.conf. Could you try -

ubnt@manual-dut1# set service dhcp-server shared-network-name DHCP2 subnet 192.168.3.0/24 subnet-parameters "filename &quot;/pxe-boot/pxelinux.0&quot;;"
[edit]

 

View solution in original post

New Member
Posts: 17
Registered: ‎04-24-2013
Kudos: 10
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

Try 

 

subnet 192.168.2.0/24 {
         bootfile-name pxelinux.0
         bootfile-server 192.168.2.52
subnet-parameters "filename &quot;pxelinux.0&quot;;"

View solution in original post

New Member
Posts: 37
Registered: ‎02-12-2013
Kudos: 8
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

subnet 192.168.2.0/24 {
         bootfile-server 192.168.2.52
         subnet-parameters "filename &quot;pxelinux.0&quot;;"

 So I removed the bootfile-name line altogether and then added the subnet-parameters that you listed, worked like a charm.

 

 

View solution in original post


All Replies
Ubiquiti Employee
Posts: 2,991
Registered: ‎02-04-2013
Kudos: 350
Solutions: 289

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

What's the content of dhcpd.conf on that linux box with dhcpd?

New Member
Posts: 17
Registered: ‎04-24-2013
Kudos: 10
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

Thanks for your reply! My old dhcpd configuration is below:

ddns-update-style none;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.69.255;
option routers 192.168.69.254;
option domain-name-servers 192.168.69.100, 192.168.69.254, 8.8.8.8;
option domain-name "domain.com";

default-lease-time 86400;
max-lease-time 604800;
#option time-offset -18000;
authoritative;
log-facility local7;

allow booting;
allow bootp;

#       Reserve >100 for static
subnet 192.168.69.0 netmask 255.255.255.0 {
 range 192.168.69.1 192.168.69.99;

 get-lease-hostnames on;
 use-host-decl-names on;

 next-server 192.168.69.100;
 filename "/pxe-boot/pxelinux.0";
}
Ubiquiti Employee
Posts: 2,991
Registered: ‎02-04-2013
Kudos: 350
Solutions: 289

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

"service dhcp-server shared-network-name <> subnet <> bootfile-name NAME" actually puts two lines to the dhcpd.conf - option bootfile-name "NAME"; and filename "NAME";

 

To solve your issue, please try the steps logged below -

ubnt@Etr# sudo su -
root@Etr:~# mv /opt/vyatta/sbin/dhcpd-config.pl /opt/vyatta/sbin/dhcpd-config.pl.old
root@Etr:~# grep -v "option bootfile-name" /opt/vyatta/sbin/dhcpd-config.pl.old > /opt/vyatta/sbin/dhcpd-config.pl
root@Etr:~# chmod +x /opt/vyatta/sbin/dhcpd-config.pl
root@Etr:~# exit
logout
[edit]
ubnt@Etr# save
Saving configuration to '/config/config.boot'...
Done
[edit]
ubnt@Etr# delete service dhcp-server shared-network-name Test241 subnet 192.168.241.0/24 bootfile-name 
[edit]
ubnt@Etr# commit
[ service dhcp-server ]
Stopping DHCP server daemon...
Starting DHCP server daemon...

[edit]
ubnt@Etr# load
Loading configuration from '/config/config.boot'...

Load complete.  Use 'commit' to make changes active.
[edit]
ubnt@Etr# commit
[ service dhcp-server ]
Stopping DHCP server daemon...
Starting DHCP server daemon...

[edit]

 

New Member
Posts: 17
Registered: ‎04-24-2013
Kudos: 10
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

Perfect, that worked; thank you very much! I'll be working up a blog post on how to do this here in a bit, I'll make sure it makes it upstream to your wiki.

New Member
Posts: 37
Registered: ‎02-12-2013
Kudos: 8
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

Just wanted to chime in that this worked for me as well, thanks for the fix.  Is this potentially a bug in the setup of the bootfile-name parameter that'll be fixed later on?

 

Ubiquiti Employee
Posts: 2,991
Registered: ‎02-04-2013
Kudos: 350
Solutions: 289

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

Could you try the steps logged below -

ubnt@manual-dut1# delete service dhcp-server shared-network-name DHCP1 subnet 192.168.2.0/24 bootfile-name 
[edit]
ubnt@manual-dut1# set service dhcp-server shared-network-name DHCP1 subnet 192.168.2.0/24 subnet-parameters "filename /pxe-boot/pxelinux.0;"
[edit]
ubnt@manual-dut1# commit
[ service dhcp-server ]
Stopping DHCP server daemon...
Starting DHCP server daemon...

[edit]

 If this works, then there's no need to change that script meaning no fix needed.

New Member
Posts: 17
Registered: ‎04-24-2013
Kudos: 10
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

[ Edited ]

I had actually tried that solution per some Vyatta configuration guides, but it did not work. I went ahead and retried as a just in case measure, but the results were the same. For the test, my DHCP configuration looked like the below:

 authoritative disable
 subnet 192.168.69.0/24 {
     bootfile-server 192.168.69.100
     default-router 192.168.69.254
     dns-server 8.8.8.8
     dns-server 8.8.4.4
     domain-name dlasley.net
     lease 86400
     start 192.168.69.100 {
         stop 192.168.69.200
     }
...static mappings...
    subnet-parameters "filename /pxe-boot/pxelinux.0;"
Ubiquiti Employee
Posts: 2,991
Registered: ‎02-04-2013
Kudos: 350
Solutions: 289

Re: Issue with DHCP Options 66/67 (PXE), "File not found"


lightsabersetc wrote:

 

    subnet-parameters "filename /pxe-boot/pxelinux.0;"

There's no double quotes around that filename being put in dhcpd.conf. Could you try -

ubnt@manual-dut1# set service dhcp-server shared-network-name DHCP2 subnet 192.168.3.0/24 subnet-parameters "filename &quot;/pxe-boot/pxelinux.0&quot;;"
[edit]

 

New Member
Posts: 17
Registered: ‎04-24-2013
Kudos: 10
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

Not a problem. I deleted the existing subnet-parameter and added `subnet-parameters "filename &quot;/pxe-boot/pxelinux.0&quot;;"`. I am now able to PXE boot with this configuration, although I find it somewhat weird that the &quot;'s were needed in a path that would not typically be escaped in the shell. I actually attempted something similar to this in my original testing after reading This post, is there a reason that Vyatta shell would accept this and EdgeOS will not? For the sake of ease/avoid link rot, 'this' refers to the below command/output:

set service dhcp-server shared-network-name dlasley.net subnet 192.168.69.0/24 subnet-parameters "filename \"/pxe-boot/pxelinux.0\";"
Cannot use the double quote (") character in a value string
Value validation failed
Set failed
Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3125
Solutions: 945
Contributions: 16

Re: Issue with DHCP Options 66/67 (PXE), "File not found"


lightsabersetc wrote:

Not a problem. I deleted the existing subnet-parameter and added `subnet-parameters "filename &quot;/pxe-boot/pxelinux.0&quot;;"`. I am now able to PXE boot with this configuration, although I find it somewhat weird that the &quot;'s were needed in a path that would not typically be escaped in the shell. I actually attempted something similar to this in my original testing after reading This post, is there a reason that Vyatta shell would accept this and EdgeOS will not? For the sake of ease/avoid link rot, 'this' refers to the below command/output:

set service dhcp-server shared-network-name dlasley.net subnet 192.168.69.0/24 subnet-parameters "filename \"/pxe-boot/pxelinux.0\";"
Cannot use the double quote (") character in a value string
Value validation failed
Set failed

That link is from 3 years ago.  I don't think the current version allows that any more.  They also now use  &quot; to escape the double quote.

EdgeMAX Router Software Development
New Member
Posts: 17
Registered: ‎04-24-2013
Kudos: 10
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

Understood; thanks for the detailed answers! So far I am very impressed with this router, and the customer service is there to back up the hardware.
New Member
Posts: 37
Registered: ‎02-12-2013
Kudos: 8
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

after upgrading to beta2, my pxe boot is no longer working; any ideas?  I had gotten it working as noted before.

 

 

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5457
Solutions: 1656
Contributions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

Which version were you using when it was working before? Also, the DHCP-related stuff didn't really change much, so could you also verify if anything else has changed in the setup?

New Member
Posts: 37
Registered: ‎02-12-2013
Kudos: 8
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

upgraded from alpha 2 to beta 2.  everything still shows up like it should in the dhcp-server area:

 

subnet 192.168.2.0/24 {
         bootfile-name pxelinux.0
         bootfile-server 192.168.2.52

 

New Member
Posts: 17
Registered: ‎04-24-2013
Kudos: 10
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

Try 

 

subnet 192.168.2.0/24 {
         bootfile-name pxelinux.0
         bootfile-server 192.168.2.52
subnet-parameters "filename &quot;pxelinux.0&quot;;"

New Member
Posts: 37
Registered: ‎02-12-2013
Kudos: 8
Solutions: 2

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

subnet 192.168.2.0/24 {
         bootfile-server 192.168.2.52
         subnet-parameters "filename &quot;pxelinux.0&quot;;"

 So I removed the bootfile-name line altogether and then added the subnet-parameters that you listed, worked like a charm.

 

 

Regular Member
Posts: 334
Registered: ‎04-25-2014
Kudos: 276
Solutions: 13

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

[ Edited ]

Is this still relevant in v1.7, meaning that I have to use the subnet-parameters specification instead of bootfile-name? At least I can confirm that the quotes are put correctly in /opt/vyatta/etc/dhcpd.conf:

root@ubnt-er-poe:/home/admin# grep filename /opt/vyatta/etc/dhcpd.conf
		filename "pxelinux.0";
root@ubnt-er-poe:/home/admin#
New Member
Posts: 3
Registered: ‎11-18-2017

Re: Issue with DHCP Options 66/67 (PXE), "File not found"

I've been playing with ESXi 6.5 PXE boot/auto-deploy in my home lab and was struggling with getting it going when DHCP leases were originating from my EdgeRouter X.  Doing some web searches, I came across this thread.

 

Four-and-a-half years after the initial post, it appears that 'bootfile-name' is still broken in firmware 1.9.7+hotfix.4.  That's rather unfortunate.  Will it ever get fixed?

 

Thankfully there was a workaround posted here, which was to add this to the DHCP subnet delcaration:

        bootfile-server ip.address.of.tftpd

        subnet-parameters "filename &quot;snponly64.efi.vmw-hardwired&quot;;"

 

 I guess the point of this post is to ask, in a roundabout way, when or if the 'bootfile-name' setting will be fixed?

Reply