[gPXE] How to modify the code can not get DHCP information on the2nd

sqwbwh sqwbwh at 126.com
Fri Nov 5 13:58:55 EDT 2010


Shao Miller
embedded script.jpg is add a script as you say
#! Gpxe
set use-cached 1
autoboot

Show dhcp using cached correctly

178dhcp.jpg is the DHCP settings added 0xb2 0x01 0x01 0xff
According to this set the client to display the information is 178.jpg
Does not correctly display dhcp using cached is not where not set correctly?
 
-sqwbwh
-------------------------------------------

At 2010-11-06 01:27:57,"Shao Miller" <Shao.Miller at yrdsb.edu.on.ca> wrote:
sqwbwh wrote:At 2010-11-05 23:42:16,"Shao Miller" <Shao.Miller at yrdsb.edu.on.ca> wrote:
sqwbwh wrote:At 2010-11-05 23:13:19,"Shao Miller" <Shao.Miller at yrdsb.edu.on.ca> wrote:
sqwbwh wrote:At 2010-11-05 22:39:05,"Shao Miller" <Shao.Miller at yrdsb.edu.on.ca> wrote:
sqwbwh wrote:


How to modify the code can not get DHCP information on the 2nd?(GPXE only used to boot the system from ISCSI)
Is to remove this step.
net0: 00:0 c:: 29:08:11:35 on UNDI-PCI02: 01.0 (OPEN)
  [Link: up, TX: 0 TXE: 0 TX: 0 rxe: 0]
DHCP (net0 00:0 c: 29:08:11: d5 ).... ok
net0: 192.168.0.202/255.255.255.0


This can speed up boot speed.
Normal GPXE run to start from the boot system tftp process takes about 8 seconds or so
If removed from the second time for DHCP information will only need a very quick 2.5 seconds.

Miller, Shao wrote:
You most likely want the 'use-cached' option.  It is DHCP gPXE encapsulated option number 178.  Or, you can set it in an embedded script:

  #!gpxe
  set use-cached 1
  autoboot
Gene Cumm wrote:

What file and version are you using?  It sounds as if you're using
undionly.kpxe or a .pxe file.  undionly.kkpxe will skip this second
DHCP request but certain hardware/firmware has issues with this,
assuming you trust the stability of your OEM's PXE/UNDI stack.

sqwbwh wrote:
Shao Miller

The method is successful.
Thank you
sqwbwh wrote:
yes
thankyou  Shao Miller
Your method is useful :)
Miller, Shao wrote:
You’re quite welcome, and thanks for including the list on your other reply. :)  Have a nice day.  - Shao
sqwbwh wrote:
Shao Miller
1:
i use :
" set it in an embedded script:

#!gpxe
set use-cached 1
autoboot
it's good
2:
"It is DHCP gPXE encapsulated option number 178"
Specifically to ask how to use this method?
What can explain it in detail?
thank~you
I enjoy using the search feature at the gPXE (Etherboot) wiki.  Please see:

http://etherboot.org/wiki/doku.php?do=search&id=encapsulated&fulltext=Search
http://etherboot.org/wiki/msdhcp
http://etherboot.org/wiki/dhcpd
Shao Miller
Use the search function.
Use hyperlinks to provide you with three options for the introduction of 178 not found.
178 keyword search does not find use-cached search did not find the relevant presentation.

Hehe.Could you give me the answer it?.English is almost a maze for me


I'm afraid that I'm not sure how to explain gPXE encapsulated options any better than they are explained in the wiki.  DHCP option 175 should be a string of bytes.  Within that byte sequence, there are sub-options.  'use-cached' is sub-option 178.  So your DHCP option 175 could look like:

0xB2 0x01 0x01

where,

0xB2 : DHCP gPXE encapsulated option 178.
0x01 : The encapsulated option's value occupies 1 byte.
0x01 : The encapsulated option's value is 1 (true).

I do not know which DHCP service you use, so I do not know how you can reconfigure your service to give PXE clients this 'use-cached' option via DHCP.Shao Miller
dhcp server is msdhcp
Use 1781.jpg and 1782.jpg is set.Enable use-cached did not succeed
Picture shows what can it?

Those screen-shots show a DHCP option 178, not a DHCP gPXE encapsulated option 178.

You need DHCP option 175.  _Inside_ option 175, you need to have gPXE encapsulated option 178.  See:

http://etherboot.org/wiki/msdhcp#setting_up_a_gpxe_encapsulated_options_on_windows_dhcp

It shows exactly how to create the DHCP gPXE encapsulated options.  175 is a _container_.  178 ('use-cached') goes inside that container.  Change to option 175 and you will be fine, since your bytes are exactly as I explained above: Option 178, 1 byte long, value 1.  All gPXE encapsulated options go inside option 175.  0xB2 means 178.

Please remember to carbon-copy the list using Reply-All.
Shao Miller
i do 3.jpg and 4.jpg
but no success
If the screenshots just fine.Likehttp://etherboot.org/wiki/msdhcp # setting_up_a_gpxe_encapsulated_options_on_windows_dhcp
The hyperlink is the CHAP user and password to understand
178 still do not understand.
Your screen-shots look good!  Except that you are missing the final terminating 0xFF byte!  At the end of all gPXE encapsulated options, there should be a terminating byte.

0xB2 0x01 0x01 0xFF

0xFF: No more gPXE encapsulated options.

Also, what version of gPXE are you using?  Please use gPXE >= 1.0.0.

Thank you again for including the mailing-list.

- Shao Miller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://etherboot.org/pipermail/gpxe/attachments/20101106/72396af4/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 178dhcp.jpg
Type: image/jpeg
Size: 53824 bytes
Desc: not available
Url : http://etherboot.org/pipermail/gpxe/attachments/20101106/72396af4/attachment-0003.jpg 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: embedded script.jpg
Type: image/jpeg
Size: 83251 bytes
Desc: not available
Url : http://etherboot.org/pipermail/gpxe/attachments/20101106/72396af4/attachment-0004.jpg 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 178.jpg
Type: image/jpeg
Size: 82233 bytes
Desc: not available
Url : http://etherboot.org/pipermail/gpxe/attachments/20101106/72396af4/attachment-0005.jpg 


More information about the gPXE mailing list