pxechn.c32: PXE NBP chainloader
[profile/ivi/syslinux.git] / doc / pxechn.txt
1 = pxechn.c32 =
2 :doctype: manpage
3 :author: Gene Cumm
4 :email: gene.cumm@gmail.com
5 :revdate: 2012-05-27
6
7
8 == NAME ==
9 pxechn.c32 - Chainboot to new NBP
10
11
12 == SYNOPSIS ==
13 *pxechn.c32* [-h | --help | -?]
14 *pxechn.c32* -r 'FILE'
15 *pxechn.c32* 'FILE' ['OPTIONS']
16
17
18 == DESCRIPTION ==
19 Chainboot to a new NBP (Network Boot Program) 'FILE' with options to adjust PXE packet #3 (PXENV_PACKET_TYPE_CACHED_REPLY) to alter end behavior.  'FILE' may be a filename, an IP::FN ( 192.168.1.1::path/to/file.0 ), or URL.  'FILE' is parsed to adjust the DHCP 'sname' field/option 66 and 'file' field/option 67.
20 // but these may be override-able in the future.
21
22
23 == OPTIONS ==
24 *-c* 'CONFIG'::
25     PXELINUX config file (DHCP Option 209).
26
27 // *-f* 'MOD'::
28 //     Force behavior specified by 'MOD'
29 //
30 // *-g* 'HOST'::
31 //     Set DHCP gateway/relay.  Parsed by pxe_dns().
32 //
33 *-h*, *--help*, *-?*::
34     Print usage information; invalid options will also cause this.
35
36 // *-n*::
37 //     Use native methods, ignoring underlying gPXE/iPXE.
38 // 
39 // *-N*::
40 //     Use non-native methods to utilize gPXE/iPXE (if available).
41 //
42 *-o* 'OPT.TYPE=VALUE'::
43     Specify a generic option.  'OPT' is in 'DECIMAL INPUT' format (below).  'TYPE' specifies the output type and input syntax.  'b'yte, 'w'ord(2B), 'l'ong(4B), 'q'uad(8B), character 's'tring and colon-separated he'x' 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'
44
45 *-p* 'PATH'::
46     PXELINUX path (DHCP Option 210).
47
48 *-r*::
49     Call the PXE stack with PXENV_RESTART_TFTP.  _Must_ be the only option and before 'FILE'.
50
51 *-t* 'SECONDS'::
52     PXELINUX timeout (DHCP Option 211).
53
54 // *-u*::
55 //     Copy UUID (Option 97) if found in packet #1
56
57 *-w*::
58     wait after loading before booting for user input.
59
60 *-W*::
61     Enable WDS (Windows Deployment Services) - specific options.
62
63
64 == DECIMAL INPUT ==
65 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.
66
67
68 == EXAMPLES ==
69 pxechn.c32 http://myhost.dom.loc/path/nbp.0 -c myconfig
70         Load nbp.0 and set PXELINUX config (option 209).
71
72 pxechn.c32 gpxelinux.0 -p http://172.16.23.1/tftp/ -w -c myconfig -o 15.s=domain.loc -o 6.x=0A:01:01:02:ac:17:4D:Ec -
73         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).
74
75 pxechn.c32 gpxelinux.0 -p http://172.16.23.1/tftp/ -w -X A012345678 -x 197:00d0de00
76 pxechn.c32 gpxelinux.0 -p http://172.16.23.1/tftp/ -w -X A012:3456:78 -x 197:00-d0-de-00
77         Both of these are equivalent.  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.
78
79
80 == NOTES ==
81 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.
82
83 URL specifications in 'FILE' that include user/password before the host will currently cause the siaddr field to not be set properly.
84
85 The non-space constraint is due to how Syslinux variants parse the command line as of 2012-01-12.
86
87
88 == AUTHOR ==
89 {author} <{email}>
90
91
92 == COPYRIGHT ==
93 Copyright \(C) 2012 {author}. Free use of this software is granted under
94 the terms of the GNU General Public License (GPL).