From a56e5fb7f8dbb67f52ee0830cf3b0da3fc188c42 Mon Sep 17 00:00:00 2001 From: Dru Lavigne Date: Wed, 5 Mar 2014 18:27:36 +0000 Subject: [PATCH] Clarify the procedure for setting up the PXE Environment. Comment out some sections which probably no longer apply. Sponsored by: iXsystems --- .../handbook/advanced-networking/chapter.xml | 128 ++++++++---------- 1 file changed, 58 insertions(+), 70 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml b/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml index 779b4d623c..6a03d4929b 100644 --- a/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml @@ -3914,8 +3914,7 @@ ifconfig_lagg0="laggproto failover laggport bge0 - 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="laggproto failover laggport bge0 + 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="laggproto failover laggport bge0 - Restart the NFS server: + Start the NFS server: - &prompt.root; service nfsd restart + &prompt.root; service nfsd start @@ -3978,8 +3978,9 @@ ifconfig_lagg0="laggproto failover laggport bge0 - 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="laggproto failover laggport bge0 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 seconds NFS: # 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/install / nfs ro - 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/install / nfs ro - 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/install / nfs ro The NFS server will then be the same as the TFTP one. - + Configuring the <acronym>PXE</acronym> Client and