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) specification.
This manual page assumes the
pxeboot program has been configured via
installboot(8) to use a
boot.cfg(5) file. For historical reasons
boot.cfg(5) is NOT loaded by default. See
EXAMPLES for how to enable it.
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. It immediately issues another DHCP request to get the name of a
boot.cfg(5) file to load, using “boot.cfg” by default. If the boot config file is not found, or if the supplied file appears not to be a boot configuration file, the file is skipped. Otherwise it is loaded and obeyed as described in
boot.cfg(5). If a boot configuration is not loaded, the user has the option to enter a limited version of the standard interactive boot mode by pressing a key within five seconds. After this time, or after the user's
boot command, another DHCP request is issued and the kernel filename returned by the DHCP reply, using “netbsd” by default, is loaded. 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 “boot.cfg” during the first request, and then to the filename argument on the boot command line typed in by the user (can be empty), using “netbsd” in the non-interactive case.
DHCP Vendor class identifier tag
is set to “NetBSD:i386:libsa”.
The DHCP server can use these fields (i.e. the DHCP vendor class identifier tag and the requested file name, possibly supplied by the user's command line input to the
pxeboot program) to distinguish between the various originators of requests (PXE BIOS, first and second
pxeboot stage,
NetBSD kernel), and to alter its behaviour. For example, this can be used to support alternative
NetBSD installations on one machine.
In addition to the standard network interface configuration, the following fields in the DHCP reply are interpreted:
Bootfile name
specifies the protocol to be used, and the filename of the boot config or NetBSD kernel to be booted, separated by a colon. Available protocols are “nfs” and “tftp”. The boot config or kernel filename part is interpreted relatively to the NFS root directory (see the Root path reply field below) or the TFTP server's root directory (which might be a subdirectory 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.
Next server
is used as the location of the tftp server.
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.