xref: /freebsd/stand/i386/pxeldr/pxeboot.8 (revision 2f513db72b034fd5ef7f080b11be5c711c15186a)
1.\" Copyright (c) 1999 Doug White
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd November 25, 2018
28.Dt PXEBOOT 8
29.Os
30.Sh NAME
31.Nm pxeboot
32.Nd Preboot Execution Environment (PXE) bootloader
33.Sh DESCRIPTION
34The
35.Nm
36bootloader is a modified version of the system third-stage bootstrap
37.Xr loader 8
38configured to run under Intel's Preboot Execution Environment (PXE) system.
39PXE is a form of smart boot ROM, built into Intel EtherExpress Pro/100 and
403Com 3c905c Ethernet cards, and Ethernet-equipped Intel motherboards.
41PXE supports DHCP configuration and provides low-level NIC access services.
42.Pp
43The DHCP client will set a DHCP user class named
44.Va FreeBSD
45to allow flexible configuration of the DHCP server.
46.Pp
47The
48.Nm
49bootloader retrieves the kernel, modules,
50and other files either via NFS over UDP or by TFTP,
51selectable through compile-time options.
52In combination with a memory file system image or NFS-mounted root file system,
53.Nm
54allows for easy,
55EEPROM-burner free construction of diskless machines.
56.Pp
57The
58.Nm
59binary is loaded just like any other boot file,
60by specifying it in the DHCP server's configuration file.
61Below is a sample configuration for the ISC DHCP v3 server:
62.Bd -literal -offset indent
63option domain-name "example.com";
64option routers 10.0.0.1;
65option subnet-mask 255.255.255.0;
66option broadcast-address 10.0.0.255;
67option domain-name-servers 10.0.0.1;
68server-name "DHCPserver";
69server-identifier 10.0.0.1;
70next-server 10.0.0.1;
71
72default-lease-time 120;
73max-lease-time 120;
74
75subnet 10.0.0.0 netmask 255.255.255.0 {
76       filename "pxeboot";
77       range 10.0.0.10 10.0.0.254;
78       if exists user-class and option user-class = "FreeBSD" {
79            option root-path "tftp://10.0.0.1/FreeBSD";
80       }
81}
82
83.Ed
84.Va next-server
85is the IP address of the next server in the bootstrap process, i.e.
86your TFTP server or NFS server.
87.Nm
88recognizes
89.Va option root-path
90directives as the server and path to NFS mount for file requests,
91respectively, or the server to make TFTP requests to.
92Note that
93.Nm
94expects to fetch
95.Pa /boot/loader.rc
96from the specified server before loading any other files.
97.Pp
98Valid
99.Va option root-path
100Syntax is the following
101.Bl -tag -width <scheme>://ip/path indent
102.It /path
103path to the root filesystem on the NFS server
104.It ip:/path
105path to the root filesystem on the NFS server
106.Ar ip
107.It nfs:/path
108path to the root filesystem on the NFS server
109.It nfs://ip/path
110path to the root filesystem on the NFS server
111.Ar ip
112.It tftp:/path
113path to the root filesystem on the TFTP server
114.It tftp://ip/path
115path to the root filesystem on the TFTP server
116.Ar ip
117.El
118.Pp
119.Nm
120defaults to a conservative 1024 byte NFS data packet size.
121This may be changed by setting the
122.Va nfs.read_size
123variable in
124.Pa /boot/loader.conf .
125Valid values range from 1024 to 16384 bytes.
126.Pp
127In all other respects,
128.Nm
129acts just like
130.Xr loader 8 .
131.Pp
132As PXE is still in its infancy, some firmware versions may not work
133properly.
134The
135.Nm
136bootloader has been extensively tested on version 0.99 of Intel firmware;
137pre-release versions of the newer 2.0 firmware are known to have
138problems.
139Check with the device's manufacturer for their latest stable release.
140.Pp
141For further information on Intel's PXE specifications and Wired for
142Management (WfM) systems, see
143.Li http://www.intel.com/design/archives/wfm/ .
144.Sh SEE ALSO
145.Xr loader 8
146.Sh HISTORY
147The
148.Nm
149bootloader first appeared in
150.Fx 4.1 .
151.Sh AUTHORS
152.An -nosplit
153The
154.Nm
155bootloader was written by
156.An John Baldwin Aq jhb@FreeBSD.org
157and
158.An Paul Saab Aq ps@FreeBSD.org .
159This manual page was written by
160.An Doug White Aq dwhite@FreeBSD.org .
161