Clarify the procedure for setting up the PXE Environment.
Comment out some sections which probably no longer apply. Sponsored by: iXsystems
This commit is contained in:
parent
53daba29a0
commit
a56e5fb7f8
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44134
1 changed files with 58 additions and 70 deletions
|
@ -3914,8 +3914,7 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>bge0
|
|||
|
||||
<sect2 xml:id="network-pxe-nfs">
|
||||
<info>
|
||||
<title>Setting Up the &man.chroot.8; Environment for the
|
||||
<acronym>NFS</acronym> Root File System</title>
|
||||
<title>Setting Up the <acronym>PXE</acronym> Environment</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
|
@ -3931,29 +3930,30 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>bge0
|
|||
</authorgroup>
|
||||
</info>
|
||||
|
||||
<para>The steps shown in this section configure the built-in
|
||||
<acronym>NFS</acronym> and <acronym>TFTP</acronym> servers. The
|
||||
next section demonstrates how to install and configure the
|
||||
<acronym>DHCP</acronym> server. In this example, the
|
||||
directory which will contain the files used by <acronym>PXE</acronym> users is
|
||||
<filename>/b/tftpboot/FreeBSD/install</filename>. It is
|
||||
important that this directory exists and that the same directory
|
||||
name is set in both <filename>/etc/inetd.conf</filename> and
|
||||
<filename>/usr/local/etc/dhcpd.conf</filename>.</para>
|
||||
|
||||
<procedure>
|
||||
<step>
|
||||
<para>Choose a directory which will have a &os;
|
||||
installation which will be <acronym>NFS</acronym>
|
||||
mountable. For example, a directory such as
|
||||
<filename>/b/tftpboot/FreeBSD/install</filename> can be
|
||||
used.</para>
|
||||
<para>Create the root directory which will contain a &os; installation
|
||||
to be <acronym>NFS</acronym> mounted:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>export NFSROOTDIR=/b/tftpboot/FreeBSD/install</userinput>
|
||||
&prompt.root; <userinput>mkdir -p ${NFSROOTDIR}</userinput></screen>
|
||||
|
||||
<para>Place <filename>tftpboot</filename>
|
||||
anywhere on the server. Make sure that the location is
|
||||
set in both <filename>/etc/inetd.conf</filename> and
|
||||
<filename>/usr/local/etc/dhcpd.conf</filename>.</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Enable the <acronym>NFS</acronym> server by adding this line to
|
||||
<filename>/etc/rc.conf</filename></para>
|
||||
<filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>nfs_server_enable="YES"</programlisting>
|
||||
|
||||
</step>
|
||||
|
||||
<step>
|
||||
|
@ -3965,9 +3965,9 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>bge0
|
|||
</step>
|
||||
|
||||
<step>
|
||||
<para>Restart the <acronym>NFS</acronym> server:</para>
|
||||
<para>Start the <acronym>NFS</acronym> server:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>service nfsd restart</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>service nfsd start</userinput></screen>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
|
@ -3978,8 +3978,9 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>bge0
|
|||
</step>
|
||||
|
||||
<step>
|
||||
<para>Add the following line to
|
||||
<filename>/etc/inetd.conf</filename>:</para>
|
||||
<para>Uncomment the following line in
|
||||
<filename>/etc/inetd.conf</filename> by making sure it
|
||||
does not start with a <literal>#</literal> symbol:</para>
|
||||
|
||||
<programlisting>tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /b/tftpboot</programlisting>
|
||||
|
||||
|
@ -3987,22 +3988,21 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>bge0
|
|||
<para>Some
|
||||
<acronym>PXE</acronym> versions require the
|
||||
<acronym>TCP</acronym> version of
|
||||
<acronym>TFTP</acronym>. In this case, add a second
|
||||
line, replacing <literal>dgram udp</literal> with
|
||||
<acronym>TFTP</acronym>. In this case, uncomment the second
|
||||
<literal>tftp</literal> line which contains
|
||||
<literal>stream tcp</literal>.</para>
|
||||
</note>
|
||||
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Restart &man.inetd.8;:</para>
|
||||
<para>Start &man.inetd.8;:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>service inetd restart</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>service inetd start</userinput></screen>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Rebuild the &os; kernel and userland (<xref
|
||||
linkend="makeworld"/>):</para>
|
||||
<para>Rebuild the &os; kernel and userland (refer to <xref
|
||||
linkend="makeworld"/> for more detailed instructions):</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/src</userinput>
|
||||
&prompt.root; <userinput>make buildworld</userinput>
|
||||
|
@ -4034,7 +4034,7 @@ Received 264951 bytes in 0.1 seconds</screen>
|
|||
<acronym>NFS</acronym>:</para>
|
||||
|
||||
<programlisting># Device Mountpoint FSType Options Dump Pass
|
||||
myhost.example.com:/b/tftpboot/FreeBSD/install / nfs ro 0 0</programlisting>
|
||||
<replaceable>myhost.example.com</replaceable>:/b/tftpboot/FreeBSD/install / nfs ro 0 0</programlisting>
|
||||
|
||||
<para>Replace <replaceable>myhost.example.com</replaceable>
|
||||
with the hostname or <acronym>IP</acronym> address of the
|
||||
|
@ -4045,18 +4045,16 @@ myhost.example.com:/b/tftpboot/FreeBSD/install / nfs ro
|
|||
</step>
|
||||
|
||||
<step>
|
||||
<para>Set the root password in the &man.chroot.8;
|
||||
environment:</para>
|
||||
<para>Set the root password in the <acronym>PXE</acronym>
|
||||
environment for client machines which
|
||||
are <acronym>PXE</acronym> booting :</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>chroot ${NFSROOTDIR}</userinput>
|
||||
&prompt.root; <userinput>passwd</userinput></screen>
|
||||
|
||||
<para>This sets the root password for client machines which
|
||||
are <acronym>PXE</acronym> booting.</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Enable &man.ssh.1; root logins for client machines
|
||||
<para>If needed, enable &man.ssh.1; root logins for client machines
|
||||
which are <acronym>PXE</acronym> booting by editing
|
||||
<filename>${NFSROOTDIR}/etc/ssh/sshd_config</filename>
|
||||
and enabling <literal>PermitRootLogin</literal>. This
|
||||
|
@ -4064,22 +4062,36 @@ myhost.example.com:/b/tftpboot/FreeBSD/install / nfs ro
|
|||
</step>
|
||||
|
||||
<step>
|
||||
<para>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:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>chroot ${NFSROOTDIR}</userinput>
|
||||
&prompt.root; <userinput>pkg_add -r bash</userinput></screen>
|
||||
<para>Perform any other needed customizations of the <acronym>PXE</acronym>
|
||||
environment in <filename>${NFSROOTDIR}</filename>. These customizations could
|
||||
include things like installing packages or
|
||||
editing the password file with &man.vipw.8;.</para>
|
||||
</step>
|
||||
</procedure>
|
||||
|
||||
<para>When booting from an <acronym>NFS</acronym> root volume,
|
||||
<filename>/etc/rc</filename> detects the
|
||||
<acronym>NFS</acronym> boot and runs
|
||||
<filename>/etc/rc.initdiskless</filename>. In this case,
|
||||
<filename>/etc</filename> and <filename>/var</filename> need
|
||||
to be memory backed file systems so that these directories are
|
||||
writable but the <acronym>NFS</acronym> root directory is
|
||||
read-only:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>chroot ${NFSROOTDIR}</userinput>
|
||||
&prompt.root; <userinput>mkdir -p conf/base</userinput>
|
||||
&prompt.root; <userinput>tar -c -v -f conf/base/etc.cpio.gz --format cpio --gzip etc</userinput>
|
||||
&prompt.root; <userinput>tar -c -v -f conf/base/var.cpio.gz --format cpio --gzip var</userinput></screen>
|
||||
|
||||
<para>When the system boots, memory file systems for
|
||||
<filename>/etc</filename> and <filename>/var</filename> will
|
||||
be created and mounted and the contents of the
|
||||
<filename>cpio.gz</filename> files will be copied into
|
||||
them.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="network-pxe-setting-up-dhcp">
|
||||
<title>Configuring the <application>ISC
|
||||
DHCP</application> Server</title>
|
||||
<title>Configuring the <acronym>DHCP</acronym> Server</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>DHCP</primary>
|
||||
|
@ -4180,7 +4192,8 @@ myhost.example.com:/b/tftpboot/FreeBSD/install / nfs ro
|
|||
The <acronym>NFS</acronym> server will then be the
|
||||
same as the <acronym>TFTP</acronym> one.</para>
|
||||
</sect2>
|
||||
|
||||
<!--
|
||||
Are these sections still needed?
|
||||
<sect2>
|
||||
<title>Preparing the Root File System</title>
|
||||
|
||||
|
@ -4296,32 +4309,7 @@ cd /usr/src/etc; make distribution</programlisting>
|
|||
&man.devfs.5; to allocate device nodes transparently for
|
||||
the user.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Configuring Memory File Systems Used by
|
||||
<filename>/etc/rc.initdiskless</filename></title>
|
||||
|
||||
<para>When booting from an <acronym>NFS</acronym> root volume,
|
||||
<filename>/etc/rc</filename> detects the
|
||||
<acronym>NFS</acronym> boot and runs
|
||||
<filename>/etc/rc.initdiskless</filename>. Read the comments
|
||||
in this script to understand what is going on. In this case,
|
||||
<filename>/etc</filename> and <filename>/var</filename> need
|
||||
to be memory backed file systems so that these directories are
|
||||
writable but the <acronym>NFS</acronym> root directory is
|
||||
read-only:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>chroot ${NFSROOTDIR}</userinput>
|
||||
&prompt.root; <userinput>mkdir -p conf/base</userinput>
|
||||
&prompt.root; <userinput>tar -c -v -f conf/base/etc.cpio.gz --format cpio --gzip etc</userinput>
|
||||
&prompt.root; <userinput>tar -c -v -f conf/base/var.cpio.gz --format cpio --gzip var</userinput></screen>
|
||||
|
||||
<para>When the system boots, memory file systems for
|
||||
<filename>/etc</filename> and <filename>/var</filename> will
|
||||
be created and mounted and the contents of the
|
||||
<filename>cpio.gz</filename> files will be copied into
|
||||
them.</para>
|
||||
</sect2>
|
||||
-->
|
||||
|
||||
<sect2>
|
||||
<title>Configuring the <acronym>PXE</acronym> Client and
|
||||
|
|
Loading…
Reference in a new issue