Difference between revisions of "Pxechn.c32"

From Syslinux Wiki
Jump to: navigation, search
(New pxechn.c32 wiki page, based on the respective AsciiDoc file.)
 
m (Minor wiki formatting. As of v.6.03, pxechn.c32 is BIOS-only, not UEFI.)
Line 8: Line 8:
 
<br />
 
<br />
  
==SYNOPSIS==
+
== SYNOPSIS ==
  
 
  pxechn.c32 [-h | --help | -?]
 
  pxechn.c32 [-h | --help | -?]
Line 14: Line 14:
 
  pxechn.c32 ''FILE'' [OPTIONS]
 
  pxechn.c32 ''FILE'' [OPTIONS]
  
==DESCRIPTION==
+
== DESCRIPTION ==
  
 
Chainboot to a new Network Boot Program (NBP) ''FILE'' with options to
 
Chainboot to a new Network Boot Program (NBP) ''FILE'' with options to
 
adjust PXE packet <tt> #3 (PXENV_PACKET_TYPE_CACHED_REPLY) </tt> to alter end
 
adjust PXE packet <tt> #3 (PXENV_PACKET_TYPE_CACHED_REPLY) </tt> to alter end
behavior. ''FILE'' may be a filename, an <tt> IP::FN (
+
behavior.
192.168.1.1::path/to/file.0 ) </tt>, or URL. ''FILE'' is parsed to adjust the
+
 
DHCP ''sname'' field/option 66 and ''file'' field/option 67.
+
''FILE'' may be either a filename, an <tt> {{nowrap|IP::FN}} {{nowrap|(
 +
192.168.1.1::path/to/file.0 )}} </tt>, or a URL.
 +
 
 +
''FILE'' is parsed to adjust the
 +
DHCP ''sname'' {{nowrap|field/option 66}} and ''file'' {{nowrap|field/option 67}}.
 
<!-- but these may be override-able in the future. -->
 
<!-- but these may be override-able in the future. -->
  
==OPTIONS==
+
== OPTIONS ==
  
 
; '''-c''' ''CONFIG''
 
; '''-c''' ''CONFIG''
Line 76: Line 80:
 
<!-- PXELINUX asks gPXE/iPXE to unload, reverting to an underlying stack. -->
 
<!-- PXELINUX asks gPXE/iPXE to unload, reverting to an underlying stack. -->
  
==DECIMAL INPUT==
+
== DECIMAL INPUT ==
  
 
All parameters that are defaulted to decimal format are processed by <code>strtoul(3)</code> with a base of 0, which allows alternate formats and finds a suitable non-space separating character.
 
All parameters that are defaulted to decimal format are processed by <code>strtoul(3)</code> with a base of 0, which allows alternate formats and finds a suitable non-space separating character.
  
==EXAMPLES==
+
== EXAMPLES ==
  
 
<ol start="a" style="a; list-style-type: lower-alpha;">
 
<ol start="a" style="a; list-style-type: lower-alpha;">
Line 105: Line 109:
 
</ol>
 
</ol>
  
==NOTES==
+
== NOTES ==
  
 
Please note that some NBPs may ignore packet #3 by either not examining it at all or by issuing its own DHCP DISCOVER/REQUEST, negating all DHCP field/option modifications by pxechn.c32, including Microsoft Windows Server 2008R2 WDS’s wdsnbp.com. See also option ''-W''.
 
Please note that some NBPs may ignore packet #3 by either not examining it at all or by issuing its own DHCP DISCOVER/REQUEST, negating all DHCP field/option modifications by pxechn.c32, including Microsoft Windows Server 2008R2 WDS’s wdsnbp.com. See also option ''-W''.
Line 113: Line 117:
 
The non-space constraint is due to how Syslinux variants parse the command line as of 2012-09-16.
 
The non-space constraint is due to how Syslinux variants parse the command line as of 2012-09-16.
 
<br />
 
<br />
 +
 +
As of version 6.03, pxechn.c32 has no use when booting with syslinux.efi.

Revision as of 09:40, 22 September 2015


pxechn.c32 - Chainboot to new Network Boot Program (NBP)


SYNOPSIS

pxechn.c32 [-h | --help | -?]
pxechn.c32 -r FILE
pxechn.c32 FILE [OPTIONS]

DESCRIPTION

Chainboot to a new Network Boot Program (NBP) FILE with options to adjust PXE packet #3 (PXENV_PACKET_TYPE_CACHED_REPLY) to alter end behavior.

FILE may be either a filename, an IP::FN ( 192.168.1.1::path/to/file.0 ) , or a URL.

FILE is parsed to adjust the DHCP sname field/option 66 and file field/option 67.

OPTIONS

-c CONFIG
config file for PXELINUX (DHCP Option 209).


-h, --help, -?
Print help/usage information; invalid options will also cause this.


-o OPT.TYPE=VALUE
Set option. OPT is in DECIMAL INPUT format (see below). TYPE specifies the output type and input syntax (listed here in quotes and at present, 1 character). b’yte, w’ord(2B), l’ong(4B), q’uad(8B), character s’tring and colon-separated h’ex string (case insensitive; bytes must have 2 digits and each byte must be separated). byte, word, long and quad input values must meet criteria for DECIMAL INPUT
-p PATH
path option for PXELINUX (DHCP Option 210).
-r
restart. Call the PXE stack with PXENV_RESTART_TFTP . Must be the only option and before FILE.
-S
Set sip based on sname field/option 66 (by direct IP if a period-delimited address or otherwise DNS).
-t SECONDS
timeout option for PXELINUX (DHCP Option 211).


-w
After loading, wait for user input before booting.
-W
Enable WDS (Windows Deployment Services) - specific options. FILE (or its overrides for DHCP fields siaddr and file) must point at the WDS server. Note: As of 2012-05-31, there is a known issue with gPXE/iPXE, at least with undionly.kkpxe.

DECIMAL INPUT

All parameters that are defaulted to decimal format are processed by strtoul(3) with a base of 0, which allows alternate formats and finds a suitable non-space separating character.

EXAMPLES

  1. Load nbp.0 and set PXELINUX config (option 209).
     pxechn.c32 http://myhost.dom.loc/path/nbp.0 -c myconfig 

  2. Load gpxelinux.0 from the current directory, set prefix, wait to execute, set first config, set the domain name and 2 domain name servers (case mixed to show insensitivity; 10.1.1.2 and 172.23.77.236).
     pxechn.c32 gpxelinux.0 -p http://10.1.1.4/tftp/ -w -c myconfig -o 15.s=domain.loc -o 6.x=0A:01:01:02:ac:17:4D:Ec - 

  3. Load gpxelinux.0 (relative to the current directory and not altering sname/option 66), set the PXELINUX path prefix, wait after loading, set option 160 to 0x12 0x34 0x56 0x78, and option 197 to 0x00 0xD0 0xDE 0x00.
     pxechn.c32 gpxelinux.0 -p http://10.1.1.4/tftp/ -w -o 0xA0.x=12:34:56:78 -x 197.x=00:d0:de:00 

  4. Load wdsnbp.com from 10.1.1.8 and copy DHCP Option 66 to DHCP field sname if there's room.
     pxechn.c32 10.1.1.8:boot\x86\wdsnbp.com -W 

  5. Load wdsnbp.com from 10.1.1.4, point packets to 10.1.1.8 for use with WDS, copy DHCP Option 66 to DHCP field sname if there's room and decode this to an IPv4 address.
     pxechn.c32 10.1.1.4:boot\x86\wdsnbp.com -W -o 66.x=0a:01:01:08 -S 

NOTES

Please note that some NBPs may ignore packet #3 by either not examining it at all or by issuing its own DHCP DISCOVER/REQUEST, negating all DHCP field/option modifications by pxechn.c32, including Microsoft Windows Server 2008R2 WDS’s wdsnbp.com. See also option -W.

URL specifications in FILE that include user/password before the host will currently cause the siaddr field to not be set properly.

The non-space constraint is due to how Syslinux variants parse the command line as of 2012-09-16.

As of version 6.03, pxechn.c32 has no use when booting with syslinux.efi.