1 = pxechn.c32(1) = 2 :doctype: manpage 3 :author: Gene Cumm 4 :email: gene.cumm (a] gmail.com 5 :revdate: 2012-09-16 6 7 8 == NAME == 9 pxechn.c32 - Chainboot to new Network Boot Program (NBP) 10 11 12 == SYNOPSIS == 13 [verse] 14 *pxechn.c32* [-h | --help | -?] 15 *pxechn.c32* -r 'FILE' 16 *pxechn.c32* 'FILE' ['OPTIONS'] 17 18 19 == DESCRIPTION == 20 Chainboot to a new Network Boot Program (NBP) 'FILE' with options to 21 adjust PXE packet #3 (PXENV_PACKET_TYPE_CACHED_REPLY) to alter end 22 behavior. 'FILE' may be a filename, an IP::FN ( 23 192.168.1.1::path/to/file.0 ), or URL. 'FILE' is parsed to adjust the 24 DHCP 'sname' field/option 66 and 'file' field/option 67. 25 // but these may be override-able in the future. 26 27 28 == OPTIONS == 29 *-c* 'CONFIG':: 30 'config' file for PXELINUX (DHCP Option 209). 31 32 // *-f* 'MOD':: 33 // 'Force' behavior specified by modifier 'MOD' 34 // 35 // *-g* 'HOST':: 36 // Set 'gateway'/relay DHCP field to 'HOST'. Parsed by pxe_dns(). 37 // 38 *-h*, *--help*, *-?*:: 39 Print 'help'/usage information; invalid options will also cause 40 this. 41 42 // *-n*:: 43 // Use 'native' methods, ignoring underlying gPXE/iPXE. 44 // 45 // *-N*:: 46 // Use 'non-native' methods to utilize gPXE/iPXE (if available). 47 // 48 *-o* 'OPT.TYPE=VALUE':: 49 Set 'option'. 'OPT' is in 'DECIMAL INPUT' format (below). 'TYPE' 50 specifies the output type and input syntax (listed here in quotes 51 and at present, 1 character). ''b'yte', ''w'ord'(2B), ''l'ong'(4B), 52 ''q'uad'(8B), character ''s'tring' and colon-separated 'he'x'' 53 string (case insensitive; bytes must have 2 digits and each byte 54 must be separated). byte, word, long and quad input values must 55 meet criteria for 'DECIMAL INPUT' 56 57 *-p* 'PATH':: 58 'path' option for PXELINUX (DHCP Option 210). 59 60 *-r*:: 61 'restart'. Call the PXE stack with PXENV_RESTART_TFTP. _Must_ be 62 the only option and before 'FILE'. 63 64 *-S*:: 65 Set 'sip' based on sname field/option 66 (by direct IP if a 66 period-delimited address or otherwise DNS). 67 68 *-t* 'SECONDS':: 69 'timeout' option for PXELINUX (DHCP Option 211). 70 71 // *-u*:: 72 // Copy 'UUID' (Option 97) if found in packet #1 73 74 *-w*:: 75 'wait'. After loading, wait for user input before booting. 76 77 *-W*:: 78 Enable 'WDS' (Windows Deployment Services) - specific options. 79 'FILE' (or its overrides for DHCP fields siaddr and file) must point 80 at the WDS server. 81 *NOTE:* As of 2012-05-31, there is a known issue with gPXE/iPXE, at 82 least with undionly.kkpxe. 83 // PXELINUX asks gPXE/iPXE to unload, reverting to an underlying stack 84 85 86 == DECIMAL INPUT == 87 All parameters that are defaulted to decimal format are processed by 88 *strtoul*(3) with a base of 0 which allows alternate formats and finds a 89 suitable non-space separating character. 90 91 92 == EXAMPLES == 93 `pxechn.c32 http://myhost.dom.loc/path/nbp.0 -c myconfig`:: 94 Load nbp.0 and set PXELINUX config (option 209). 95 96 `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 -`:: 97 Load gpxelinux.0 from the current directory, set prefix, wait to 98 execute, set first config, set the domain name and 2 domain name 99 servers (case mixed to show insensitivity; 10.1.1.2 and 100 172.23.77.236). 101 102 `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`:: 103 Load gpxelinux.0 (relative to the current directory and not 104 altering sname/option 66), set the PXELINUX path prefix, wait after 105 loading, set option 160 to 0x12 0x34 0x56 0x78, and option 197 to 106 0x00 0xD0 0xDE 0x00. 107 108 `pxechn.c32 10.1.1.8:boot\x86\wdsnbp.com -W`:: 109 Load wdsnbp.com from 10.1.1.8 and copy DHCP Option 66 to DHCP 110 field sname if there's room. 111 112 `pxechn.c32 10.1.1.4:boot\x86\wdsnbp.com -W -o 66.x=0a:01:01:08 -S`:: 113 Load wdsnbp.com from 10.1.1.4, point packets to 10.1.1.8 for use 114 with WDS, copy DHCP Option 66 to DHCP field sname if there's room 115 and decode this to an IPv4 address. 116 117 118 == NOTES == 119 Please note that some NBPs may ignore packet #3 by either not examining 120 it at all or by issuing its own DHCP DISCOVER/REQUEST, negating all DHCP 121 field/option modifications by pxechn.c32, including Microsoft Windows 122 Server 2008R2 WDS's wdsnbp.com. See also option '-W'. 123 124 URL specifications in 'FILE' that include user/password before the host 125 will currently cause the siaddr field to not be set properly. 126 127 The non-space constraint is due to how Syslinux variants parse the 128 command line as of 2012-09-16. 129 130 131 == AUTHOR == 132 {author} <{email}> 133 134 135 == COPYRIGHT == 136 Copyright \(C) 2012 {author}. Free use of this software is granted under 137 the terms of the GNU General Public License (GPL), version 2 (GPLv2) 138 (or, at your option, any later version). 139