Clarify introduction.
Sponsored by: iXsystems
This commit is contained in:
parent
d7edc5dbb1
commit
e697cff368
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44132
1 changed files with 45 additions and 150 deletions
|
@ -3855,146 +3855,62 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>bge0
|
|||
<primary>diskless operation</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>A &os; machine can boot over the network and operate
|
||||
without a local disk, using file systems mounted from an
|
||||
<acronym>NFS</acronym> server. No system modification is
|
||||
necessary, beyond standard configuration files. Such a system
|
||||
is relatively easy to set up because all the necessary elements
|
||||
are readily available:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>The &intel; Preboot eXecution Environment
|
||||
(<acronym>PXE</acronym>) can be used to load the kernel over
|
||||
the network. It provides a form of smart boot
|
||||
<acronym>ROM</acronym> built into some networking cards or
|
||||
motherboards. See &man.pxeboot.8; for more details.</para>
|
||||
</listitem>
|
||||
(<acronym>PXE</acronym>) allows an operating system to boot
|
||||
over the network. For example, a &os; system can boot over the network and operate
|
||||
without a local disk, using file systems mounted from an
|
||||
<acronym>NFS</acronym> server. <acronym>PXE</acronym> support is usually
|
||||
available in the <acronym>BIOS</acronym>. To use
|
||||
<acronym>PXE</acronym> when the machine starts,
|
||||
select the <literal>Boot from network</literal> option in
|
||||
the <acronym>BIOS</acronym> setup or type a function key
|
||||
during system initialization.</para>
|
||||
|
||||
<listitem>
|
||||
<para>A sample script
|
||||
(<filename>/usr/share/examples/diskless/clone_root</filename>)
|
||||
eases the creation and maintenance of the workstation's root
|
||||
file system on the server. The script will probably require
|
||||
a little customization.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Standard system startup files exist in
|
||||
<filename>/etc</filename> to detect and support a diskless
|
||||
system startup.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Swapping, if needed, can be done either to an
|
||||
<acronym>NFS</acronym> file or to a local disk.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>To use <acronym>PXE</acronym> when the machine starts,
|
||||
select the <literal>Boot from network</literal> option in
|
||||
the <acronym>BIOS</acronym> setup or type a function key
|
||||
during system initialization.</para>
|
||||
|
||||
<para>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
|
||||
complete system, emphasizing simplicity and compatibility with
|
||||
the standard &os; startup scripts. The system described has
|
||||
the following characteristics:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>The diskless workstations use a shared, read-only
|
||||
<filename>/</filename> and
|
||||
<filename>/usr</filename>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>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.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>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.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<caution>
|
||||
<para>As described, this system is insecure. It should live in
|
||||
a protected area of a network and be untrusted by other
|
||||
hosts.</para>
|
||||
</caution>
|
||||
|
||||
<sect2>
|
||||
<title>Background Information</title>
|
||||
|
||||
<para>When setting up diskless workstations, several operations
|
||||
need to be performed for a successful
|
||||
bootstrap:</para>
|
||||
<para>In order to provide the files needed for an operating system
|
||||
to boot over the network, a
|
||||
<acronym>PXE</acronym> setup also requires properly configured
|
||||
<acronym>DHCP</acronym>, <acronym>TFTP</acronym>, and <acronym>NFS</acronym>
|
||||
servers, where:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>The machine needs to obtain initial parameters such as
|
||||
its <acronym>IP</acronym> address, executable filename,
|
||||
server name, and root path. This is done using the
|
||||
<acronym>DHCP</acronym> or <acronym>BOOTP</acronym>
|
||||
protocols. <acronym>DHCP</acronym> is a compatible
|
||||
extension of <acronym>BOOTP</acronym>, and uses the same
|
||||
port numbers and basic packet format. It is possible to
|
||||
configure a system to use only <acronym>BOOTP</acronym>
|
||||
and &man.bootpd.8; is included in the base &os;
|
||||
system.</para>
|
||||
|
||||
<para><acronym>DHCP</acronym> has a number of advantages
|
||||
over <acronym>BOOTP</acronym> such as nicer configuration
|
||||
files and support for <acronym>PXE</acronym>. This
|
||||
section describes mainly a <acronym>DHCP</acronym>
|
||||
configuration, with equivalent examples using
|
||||
&man.bootpd.8; when possible. The sample configuration
|
||||
uses <application>ISC DHCP</application> which is
|
||||
available in the Ports Collection.</para>
|
||||
</listitem>
|
||||
<para>Initial parameters, such as an
|
||||
<acronym>IP</acronym> address, executable boot filename and location,
|
||||
server name, and root path are obtained from the
|
||||
<acronym>DHCP</acronym> server.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>The machine needs to boot the loader using
|
||||
<para>The operating system loader file is booted using
|
||||
<acronym>TFTP</acronym>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>The root filesystem needs to be loaded using
|
||||
<para>The file systems are loaded using
|
||||
<acronym>NFS</acronym>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>The possible intermediate bootstrap programs and the
|
||||
kernel need to be initialized and executed.
|
||||
<acronym>PXE</acronym> loads &man.pxeboot.8;, which is
|
||||
a modified version of the &os; third stage loader,
|
||||
&man.loader.8;. The third stage loader will obtain most
|
||||
parameters necessary to system startup and leave them
|
||||
in the kernel environment before transferring control.
|
||||
It is possible to use a <filename>GENERIC</filename>
|
||||
kernel in this case.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Finally, the machine needs to access its file systems
|
||||
using <acronym>NFS</acronym>.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<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>
|
||||
<para>When a computer <acronym>PXE</acronym> boots, it receives information over
|
||||
<acronym>DHCP</acronym> about where to obtain the initial boot
|
||||
loader file. After the host computer
|
||||
receives this information, it downloads the boot loader via
|
||||
<acronym>TFTP</acronym> and then executes the boot loader.
|
||||
In &os;, the boot loader file is
|
||||
<filename>/boot/pxeboot</filename>. After
|
||||
<filename>/boot/pxeboot</filename> executes, the &os; kernel is
|
||||
loaded and the rest of the &os; bootup sequence proceeds, as described in
|
||||
<xref linkend="boot"/>.</para>
|
||||
|
||||
<para>Refer to &man.diskless.8; for more information.</para>
|
||||
</sect2>
|
||||
<para>This section describes how to configure these services
|
||||
on a &os; system so that other systems can
|
||||
<acronym>PXE</acronym> boot into &os;. Refer to &man.diskless.8; for more information.</para>
|
||||
|
||||
<caution>
|
||||
<para>As described, the system providing these services is insecure. It should live in
|
||||
a protected area of a network and be untrusted by other
|
||||
hosts.</para>
|
||||
</caution>
|
||||
|
||||
<sect2 xml:id="network-pxe-nfs">
|
||||
<info>
|
||||
|
@ -4015,32 +3931,6 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>bge0
|
|||
</authorgroup>
|
||||
</info>
|
||||
|
||||
<para>The &intel; Preboot eXecution Environment
|
||||
(<acronym>PXE</acronym>) allows booting the operating system
|
||||
over the network. <acronym>PXE</acronym> support is usually
|
||||
provided in the <acronym>BIOS</acronym> where it can be enabled
|
||||
in the <acronym>BIOS</acronym> settings which enable booting
|
||||
from the network. A fully functioning
|
||||
<acronym>PXE</acronym> setup also requires properly configured
|
||||
<acronym>DHCP</acronym> and <acronym>TFTP</acronym>
|
||||
servers.</para>
|
||||
|
||||
<para>When the host computer boots, it receives information over
|
||||
<acronym>DHCP</acronym> about where to obtain the initial boot
|
||||
loader via <acronym>TFTP</acronym>. After the host computer
|
||||
receives this information, it downloads the boot loader via
|
||||
<acronym>TFTP</acronym> and then executes the boot loader.
|
||||
This is documented in section 2.2.1 of the <link
|
||||
xlink:href="http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf">Preboot
|
||||
Execution Environment (<acronym>PXE</acronym>)
|
||||
Specification</link>. In &os;, the boot loader retrieved
|
||||
during the <acronym>PXE</acronym> process is
|
||||
<filename>/boot/pxeboot</filename>. After
|
||||
<filename>/boot/pxeboot</filename> executes, the &os; kernel is
|
||||
loaded and the rest of the &os; bootup sequence proceeds.
|
||||
Refer to <xref linkend="boot"/> for more information about the
|
||||
&os; booting process.</para>
|
||||
|
||||
<procedure>
|
||||
<step>
|
||||
<para>Choose a directory which will have a &os;
|
||||
|
@ -4051,6 +3941,11 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>bge0
|
|||
|
||||
<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>
|
||||
|
|
Loading…
Reference in a new issue