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>
|
<primary>diskless operation</primary>
|
||||||
</indexterm>
|
</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
|
<para>The &intel; Preboot eXecution Environment
|
||||||
(<acronym>PXE</acronym>) can be used to load the kernel over
|
(<acronym>PXE</acronym>) allows an operating system to boot
|
||||||
the network. It provides a form of smart boot
|
over the network. For example, a &os; system can boot over the network and operate
|
||||||
<acronym>ROM</acronym> built into some networking cards or
|
without a local disk, using file systems mounted from an
|
||||||
motherboards. See &man.pxeboot.8; for more details.</para>
|
<acronym>NFS</acronym> server. <acronym>PXE</acronym> support is usually
|
||||||
</listitem>
|
available in the <acronym>BIOS</acronym>. To use
|
||||||
|
<acronym>PXE</acronym> when the machine starts,
|
||||||
<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
|
select the <literal>Boot from network</literal> option in
|
||||||
the <acronym>BIOS</acronym> setup or type a function key
|
the <acronym>BIOS</acronym> setup or type a function key
|
||||||
during system initialization.</para>
|
during system initialization.</para>
|
||||||
|
|
||||||
<para>There are many ways to set up diskless workstations. Many
|
<para>In order to provide the files needed for an operating system
|
||||||
elements are involved, and most can be customized to suit local
|
to boot over the network, a
|
||||||
taste. The following will describe variations on the setup of a
|
<acronym>PXE</acronym> setup also requires properly configured
|
||||||
complete system, emphasizing simplicity and compatibility with
|
<acronym>DHCP</acronym>, <acronym>TFTP</acronym>, and <acronym>NFS</acronym>
|
||||||
the standard &os; startup scripts. The system described has
|
servers, where:</para>
|
||||||
the following characteristics:</para>
|
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The diskless workstations use a shared, read-only
|
<para>Initial parameters, such as an
|
||||||
<filename>/</filename> and
|
<acronym>IP</acronym> address, executable boot filename and location,
|
||||||
<filename>/usr</filename>.</para>
|
server name, and root path are obtained from the
|
||||||
|
<acronym>DHCP</acronym> server.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The root file system is a copy of a standard &os; root,
|
<para>The operating system loader file is booted using
|
||||||
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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<listitem>
|
|
||||||
<para>The machine needs to boot the loader using
|
|
||||||
<acronym>TFTP</acronym>.</para>
|
<acronym>TFTP</acronym>.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The root filesystem needs to be loaded using
|
<para>The file systems are loaded using
|
||||||
<acronym>NFS</acronym>.</para>
|
<acronym>NFS</acronym>.</para>
|
||||||
</listitem>
|
</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>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>Place <filename>tftpboot</filename>
|
<para>When a computer <acronym>PXE</acronym> boots, it receives information over
|
||||||
anywhere on the server. Make sure that the location is
|
<acronym>DHCP</acronym> about where to obtain the initial boot
|
||||||
set in both <filename>/etc/inetd.conf</filename> and
|
loader file. After the host computer
|
||||||
<filename>/usr/local/etc/dhcpd.conf</filename>.</para>
|
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>
|
<para>This section describes how to configure these services
|
||||||
</sect2>
|
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">
|
<sect2 xml:id="network-pxe-nfs">
|
||||||
<info>
|
<info>
|
||||||
|
@ -4015,32 +3931,6 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>bge0
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</info>
|
</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>
|
<procedure>
|
||||||
<step>
|
<step>
|
||||||
<para>Choose a directory which will have a &os;
|
<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>
|
<screen>&prompt.root; <userinput>export NFSROOTDIR=/b/tftpboot/FreeBSD/install</userinput>
|
||||||
&prompt.root; <userinput>mkdir -p ${NFSROOTDIR}</userinput></screen>
|
&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>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
|
|
Loading…
Reference in a new issue