xref: /openbsd-src/sys/arch/i386/stand/pxeboot/pxeboot.8 (revision 46814f9cae3ca88d4c8b186141f19555d1b1323d)
1.\"	$OpenBSD: pxeboot.8,v 1.13 2014/05/20 22:49:43 halex Exp $
2.\" Copyright (c) 2004 Tom Cosgrove
3.\" Copyright (c) 2003 Matthias Drochner
4.\" Copyright (c) 1999 Doug White
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd $Mdocdate: May 20 2014 $
29.Dt PXEBOOT 8 i386
30.Os
31.Sh NAME
32.Nm pxeboot
33.Nd i386-specific second-stage PXE bootstrap
34.Sh DESCRIPTION
35.Nm
36is a modified version of the i386 second-stage bootstrap program,
37.Xr boot 8 ,
38configured to run under Intel's Preboot Execution Environment (PXE).
39PXE is a form of smart boot ROM, built into many Ethernet cards from Intel,
403Com, and other manufacturers.
41.Pp
42The computer's PXE boot ROM contacts a DHCP server by broadcasting a request
43on the network.
44It gets an IP address from the DHCP server,
45then it is told the name of the boot program to download \(em
46in this case, the boot program is
47.Nm .
48The ROM downloads the boot program using TFTP, then executes it.
49.Pp
50The
51.Nm
52boot program will look for an
53.Pa /etc/boot.conf
54configuration
55file on the TFTP server.
56If it finds one, it processes the commands within it.
57.Pa boot.conf
58processing can be skipped by holding down either Control key as
59.Nm
60starts.
61.Pp
62.Nm
63then sits in a loop,
64processing commands given by the user.
65It accepts all the commands accepted by
66.Xr boot 8 .
67.Pp
68If no commands are given for a short time,
69.Nm
70will then attempt to load the
71.Ox
72kernel
73.Pa bsd
74via TFTP.
75It may be told to boot an alternative kernel,
76either by commands in the
77.Pa boot.conf
78file,
79or by commands typed by the user at the
80.Ic boot\*(Gt
81prompt.
82.Nm
83can be used for
84.Xr diskless 8
85setups or to load the
86.Pa bsd.rd
87install kernel
88for network installs.
89.Pp
90To prepare a server to support network booting,
91the
92.Xr dhcpd 8
93and
94.Xr tftpd 8
95services should be enabled and configured.
96.Pp
97.Nm
98and the kernel should be copied into the TFTP server's root directory
99(typically
100.Pa /tftpboot ) .
101A
102.Pa boot.conf
103file may be created if required
104(e.g.\&
105.Pa /tftpboot/etc/boot.conf ) .
106.Pp
107A sample configuration file for
108.Xr dhcpd 8
109might be as follows:
110.Bd -literal -offset indent
111option domain-name "example.com";
112option routers 10.0.0.1;
113option subnet-mask 255.255.255.0;
114option broadcast-address 10.0.0.255;
115option domain-name-servers 10.0.0.1;
116server-name "DHCPserver";
117server-identifier 10.0.0.1;
118next-server 10.0.0.1;
119
120default-lease-time 120;
121max-lease-time 120;
122
123subnet 10.0.0.0 netmask 255.255.255.0 {
124    filename "pxeboot";
125    range 10.0.0.10 10.0.0.254;
126}
127.Ed
128.Pp
129See
130.Xr dhcpd 8
131and
132.Xr dhcpd.conf 5
133for more information.
134.Sh FILES
135.Bl -tag -width /usr/mdec/pxebootxx -compact
136.It Pa /usr/mdec/pxeboot
137PXE-specific second-stage bootstrap
138.It Pa /etc/boot.conf
139.Nm
140configuration file (read from TFTP server)
141.It Pa /etc/dhcpd.conf
142DHCPD configuration file
143.It Pa /tftpboot
144Default root directory for
145.Xr tftpd 8
146.El
147.Sh EXAMPLES
148Boot the install kernel:
149.Pp
150.Dl boot\*(Gt bsd.rd
151.Pp
152The same thing:
153.Pp
154.Dl boot\*(Gt boot tftp:bsd.rd
155.Sh SEE ALSO
156.Xr dhcpd.conf 5 ,
157.Xr boot 8 ,
158.Xr boot_i386 8 ,
159.Xr dhcpd 8 ,
160.Xr diskless 8 ,
161.Xr tftpd 8
162.Sh STANDARDS
163.Rs
164.%T Preboot Execution Environment (PXE) Specification
165.%N Version 2.1
166.%D September 20, 1999
167.%A Intel Corporation
168.Re
169.Sh HISTORY
170The
171.Nm
172command first appeared in
173.Ox 3.5 .
174