From owner-svn-doc-head@FreeBSD.ORG Wed Mar 5 16:29:38 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10B50A9C; Wed, 5 Mar 2014 16:29:38 +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 F00E4DF7; Wed, 5 Mar 2014 16:29: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 s25GTbJR086642; Wed, 5 Mar 2014 16:29:37 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s25GTb8T086641; Wed, 5 Mar 2014 16:29:37 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201403051629.s25GTb8T086641@svn.freebsd.org> From: Dru Lavigne Date: Wed, 5 Mar 2014 16:29:37 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44131 - 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 16:29:38 -0000 Author: dru Date: Wed Mar 5 16:29:37 2014 New Revision: 44131 URL: http://svnweb.freebsd.org/changeset/doc/44131 Log: Last merge shuffle in prep for technical review. Next few commits will clarify the info and check the order in which it is presented. 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 15:30:24 2014 (r44130) +++ head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Wed Mar 5 16:29:37 2014 (r44131) @@ -3891,6 +3891,11 @@ ifconfig_lagg0="laggp + To use PXE when the machine starts, + select the Boot from network option in + the BIOS setup or type a function key + during system initialization. + There are many ways to set up diskless workstations. Many elements are involved, and most can be customized to suit local taste. The following will describe variations on the setup of a @@ -3983,9 +3988,200 @@ ifconfig_lagg0="laggp + Place tftpboot + anywhere on the server. Make sure that the location is + set in both /etc/inetd.conf and + /usr/local/etc/dhcpd.conf. + Refer to &man.diskless.8; for more information. + + + Setting Up the &man.chroot.8; Environment for the + <acronym>NFS</acronym> Root File System + + + + + Craig + Rodrigues + + +
rodrigc@FreeBSD.org
+
+ Written by +
+
+
+ + The &intel; Preboot eXecution Environment + (PXE) allows booting the operating system + over the network. PXE support is usually + provided in the BIOS where it can be enabled + in the BIOS settings which enable booting + from the network. A fully functioning + PXE setup also requires properly configured + DHCP and TFTP + servers. + + When the host computer boots, it receives information over + DHCP about where to obtain the initial boot + loader via TFTP. After the host computer + receives this information, it downloads the boot loader via + TFTP and then executes the boot loader. + This is documented in section 2.2.1 of the Preboot + Execution Environment (PXE) + Specification. In &os;, the boot loader retrieved + during the PXE process is + /boot/pxeboot. After + /boot/pxeboot executes, the &os; kernel is + loaded and the rest of the &os; bootup sequence proceeds. + Refer to for more information about the + &os; booting process. + + + + 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. + + &prompt.root; export NFSROOTDIR=/b/tftpboot/FreeBSD/install +&prompt.root; mkdir -p ${NFSROOTDIR} + + + + Enable the NFS server by adding this line to + /etc/rc.conf + + nfs_server_enable="YES" + + + + + Export the diskless root directory via NFS by + adding the following to + /etc/exports: + + /b -ro -alldirs + + + + Restart the NFS server: + + &prompt.root; service nfsd restart + + + + Enable &man.inetd.8; by adding the following line to + /etc/rc.conf: + + inetd_enable="YES" + + + + Add the following line to + /etc/inetd.conf: + + tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /b/tftpboot + + + Some + PXE versions require the + TCP version of + TFTP. In this case, add a second + line, replacing dgram udp with + stream tcp. + + + + + + Restart &man.inetd.8;: + + &prompt.root; service inetd restart + + + + Rebuild the &os; kernel and userland (): + + &prompt.root; cd /usr/src +&prompt.root; make buildworld +&prompt.root; make buildkernel + + + + Install &os; into the directory mounted over + NFS: + + &prompt.root; make installworld DESTDIR=${NFSROOTDIR} +&prompt.root; make installkernel DESTDIR=${NFSROOTDIR} +&prompt.root; make distribution DESTDIR=${NFSROOTDIR} + + + + Test that the TFTP server works + and can download the boot loader which will be obtained + via PXE: + + &prompt.root; tftp localhost +tftp> get FreeBSD/install/boot/pxeboot +Received 264951 bytes in 0.1 seconds + + + + Edit ${NFSROOTDIR}/etc/fstab and + create an entry to mount the root file system over + NFS: + + # Device Mountpoint FSType Options Dump Pass +myhost.example.com:/b/tftpboot/FreeBSD/install / nfs ro 0 0 + + Replace myhost.example.com + with the hostname or IP address of the + NFS server. In this example, the root + file system is mounted read-only in order to prevent + NFS clients from potentially deleting + the contents of the root file system. + + + + Set the root password in the &man.chroot.8; + environment: + + &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 + which are PXE booting by editing + ${NFSROOTDIR}/etc/ssh/sshd_config + and enabling PermitRootLogin. This + option is documented in &man.sshd.config.5;. + + + + 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 + + +
+ Configuring the <application>ISC DHCP</application> Server @@ -4091,94 +4287,6 @@ ifconfig_lagg0="laggp - Configuring the - <acronym>NFS</acronym> Server - - 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 - the BIOS setup or type a function key - during system initialization. - - - TFTP - diskless operation - - - NFS - diskless operation - - - To enable &man.tftpd.8;, perform the following steps: - - - - Create a directory from which &man.tftpd.8; will - serve the files, such as - /tftpboot. - - - - Add this line to - /etc/inetd.conf: - - tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot - - - Some - PXE versions require the - TCP version of - TFTP. In this case, add a second - line, replacing dgram udp with - stream tcp. - - - - - Tell &man.inetd.8; to reread its configuration file. - Add to - /etc/rc.conf in order for this - command to execute correctly: - - &prompt.root; service inetd restart - - - - Place tftpboot - anywhere on the server. Make sure that the location is - set in both /etc/inetd.conf and - /usr/local/etc/dhcpd.conf. - - - Preparing the Root File System @@ -4294,183 +4402,6 @@ cd /usr/src/etc; make distribution - - - PXE Booting with an <acronym>NFS</acronym> Root File - System - - - - - Craig - Rodrigues - - -
rodrigc@FreeBSD.org
-
- Written by -
-
-
- - The &intel; Preboot eXecution Environment - (PXE) allows booting the operating system - over the network. PXE support is usually - provided in the BIOS where it can be enabled - in the BIOS settings which enable booting - from the network. A fully functioning - PXE setup also requires properly configured - DHCP and TFTP - servers. - - When the host computer boots, it receives information over - DHCP about where to obtain the initial boot - loader via TFTP. After the host computer - receives this information, it downloads the boot loader via - TFTP and then executes the boot loader. - This is documented in section 2.2.1 of the Preboot - Execution Environment (PXE) - Specification. In &os;, the boot loader retrieved - during the PXE process is - /boot/pxeboot. After - /boot/pxeboot executes, the &os; kernel is - loaded and the rest of the &os; bootup sequence proceeds. - Refer to for more information about the - &os; booting process. -
- - - Setting Up the &man.chroot.8; Environment for the - <acronym>NFS</acronym> Root File System - - - - 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. - - &prompt.root; export NFSROOTDIR=/b/tftpboot/FreeBSD/install -&prompt.root; mkdir -p ${NFSROOTDIR} - - - - Enable the NFS server by following - the instructions in . - - - - Export the directory via NFS by - adding the following to - /etc/exports: - - /b -ro -alldirs - - - - Restart the NFS server: - - &prompt.root; service nfsd restart - - - - Enable &man.inetd.8; by following the steps outlined - in . - - - - Add the following line to - /etc/inetd.conf: - - tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /b/tftpboot - - - - Restart &man.inetd.8;: - - &prompt.root; service inetd restart - - - - Rebuild the &os; kernel and userland (): - - &prompt.root; cd /usr/src -&prompt.root; make buildworld -&prompt.root; make buildkernel - - - - Install &os; into the directory mounted over - NFS: - - &prompt.root; make installworld DESTDIR=${NFSROOTDIR} -&prompt.root; make installkernel DESTDIR=${NFSROOTDIR} -&prompt.root; make distribution DESTDIR=${NFSROOTDIR} - - - - Test that the TFTP server works - and can download the boot loader which will be obtained - via PXE: - - &prompt.root; tftp localhost -tftp> get FreeBSD/install/boot/pxeboot -Received 264951 bytes in 0.1 seconds - - - - Edit ${NFSROOTDIR}/etc/fstab and - create an entry to mount the root file system over - NFS: - - # Device Mountpoint FSType Options Dump Pass -myhost.example.com:/b/tftpboot/FreeBSD/install / nfs ro 0 0 - - Replace myhost.example.com - with the hostname or IP address of the - NFS server. In this example, the root - file system is mounted read-only in order to prevent - NFS clients from potentially deleting - the contents of the root file system. - - - - Set the root password in the &man.chroot.8; - environment: - - &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 - which are PXE booting by editing - ${NFSROOTDIR}/etc/ssh/sshd_config - and enabling PermitRootLogin. This - option is documented in &man.sshd.config.5;. - - - - 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 - - - - Configuring Memory File Systems Used by <filename>/etc/rc.initdiskless</filename>