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