xref: /freebsd/stand/i386/pxeldr/pxeboot.8 (revision 4b9d605768acabc460aa6dcfe8a1f8db35b16794)
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.Dd February 15, 2021
26.Dt PXEBOOT 8
27.Os
28.Sh NAME
29.Nm pxeboot
30.Nd Preboot Execution Environment (PXE) bootloader
31.Sh DESCRIPTION
32The
33.Nm
34bootloader is a modified version of the system third-stage bootstrap
35.Xr loader 8
36configured to run under Intel's Preboot Execution Environment (PXE) system.
37PXE is a form of smart boot ROM, built into Intel EtherExpress Pro/100 and
383Com 3c905c Ethernet cards, and Ethernet-equipped Intel motherboards.
39PXE supports DHCP configuration and provides low-level NIC access services.
40.Pp
41The DHCP client will set a DHCP user class named
42.Va FreeBSD
43to allow flexible configuration of the DHCP server.
44.Pp
45The
46.Nm
47bootloader retrieves the kernel, modules,
48and other files either via NFS over UDP or by TFTP,
49selectable through compile-time options.
50In combination with a memory file system image or NFS-mounted root file system,
51.Nm
52allows for easy,
53EEPROM-burner free construction of diskless machines.
54.Pp
55The
56.Nm
57binary is loaded just like any other boot file,
58by specifying it in the DHCP server's configuration file.
59Below is a sample configuration for the ISC DHCP v3 server:
60.Bd -literal -offset indent
61option domain-name "example.com";
62option routers 10.0.0.1;
63option subnet-mask 255.255.255.0;
64option broadcast-address 10.0.0.255;
65option domain-name-servers 10.0.0.1;
66server-name "DHCPserver";
67server-identifier 10.0.0.1;
68next-server 10.0.0.1;
69
70default-lease-time 120;
71max-lease-time 120;
72
73subnet 10.0.0.0 netmask 255.255.255.0 {
74       filename "pxeboot";
75       range 10.0.0.10 10.0.0.254;
76       if exists user-class and option user-class = "FreeBSD" {
77            option root-path "tftp://10.0.0.1/FreeBSD";
78       }
79}
80
81.Ed
82.Va next-server
83is the IP address of the next server in the bootstrap process, i.e.
84your TFTP server or NFS server.
85.Nm
86recognizes
87.Va option root-path
88directives as the server and path to NFS mount for file requests,
89respectively, or the server to make TFTP requests to.
90Note that
91.Nm
92expects to fetch
93.Pa /boot/loader.rc
94from the specified server before loading any other files.
95.Pp
96Valid
97.Va option root-path
98syntax is the following
99.Bl -tag -width <scheme>://ip/path
100.It /path
101path to the root filesystem on the NFS server
102.It ip://path
103path to the root filesystem on the NFS server
104.Ar ip
105.It nfs://path
106path to the root filesystem on the NFS server
107.It nfs://ip/path
108path to the root filesystem on the NFS server
109.Ar ip
110.It tftp://path
111path to the root filesystem on the TFTP server
112.It tftp://ip/path
113path to the root filesystem on the TFTP server
114.Ar ip
115.El
116.Pp
117.Nm
118defaults to a conservative 1024 byte NFS data packet size.
119This may be changed by setting the
120.Va nfs.read_size
121variable in
122.Pa /boot/loader.conf .
123Valid values range from 1024 to 16384 bytes.
124.Pp
125In all other respects,
126.Nm
127acts just like
128.Xr loader 8 .
129.Pp
130For further information on Intel's PXE specifications and Wired for
131Management (WfM) systems, see
132.Li http://www.pix.net/software/pxeboot/archive/pxespec.pdf .
133.Sh SEE ALSO
134.Xr loader 8
135.Sh HISTORY
136The
137.Nm
138bootloader first appeared in
139.Fx 4.1 .
140.Sh AUTHORS
141.An -nosplit
142The
143.Nm
144bootloader was written by
145.An John Baldwin Aq jhb@FreeBSD.org
146and
147.An Paul Saab Aq ps@FreeBSD.org .
148This manual page was written by
149.An Doug White Aq dwhite@FreeBSD.org .
150