From owner-svn-doc-all@FreeBSD.ORG Tue Mar 4 22:40:58 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A96FAB4; Tue, 4 Mar 2014 22:40:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3569467F; Tue, 4 Mar 2014 22:40:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s24MewtA051546; Tue, 4 Mar 2014 22:40:58 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s24MewvZ051545; Tue, 4 Mar 2014 22:40:58 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201403042240.s24MewvZ051545@svn.freebsd.org> From: Dru Lavigne Date: Tue, 4 Mar 2014 22:40:58 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44123 - head/en_US.ISO8859-1/books/handbook/advanced-networking X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2014 22:40:58 -0000 Author: dru Date: Tue Mar 4 22:40:57 2014 New Revision: 44123 URL: http://svnweb.freebsd.org/changeset/doc/44123 Log: Start to merge content. Many more commits needed to get this into a logical flow. Sponsored by: iXsystems Modified: head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Tue Mar 4 20:54:36 2014 (r44122) +++ head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Tue Mar 4 22:40:57 2014 (r44123) @@ -3862,24 +3862,34 @@ ifconfig_lagg0="laggp is relatively easy to set up because all the necessary elements are readily available: + + The &intel; Preboot eXecution Environment (PXE) can be used to load the kernel over the network. It provides a form of smart boot ROM built into some networking cards or motherboards. See &man.pxeboot.8; for more details. + + A sample script (/usr/share/examples/diskless/clone_root) eases the creation and maintenance of the workstation's root file system on the server. The script will probably require a little customization. + + Standard system startup files exist in /etc to detect and support a diskless system startup. + + Swapping, if needed, can be done either to an NFS file or to a local disk. + + There are many ways to set up diskless workstations. Many elements are involved, and most can be customized to suit local @@ -3893,12 +3903,16 @@ ifconfig_lagg0="laggp The diskless workstations use a shared, read-only / and /usr. + + The root file system is a copy of a standard &os; root, with some configuration files overridden by ones specific to diskless operation or, possibly, to the workstation they belong to. + + The parts of the root which have to be writable are overlaid with &man.md.4; file systems. Any changes will be lost when the system reboots. @@ -3914,28 +3928,8 @@ ifconfig_lagg0="laggp Background Information - Setting up diskless workstations is both relatively - straightforward and prone to errors. These are sometimes - difficult to diagnose for a number of reasons. For - example: - - - - Compile time options may determine different behaviors - at runtime. - - - - Error messages are often cryptic or totally - absent. - - - - In this context, having some knowledge of the background - mechanisms involved is useful to solve the problems that may - arise. - - Several operations need to be performed for a successful + When setting up diskless workstations, several operations + need to be performed for a successful bootstrap: @@ -3950,9 +3944,7 @@ ifconfig_lagg0="laggp configure a system to use only BOOTP and &man.bootpd.8; is included in the base &os; system. - - DHCP has a number of advantages over BOOTP such as nicer configuration files and support for PXE. This @@ -3964,16 +3956,13 @@ ifconfig_lagg0="laggp - The machine needs to transfer one or several programs - to local memory. Either TFTP or - NFS are used. The choice between - TFTP and NFS is a - compile time option in several places. A common source of - error is to specify filenames for the wrong protocol. - TFTP typically transfers all files from - a single directory on the server and expects filenames - relative to this directory. NFS needs - absolute file paths. + The machine needs to boot the loader using + TFTP. + + + + The root filesystem needs to be loaded using + NFS. @@ -3997,15 +3986,21 @@ ifconfig_lagg0="laggp Refer to &man.diskless.8; for more information. - - Configuration Using <application>ISC - DHCP</application> + + Configuring the <application>ISC + DHCP</application> Server DHCP diskless operation + PXE requires a TFTP + and a DHCP server to be set up. The + DHCP server does not need to be the same + machine as the TFTP server, but it needs + to be accessible in the network. + The ISC DHCP server can answer both BOOTP and DHCP requests. @@ -4013,56 +4008,62 @@ ifconfig_lagg0="laggp ISC DHCP is not part of the base system. Install the net/isc-dhcp42-server port or - package. + package, following the instructions documented at . Make sure that + /etc/rc.conf and + /usr/local/etc/dhcpd.conf are + correctly configured.. Once ISC DHCP is installed, edit its configuration file, - /usr/local/etc/dhcpd.conf. Here - follows a commented example for PXE host - corbieres: - - default-lease-time 600; -max-lease-time 7200; -authoritative; - -option domain-name "example.com"; -option domain-name-servers 192.168.4.1; -option routers 192.168.4.1; - -subnet 192.168.4.0 netmask 255.255.255.0 { - use-host-decl-names on; - option subnet-mask 255.255.255.0; - option broadcast-address 192.168.4.255; - - host corbieres { - hardware ethernet 00:02:b3:27:62:df; - fixed-address corbieres.example.com; - next-server 192.168.4.4; - filename "pxeboot"; - option root-path "192.168.4.4:/data/misc/diskless"; - } + /usr/local/etc/dhcpd.conf. Configure + the next-server, + filename, and + option root-path settings to specify + the TFTP server IP + address, the path to /boot/pxeboot + in TFTP, and the path to the + NFS root file system. Here is a sample + dhcpd.conf setup: + + subnet 192.168.0.0 netmask 255.255.255.0 { + range 192.168.0.2 192.168.0.3 ; + option subnet-mask 255.255.255.0 ; + option routers 192.168.0.1 ; + option broadcast-address 192.168.0.255 ; + option domain-name-servers 192.168.35.35, 192.168.35.36 ; + option domain-name "example.com"; + + # IP address of TFTP server + next-server 192.168.0.1 ; + + # path of boot loader obtained + # via tftp + filename "FreeBSD/install/boot/pxeboot" ; + + # pxeboot boot loader will try to NFS mount this directory for root FS + option root-path "192.168.0.1:/b/tftpboot/FreeBSD/install/" ; + } - - + - The next-server directive designates the TFTP or NFS server to use for loading &man.loader.8; or the kernel file. The default is to use the same host as the DHCP server. - - The filename directive defines the file that PXE will load for the next execution step. It must be specified according @@ -4078,9 +4079,7 @@ subnet 192.168.4.0 netmask 255.255.255.0 GENERIC kernel, it is possible to use PXE to boot from a remote CD-ROM. - - The root-path option defines the path to the root file system, in usual NFS notation. When using @@ -4089,27 +4088,40 @@ subnet 192.168.4.0 netmask 255.255.255.0 BOOTP kernel option is not enabled. The NFS server will then be the same as the TFTP one. - - - Configuring the <acronym>TFTP</acronym> and - <acronym>NFS</acronym> Servers + Configuring the + <acronym>NFS</acronym> Server - By default, &man.pxeboot.8; loads the kernel via - NFS. It can be compiled to use - TFTP instead by specifying the - LOADER_TFTP_SUPPORT option in - /etc/make.conf. See the comments in - /usr/share/examples/etc/make.conf for - instructions. - - There are two other make.conf - options which may be useful for setting up a serial console - diskless machine: - BOOT_PXELDR_PROBE_KEYBOARD, and - BOOT_PXELDR_ALWAYS_SERIAL. + Enable + NFS and export the appropriate file + system on the NFS server. + + Add this line to + /etc/rc.conf: + + nfs_server_enable="YES" + + Export the file system where the diskless root + directory is located by adding the following to + /etc/exports. Adjust the + mount point and replace + corbieres with the names of the diskless + workstations: + + /data/misc -alldirs -ro margaux corbieres + + Tell &man.mountd.8; to reread its configuration + file. If NFS is enabled in + /etc/rc.conf, it is recommended + to reboot instead. + + &prompt.root; service mountd restart + + + + Configuring the <acronym>TFTP</acronym> Server To use PXE when the machine starts, select the Boot from network option in @@ -4125,9 +4137,7 @@ subnet 192.168.4.0 netmask 255.255.255.0 diskless operation - If PXE is configured to use - TFTP, enable &man.tftpd.8; on the file - server: + To enable &man.tftpd.8;, perform the following steps: @@ -4166,40 +4176,7 @@ subnet 192.168.4.0 netmask 255.255.255.0 anywhere on the server. Make sure that the location is set in both /etc/inetd.conf and /usr/local/etc/dhcpd.conf. - - Enable - NFS and export the appropriate file - system on the NFS server. - - - - Add this line to - /etc/rc.conf: - - nfs_server_enable="YES" - - - - Export the file system where the diskless root - directory is located by adding the following to - /etc/exports. Adjust the - mount point and replace - corbieres with the names of the diskless - workstations: - - /data/misc -alldirs -ro margaux corbieres - - - - Tell &man.mountd.8; to reread its configuration - file. If NFS is enabled in - /etc/rc.conf, it is recommended - to reboot instead. - - &prompt.root; service mountd restart - - - + Preparing the Root File System @@ -4520,59 +4497,6 @@ myhost.example.com:/b/tftpboot/FreeBSD/i them. - - Setting up the <acronym>DHCP</acronym> Server - - PXE requires a TFTP - and a DHCP server to be set up. The - DHCP server does not need to be the same - machine as the TFTP server, but it needs - to be accessible in the network. - - - - Install the DHCP server by - following the instructions documented at . Make sure that - /etc/rc.conf and - /usr/local/etc/dhcpd.conf are - correctly configured. - - - - In /usr/local/etc/dhcpd.conf, - configure the next-server, - filename, and - option root-path settings to specify - the TFTP server IP - address, the path to /boot/pxeboot - in TFTP, and the path to the - NFS root file system. Here is a sample - dhcpd.conf setup: - - subnet 192.168.0.0 netmask 255.255.255.0 { - range 192.168.0.2 192.168.0.3 ; - option subnet-mask 255.255.255.0 ; - option routers 192.168.0.1 ; - option broadcast-address 192.168.0.255 ; - option domain-name-servers 192.168.35.35, 192.168.35.36 ; - option domain-name "example.com"; - - # IP address of TFTP server - next-server 192.168.0.1 ; - - # path of boot loader obtained - # via tftp - filename "FreeBSD/install/boot/pxeboot" ; - - # pxeboot boot loader will try to NFS mount this directory for root FS - option root-path "192.168.0.1:/b/tftpboot/FreeBSD/install/" ; - -} - - - - Configuring the <acronym>PXE</acronym> Client and Debugging Connection Problems