pxeboot(8)
- NetBSD Manual Pages
PXEBOOT(8) NetBSD/i386 System Manager's Manual PXEBOOT(8)
NAME
pxeboot -- network boot NetBSD/i386 through a PXE BIOS extension
DESCRIPTION
pxeboot is a NetBSD boot program running on top of a PXE BIOS extension
which is provided by the motherboard or a plug-in network adapter, in
accordance with the Intel Preboot eXecution Environement (PXE) specifica-
tion.
Network booting a system through PXE is a two-stage process:
1. The PXE BIOS issues a DHCP request and fetches the NetBSD pxeboot
program using TFTP.
2. The NetBSD pxeboot program takes control. An interactive mode is
entered if the user presses a key within five seconds. After this
time or after the user's boot command, another DHCP request is
issued and the kernel is loaded as specified in the DHCP reply. To
read the kernel file, the NFS (version 2) or TFTP protocols can be
used.
The DHCP request issued by the NetBSD pxeboot program has the following
special parameters:
Bootfile name
is set to the filename argument on the boot command line typed in
by the user (can be empty), or to ``netbsd'' in the non-interactive
case.
DHCP Vendor class identifier tag
is set to ``NetBSD:i386:libsa''.
The DHCP server can use these fields to distinguish between the various
originators of requests (first and second PXE stage, NetBSD kernel), and
to control conditional behaviour depending on the user's command line
input to the pxeboot program, e.g. to support alternative NetBSD instal-
lations on one machine.
In addition to the standard network interface configuration, the follow-
ing fields in the DHCP reply are interpreted:
Bootfile name
specifies the protocol to be used, and the filename of the NetBSD
kernel to be booted, separated by a colon. Available protocols are
``nfs'' and ``tftp''. The kernel filename part is interpreted rel-
atively to the NFS root directory (see the Root path reply field
below) or the TFTP server's root directory (which might be a subdi-
rectory within the TFTP server's filesystem, depending on the
implementation), respectively. If the Bootfile name field replied
by the DHCP server does not contain a colon, it is ignored, and the
filename typed in at the pxeboot command line prompt (or the
``netbsd'' default, see the section about the Bootfile name field
in the DHCP request above) is used. If no protocol was specified,
``nfs'' is assumed.
Swap server
can be used to override the ``server IP address'' if NFS is used to
access the kernel. This matches the behaviour of the NetBSD kernel
to access its root file system on NFS. This way, different TFTP
and NFS servers can be communicated to the DHCP client (it is
actually a deficiency of the DHCP protocol to provide a ``root
path'' field but no corresponding IP address).
Root path
is used as path to be mounted in the NFS case to access the kernel
file, matching the NetBSD kernel's behaviour.
The commands accepted in interactive mode are:
boot [device:][filename] [-1234abcdmqsvxz]
Boot NetBSD. See boot in boot(8) for full details.
help Print an overview about commands and arguments.
quit Leave the pxeboot program.
By default the output from pxeboot and from the booted kernel will go to
the system's BIOS console. This can be changed to be one of the serial
ports by using installboot to modify the boot options contained in the
pxeboot_ia32.bin file.
FILES
/usr/mdec/pxeboot_ia32.bin
EXAMPLES
The first /etc/dhcpd.conf example shows a simple configuration which just
loads a file ``netbsd'' from the client's NFS root directory, using the
defaults for protocol and kernel filename. Similar setups should be pos-
sible with any BOOTP/DHCP server.
host myhost {
hardware ethernet 00:00:00:00:00:00;
fixed-address myhost;
option host-name "myhost";
filename "pxeboot_ia32.bin";
option swap-server mynfsserver;
option root-path "/export/myhost";
}
The following /etc/dhcpd.conf entry shows how different system installa-
tions can be booted depending on the user's input on the pxeboot command
line.
host myhost {
hardware ethernet 00:00:00:00:00:00;
fixed-address myhost;
option host-name "myhost";
if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
filename "pxeboot_ia32.bin";
} elsif filename = "tftp" {
filename "tftp:netbsd.myhost";
} else {
option swap-server mynfsserver;
option root-path "/export/myhost";
if filename = "generic" {
filename "nfs:gennetbsd";
} else {
filename "nfs:netbsd";
}
}
}
It is assumed that the TFTP server is the same as the DHCP server unless
a next-server directive is specified somewhere else in dhcpd.conf, and
that the NFS server for the root file system is mynfsserver. The
swap-server:root-path is only used in the NFS case and by the NetBSD ker-
nel to mount the root file system.
SEE ALSO
boot(8), dhcpd(8), diskless(8), installboot(8)
Intel Corporation, Preboot Execution Environment (PXE) Specification,
Version 2.1, September 20, 1999.
HISTORY
The NetBSD/i386 pxeboot command first appeared in NetBSD 1.6.
BUGS
If an error is encountered while reading the NetBSD kernel file or if its
file format wasn't recognized, it is impossible to retry the operation
because the PXE network stack is already removed from the system RAM.
You need the pxeboot from an i386 build to boot an i386 kernel, and that
from an amd64 build to boot an amd64 kernel.
NetBSD 5.0 October 13, 2008 NetBSD 5.0
Powered by man-cgi (2024-03-20).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.