From owner-svn-doc-head@FreeBSD.ORG Wed Mar 5 18:27:37 2014 Return-Path: Delivered-To: svn-doc-head@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 310E458F; Wed, 5 Mar 2014 18:27:37 +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 1D1EDBF3; Wed, 5 Mar 2014 18:27:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s25IRaG3036538; Wed, 5 Mar 2014 18:27:36 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s25IRaPT036537; Wed, 5 Mar 2014 18:27:36 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201403051827.s25IRaPT036537@svn.freebsd.org> From: Dru Lavigne Date: Wed, 5 Mar 2014 18:27:36 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44134 - 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-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 18:27:37 -0000 Author: dru Date: Wed Mar 5 18:27:36 2014 New Revision: 44134 URL: http://svnweb.freebsd.org/changeset/doc/44134 Log: Clarify the procedure for setting up the PXE Environment. Comment out some sections which probably no longer apply. 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 Wed Mar 5 18:10:32 2014 (r44133) +++ head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Wed Mar 5 18:27:36 2014 (r44134) @@ -3914,8 +3914,7 @@ ifconfig_lagg0="laggp - Setting Up the &man.chroot.8; Environment for the - <acronym>NFS</acronym> Root File System + Setting Up the <acronym>PXE</acronym> Environment @@ -3931,29 +3930,30 @@ ifconfig_lagg0="laggp + The steps shown in this section configure the built-in + NFS and TFTP servers. The + next section demonstrates how to install and configure the + DHCP server. In this example, the + directory which will contain the files used by PXE users is + /b/tftpboot/FreeBSD/install. It is + important that this directory exists and that the same directory + name is set in both /etc/inetd.conf and + /usr/local/etc/dhcpd.conf. + - Choose a directory which will have a &os; - installation which will be NFS - mountable. For example, a directory such as - /b/tftpboot/FreeBSD/install can be - used. + Create the root directory which will contain a &os; installation + to be NFS mounted: &prompt.root; export NFSROOTDIR=/b/tftpboot/FreeBSD/install &prompt.root; mkdir -p ${NFSROOTDIR} - - Place tftpboot - anywhere on the server. Make sure that the location is - set in both /etc/inetd.conf and - /usr/local/etc/dhcpd.conf. Enable the NFS server by adding this line to - /etc/rc.conf + /etc/rc.conf: nfs_server_enable="YES" - @@ -3965,9 +3965,9 @@ ifconfig_lagg0="laggp - Restart the NFS server: + Start the NFS server: - &prompt.root; service nfsd restart + &prompt.root; service nfsd start @@ -3978,8 +3978,9 @@ ifconfig_lagg0="laggp - Add the following line to - /etc/inetd.conf: + Uncomment the following line in + /etc/inetd.conf by making sure it + does not start with a # symbol: tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /b/tftpboot @@ -3987,22 +3988,21 @@ ifconfig_lagg0="laggp Some PXE versions require the TCP version of - TFTP. In this case, add a second - line, replacing dgram udp with + TFTP. In this case, uncomment the second + tftp line which contains stream tcp. - - Restart &man.inetd.8;: + Start &man.inetd.8;: - &prompt.root; service inetd restart + &prompt.root; service inetd start - Rebuild the &os; kernel and userland (): + Rebuild the &os; kernel and userland (refer to for more detailed instructions): &prompt.root; cd /usr/src &prompt.root; make buildworld @@ -4034,7 +4034,7 @@ Received 264951 bytes in 0.1 secondsNFS: # Device Mountpoint FSType Options Dump Pass -myhost.example.com:/b/tftpboot/FreeBSD/install / nfs ro 0 0 +myhost.example.com:/b/tftpboot/FreeBSD/install / nfs ro 0 0 Replace myhost.example.com with the hostname or IP address of the @@ -4045,18 +4045,16 @@ myhost.example.com:/b/tftpboot/FreeBSD/i - Set the root password in the &man.chroot.8; - environment: + Set the root password in the PXE + environment for client machines which + are PXE booting : &prompt.root; chroot ${NFSROOTDIR} &prompt.root; passwd - - This sets the root password for client machines which - are PXE booting. - Enable &man.ssh.1; root logins for client machines + If needed, enable &man.ssh.1; root logins for client machines which are PXE booting by editing ${NFSROOTDIR}/etc/ssh/sshd_config and enabling PermitRootLogin. This @@ -4064,22 +4062,36 @@ myhost.example.com:/b/tftpboot/FreeBSD/i - Perform other customizations of the &man.chroot.8; - environment in ${NFSROOTDIR}. These customizations could - include things like adding packages with &man.pkg.add.1;, - editing the password file with &man.vipw.8;, or editing - &man.amd.conf.5; maps for automounting. For - example: - - &prompt.root; chroot ${NFSROOTDIR} -&prompt.root; pkg_add -r bash + Perform any other needed customizations of the PXE + environment in ${NFSROOTDIR}. These customizations could + include things like installing packages or + editing the password file with &man.vipw.8;. + + When booting from an NFS root volume, + /etc/rc detects the + NFS boot and runs + /etc/rc.initdiskless. In this case, + /etc and /var need + to be memory backed file systems so that these directories are + writable but the NFS root directory is + read-only: + + &prompt.root; chroot ${NFSROOTDIR} +&prompt.root; mkdir -p conf/base +&prompt.root; tar -c -v -f conf/base/etc.cpio.gz --format cpio --gzip etc +&prompt.root; tar -c -v -f conf/base/var.cpio.gz --format cpio --gzip var + + When the system boots, memory file systems for + /etc and /var will + be created and mounted and the contents of the + cpio.gz files will be copied into + them. - Configuring the <application>ISC - DHCP</application> Server + Configuring the <acronym>DHCP</acronym> Server DHCP @@ -4180,7 +4192,8 @@ myhost.example.com:/b/tftpboot/FreeBSD/i The NFS server will then be the same as the TFTP one. - + Configuring the <acronym>PXE</acronym> Client and