1 .\" $NetBSD: pxeboot.8,v 1.14 2009/04/10 21:11:28 perry Exp $
4 .\" Matthias Drochner. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd network boot NetBSD/i386 through a PXE BIOS extension
37 boot program running on top of a
41 provided by the motherboard or a plug-in network adapter,
42 in accordance with the
44 Preboot eXecution Environement
48 Network booting a system through
50 is a two-stage process:
59 request and fetches the
68 program takes control.
69 It immediately issues another
71 request to get the name of a
76 If the boot config file is not found, or if the supplied file appears
77 not to be a boot configuration file, the file is skipped.
78 Otherwise it is loaded and obeyed as described in
80 .\" XXX Now, if the boot.cfg is loaded, is DHCP still used to get the
81 .\" XXX file name for the kernel? If only the person who had made the
82 .\" XXX changes had documented them.
83 If a boot configuration is not loaded, the user has the option to
84 enter a limited version of the standard interactive boot mode by
85 pressing a key within five seconds.
86 After this time, or after the user's
90 request is issued and the kernel filename returned by the
96 To read the kernel file, the
101 protocols can be used.
106 request issued by the
109 program has the following special parameters:
114 during the first request, and then to
119 command line typed in by the user (can be empty), using
121 in the non-interactive case.
122 .It DHCP Vendor class identifier tag
124 .Dq NetBSD:i386:libsa .
129 server can use these fields (i.e. the
131 vendor class identifier tag and the requested file name, possibly
132 supplied by the user's command line input to the
134 program) to distinguish between the various originators of requests
135 (PXE BIOS, first and second
139 kernel), and to alter its behaviour.
140 For example, this can be used to support alternative
142 installations on one machine.
144 In addition to the standard network interface configuration,
145 the following fields in the
147 reply are interpreted:
150 specifies the protocol to be used, and the filename of the
153 kernel to be booted, separated by a colon.
154 Available protocols are
158 The boot config or kernel filename part is interpreted relatively to
159 the NFS root directory (see the
161 reply field below) or the TFTP server's root directory (which might be a
162 subdirectory within the TFTP server's filesystem, depending on the
163 implementation), respectively.
166 field replied by the DHCP server does not contain a colon,
167 it is ignored, and the
171 command line prompt (or the
173 default, see the section about the
175 field in the DHCP request above) is used.
176 If no protocol was specified,
180 is used as the location of the tftp server.
182 can be used to override the
183 .Dq server IP address
186 is used to access the kernel.
187 This matches the behaviour of the
189 kernel to access its root file system on
195 servers can be communicated to
200 it is actually a deficiency of the
202 protocol to provide a
204 field but no corresponding IP address
207 is used as path to be mounted in the
209 case to access the kernel file, matching the
214 The commands accepted in interactive mode are:
215 .\" NOTE: some of this text is duplicated in the MI boot.8
216 .\" and in other i386-specific *boot.8 files;
217 .\" please try to keep all relevant files synchronized.
218 .Bl -tag -width 04n -offset 04n
219 .It Ic boot Oo Va device : Ns Oc Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
228 Print an overview about commands and arguments.
235 By default the output from
237 and from the booted kernel will go to the system's BIOS console.
238 This can be changed to be one of the serial ports by using
240 to modify the boot options contained in the
244 .Bl -tag -width /usr/mdec/pxeboot_ia32.bin
245 .It Pa /usr/mdec/pxeboot_ia32.bin
250 example shows a simple configuration which just loads
254 from the client's NFS root directory, using the defaults for
255 protocol and kernel filename.
256 Similar setups should be possible with any BOOTP/DHCP server.
260 hardware ethernet 00:00:00:00:00:00;
261 fixed-address myhost;
262 option host-name "myhost";
263 filename "pxeboot_ia32.bin";
264 option swap-server mynfsserver;
265 option root-path "/export/myhost";
271 entry sets loads the boot config and kernel over tftp.
272 This can be used, for example, for installing machines by using
277 hardware ethernet 00:00:00:00:00:00;
278 fixed-address myhost;
279 option host-name "myhost";
280 next-server mytftpserver;
282 # This section allows dhcpd to respond with different answers
283 # for the different tftp requests for the bootloader and kernel.
284 if substring (option vendor-class-identifier, 0, 20)
285 = "PXEClient:Arch:00000" {
286 filename "pxeboot_ia32.bin";
287 } elsif substring (option vendor-class-identifier, 0, 17)
288 = "NetBSD:i386:libsa" {
289 if filename = "boot.cfg" {
290 filename "tftp:boot.cfg";
291 } else if filename = "netbsd" {
292 filename "tftp:netbsd-INSTALL.gz";
301 entry shows how different system installations can be booted depending on
302 the user's input on the
308 hardware ethernet 00:00:00:00:00:00;
309 fixed-address myhost;
310 option host-name "myhost";
311 next-server mytftpserver;
312 if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
313 filename "pxeboot_ia32.bin";
314 } elsif filename = "boot.cfg" {
315 filename "tftp:boot.cfg";
316 } elsif filename = "tftp" {
317 filename "tftp:netbsd.myhost";
319 option swap-server mynfsserver;
320 option root-path "/export/myhost";
321 if filename = "generic" {
322 filename "nfs:gennetbsd";
324 filename "nfs:netbsd";
332 server is supplied using the
337 server for the root file system is
340 .Em swap-server:root-path
345 kernel to mount the root file system.
353 .%T Preboot Execution Environment (PXE) Specification
355 .%D September 20, 1999
356 .%A Intel Corporation
362 command first appeared in
365 If an error is encountered while reading the
367 kernel file or if its file format wasn't recognized, it is
368 impossible to retry the operation because the
370 network stack is already removed from the system RAM.
374 from an i386 build to boot an i386 kernel,
375 and that from an amd64 build to boot an amd64 kernel.