Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when attempting to set dhcp option variable
2018-05-25, 17:44
Post: #1
Error when attempting to set dhcp option variable
I rebuilt spnonly.efi and added the following script to it as an embedded script (see below)

#!ipxe
set ${ifname}.dhcp/user-class macpro-ESXiInstallRequest
clear ip4
dhcp
echo Chaining to http://${next-server}/provision_system?MAC_ADDRESS=mac=${${ifname}/mac}
chain http://${next-server}/provision_system?MAC_ADDRESS=mac=${${ifname}/mac}

No problems with the above script.

The chain command contacts the a web server.
The web server for testing generates the following script:

#!ipxe
set ${ifname}.dhcp/user-class ESXiInstallRequest
echo This file was loaded from a web server.
echo Initate a ${${ifname}.dhcp/user-class}
clear ipv4
dhcp
ifstat ${ifname}
route
echo Chaining to file ${${ifname}.dhcp/filename} on ${next-server} in 20 seconds
sleep 20
chain ${${ifname}.dhcp/filename}


The set ${ifname}.dhcp/user-class ESXiInstallRequest. command fails with the following message:

Could not store "user-classs: No space left on device (http://ipxe.org/3402608b)

Which points me here:

Error: No space left on device
(Error code 340260)

Possible sources
This error originated from one of the following locations within the iPXE source code:

net/dhcpopts.c (line 185)
net/dhcpopts.c (line 214)
net/dhcpopts.c (line 239)

When basically tell me is not enough memory space available to the image.

So two questions:
1) The question is why is there not enough space?
2) How do i allocate/reserve space at build time, run time or install time?
3) Am I missing a step or command to initialize the script coming from the web server?

I tried building with the MEMMAP_SETTINGS defined but got a build error.
I was able to enable the CPUID_SETTINGS and building.

Thanks in advance.
Find all posts by this user
Quote this message in a reply
2018-05-26, 22:48
Post: #2
RE: Error when attempting to set dhcp option variable
First i must ask what is ${ifname} and why are you not using netX instead?

Have you tried clearing the user-class before setting it?
But maybe you should check if it already is set and if so skip the extra dhcp step anyway?
Right now I don't have the time to dig much more, but will try to tomorrow if I remember.

If memory serves me right MEMMAP_SETTINGS is not an option relevant to EFI builds, only pcbios.

Read the FAQ before posting.
Did you include relevant ipxe.org error urls?
Visit this user's website Find all posts by this user
Quote this message in a reply
2018-05-26, 23:07
Post: #3
RE: Error when attempting to set dhcp option variable
(2018-05-26 22:48)NiKiZe Wrote:  First i must ask what is ${ifname} and why are you not using netX instead?

Have you tried clearing the user-class before setting it?
But maybe you should check if it already is set and if so skip the extra dhcp step anyway?
Right now I don't have the time to dig much more, but will try to tomorrow if I remember.

If memory serves me right MEMMAP_SETTINGS is not an option relevant to EFI builds, only pcbios.

I was just following examples, ifname seems to be the active interface. i have only one NIC connected for my testing. The user-class variable is not set in the packet received by the client. The dhcp server is not sending it. I can add a test to see if is set but in that case I would want to change it regardless.

Can variables only be set once?
If so is this true when chaining to a new file that is not a new load, but just a and additional script?

I also got an error try to set the variable using the config util and it was displayed as "unassigned".

Should I set all variables with "dummy values" with the first ipse script that is embedded to reserve space? Then set and clear the variables/options as appropriate before issuing the dhcp request?

Thanks for the point on MEMMAP_SETTINGS.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)