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