1997-08-16 23:59:29 +00:00
|
|
|
.\" Copyright (c) 1994 Gordon W. Ross, Theo de Raadt
|
2004-01-10 22:38:54 +00:00
|
|
|
.\" Updated by Luigi Rizzo, Robert Watson
|
1997-08-16 23:59:29 +00:00
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. The name of the author may not be used to endorse or promote products
|
|
|
|
.\" derived from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2000-11-22 18:00:50 +00:00
|
|
|
.\"
|
1999-08-28 00:22:10 +00:00
|
|
|
.\" $FreeBSD$
|
1997-08-16 23:59:29 +00:00
|
|
|
.\"
|
2020-05-03 09:54:19 +00:00
|
|
|
.Dd May 3, 2020
|
1997-08-16 23:59:29 +00:00
|
|
|
.Dt DISKLESS 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm diskless
|
|
|
|
.Nd booting a system over the network
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The ability to boot a machine over the network is useful for
|
2000-11-22 18:00:50 +00:00
|
|
|
.Em diskless
|
1997-08-16 23:59:29 +00:00
|
|
|
or
|
2000-11-22 18:00:50 +00:00
|
|
|
.Em dataless
|
1997-08-16 23:59:29 +00:00
|
|
|
machines, or as a temporary measure while repairing or
|
2003-02-24 22:53:26 +00:00
|
|
|
re-installing file systems on a local disk.
|
1997-08-16 23:59:29 +00:00
|
|
|
This file provides a general description of the interactions between
|
|
|
|
a client and its server when a client is booting over the network.
|
|
|
|
.Sh OPERATION
|
|
|
|
When booting a system over the network, there are three
|
|
|
|
phases of interaction between client and server:
|
2003-02-24 22:53:26 +00:00
|
|
|
.Bl -enum
|
2000-12-29 09:18:45 +00:00
|
|
|
.It
|
2003-02-24 22:53:26 +00:00
|
|
|
The stage-1 bootstrap, typically PXE built into your Ethernet
|
2002-12-23 18:44:22 +00:00
|
|
|
card, loads a second-stage boot program.
|
2000-12-29 09:18:45 +00:00
|
|
|
.It
|
2003-02-24 22:53:26 +00:00
|
|
|
The second-stage boot program, typically
|
|
|
|
.Xr pxeboot 8 ,
|
|
|
|
loads modules and
|
|
|
|
the kernel, and boots the kernel.
|
2000-12-29 09:18:45 +00:00
|
|
|
.It
|
2003-02-24 22:53:26 +00:00
|
|
|
The kernel
|
|
|
|
.Tn NFS
|
|
|
|
mounts the root directory and continues from there.
|
1997-08-16 23:59:29 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Each of these phases are described in further detail below.
|
|
|
|
.Pp
|
2003-02-24 22:53:26 +00:00
|
|
|
First, the stage-1 bootstrap loads the stage-2 boot program over
|
|
|
|
the network.
|
|
|
|
The stage-1 bootstrap typically uses
|
|
|
|
.Tn BOOTP
|
|
|
|
or
|
|
|
|
.Tn DHCP
|
|
|
|
to obtain the filename to load, then uses
|
|
|
|
.Tn TFTP
|
|
|
|
to load the file.
|
|
|
|
This file is typically called
|
|
|
|
.Pa pxeboot ,
|
|
|
|
and should be copied from
|
2002-12-23 18:44:22 +00:00
|
|
|
.Pa /boot/pxeboot
|
2003-02-24 22:53:26 +00:00
|
|
|
into the
|
|
|
|
.Tn TFTP
|
|
|
|
directory on the server, which is typically
|
2002-12-23 18:44:22 +00:00
|
|
|
.Pa /tftpdir .
|
1997-08-16 23:59:29 +00:00
|
|
|
.Pp
|
2002-12-23 18:44:22 +00:00
|
|
|
The stage-2 boot program then loads additional modules and the kernel.
|
2003-02-24 22:53:26 +00:00
|
|
|
These files may not exist on the
|
|
|
|
.Tn DHCP
|
|
|
|
or
|
|
|
|
.Tn BOOTP
|
|
|
|
server.
|
|
|
|
You can use the
|
|
|
|
.Ic next-server
|
|
|
|
option available in
|
|
|
|
.Tn DHCP
|
|
|
|
configurations to specify the server holding
|
|
|
|
the second stage boot files and kernel.
|
|
|
|
The stage-2 program uses
|
|
|
|
.Tn NFS
|
|
|
|
or
|
|
|
|
.Tn TFTP
|
|
|
|
to obtain these files.
|
|
|
|
By default,
|
|
|
|
.Tn NFS
|
|
|
|
is used.
|
|
|
|
If you are using
|
|
|
|
.Xr pxeboot 8 ,
|
|
|
|
you can install a version that uses
|
|
|
|
.Tn TFTP
|
|
|
|
by setting
|
|
|
|
.Li LOADER_TFTP_SUPPORT=YES
|
2002-12-23 18:44:22 +00:00
|
|
|
in your
|
2005-10-10 14:55:59 +00:00
|
|
|
.Xr make.conf 5 ,
|
2003-02-24 22:53:26 +00:00
|
|
|
then recompiling and reinstalling
|
|
|
|
.Xr pxeboot 8
|
|
|
|
via the command listed below.
|
|
|
|
It is often necessary to use
|
|
|
|
.Tn TFTP
|
|
|
|
here so you can place a custom kernel
|
|
|
|
in
|
|
|
|
.Pa /tftpdir/ .
|
|
|
|
If you use
|
|
|
|
.Tn NFS
|
|
|
|
and do not have a custom root file system for the
|
|
|
|
.Nm
|
2002-12-23 18:44:22 +00:00
|
|
|
client, the stage-2 boot will load your server's kernel as the kernel for
|
2003-02-24 22:53:26 +00:00
|
|
|
the
|
|
|
|
.Nm
|
|
|
|
machine, which may not be what you want to have happen.
|
2002-12-23 18:44:22 +00:00
|
|
|
.Bd -literal -offset indent
|
2018-09-10 15:16:33 +00:00
|
|
|
cd /usr/src/stand
|
2002-12-23 18:44:22 +00:00
|
|
|
make clean; make; make install
|
|
|
|
cp /boot/pxeboot /tftpdir/
|
|
|
|
.Ed
|
2001-05-10 20:45:46 +00:00
|
|
|
.Pp
|
2004-01-10 22:38:54 +00:00
|
|
|
In phase 3, the kernel acquires IP networking configuration in one
|
|
|
|
of two ways, and then proceeds to mount the root file system and start
|
|
|
|
operation.
|
2004-06-16 08:33:57 +00:00
|
|
|
If the phase 2 loader supports passing network configuration to the
|
2004-01-10 22:38:54 +00:00
|
|
|
kernel using the kernel environment, then the kernel will configure
|
|
|
|
the network interface using that information.
|
|
|
|
Otherwise, it must use
|
2003-02-24 22:53:26 +00:00
|
|
|
.Tn DHCP
|
|
|
|
or
|
|
|
|
.Tn BOOTP
|
|
|
|
to acquire
|
2004-01-10 22:38:54 +00:00
|
|
|
configuration information.
|
2003-02-24 22:53:26 +00:00
|
|
|
The boot
|
|
|
|
scripts recognize a
|
|
|
|
.Nm
|
|
|
|
startup and perform
|
2002-12-23 18:44:22 +00:00
|
|
|
the actions found in
|
2004-09-29 05:28:48 +00:00
|
|
|
.Pa /etc/rc.d/resolv ,
|
|
|
|
.Pa /etc/rc.d/tmp ,
|
2005-12-30 14:43:31 +00:00
|
|
|
.Pa /etc/rc.d/var ,
|
2002-12-23 18:44:22 +00:00
|
|
|
and
|
2005-12-30 14:43:31 +00:00
|
|
|
.Pa /etc/rc.initdiskless .
|
1997-08-16 23:59:29 +00:00
|
|
|
.Sh CONFIGURATION
|
2003-02-24 22:53:26 +00:00
|
|
|
In order to run a
|
|
|
|
.Nm
|
|
|
|
client, you need the following:
|
2001-05-10 20:45:46 +00:00
|
|
|
.Bl -bullet
|
2000-12-29 09:18:45 +00:00
|
|
|
.It
|
2003-02-24 22:53:26 +00:00
|
|
|
An
|
|
|
|
.Tn NFS
|
|
|
|
server which exports a root and
|
|
|
|
.Pa /usr
|
|
|
|
partitions with appropriate permissions.
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
scripts work with read-only partitions, as long as root is exported with
|
2001-05-10 20:45:46 +00:00
|
|
|
.Fl maproot Ns =0
|
|
|
|
so that some system files can be accessed.
|
|
|
|
As an example,
|
|
|
|
.Pa /etc/exports
|
|
|
|
can contain the following lines:
|
|
|
|
.Bd -literal -offset indent
|
2002-10-02 02:07:08 +00:00
|
|
|
<ROOT> -ro -maproot=0 -alldirs <list of diskless clients>
|
|
|
|
/usr -ro -alldirs <list of diskless clients>
|
1997-08-16 23:59:29 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2001-05-10 20:45:46 +00:00
|
|
|
where
|
|
|
|
.Aq ROOT
|
2003-02-24 22:53:26 +00:00
|
|
|
is the mount point on the server of the root partition.
|
2001-05-10 20:45:46 +00:00
|
|
|
The script
|
|
|
|
.Pa /usr/share/examples/diskless/clone_root
|
2003-02-24 22:53:26 +00:00
|
|
|
can be used to create a shared read-only root partition,
|
2002-12-23 18:44:22 +00:00
|
|
|
but in many cases you may decide to export
|
2003-02-24 22:53:26 +00:00
|
|
|
(again as read-only) the root directory used by
|
2001-05-10 20:45:46 +00:00
|
|
|
the server itself.
|
2000-12-29 09:18:45 +00:00
|
|
|
.It
|
2003-02-24 22:53:26 +00:00
|
|
|
A
|
2001-05-10 20:45:46 +00:00
|
|
|
.Tn BOOTP
|
|
|
|
or
|
|
|
|
.Tn DHCP
|
|
|
|
server.
|
|
|
|
.Xr bootpd 8
|
|
|
|
can be enabled by
|
|
|
|
uncommenting the
|
2003-02-24 22:53:26 +00:00
|
|
|
.Dq Li bootps
|
2001-05-10 20:45:46 +00:00
|
|
|
line in
|
|
|
|
.Pa /etc/inetd.conf .
|
|
|
|
A sample
|
|
|
|
.Pa /etc/bootptab
|
|
|
|
can be the following:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
.default:\\
|
|
|
|
hn:ht=1:vm=rfc1048:\\
|
|
|
|
:sm=255.255.255.0:\\
|
|
|
|
:sa=<SERVER>:\\
|
|
|
|
:gw=<GATEWAY>:\\
|
|
|
|
:rp="<SERVER>:<ROOT>":
|
|
|
|
|
|
|
|
<CLIENT>:ha=0123456789ab:tc=.default
|
1997-08-16 23:59:29 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2001-05-10 20:45:46 +00:00
|
|
|
where
|
|
|
|
.Aq SERVER ,
|
|
|
|
.Aq GATEWAY
|
|
|
|
and
|
|
|
|
.Aq ROOT
|
|
|
|
have the obvious meanings.
|
2000-12-29 09:18:45 +00:00
|
|
|
.It
|
2002-12-23 18:44:22 +00:00
|
|
|
A properly initialized root partition.
|
|
|
|
The script
|
|
|
|
.Pa /usr/share/examples/diskless/clone_root
|
|
|
|
can help in creating it, using the server's root partition
|
2003-02-24 22:53:26 +00:00
|
|
|
as a reference.
|
|
|
|
If you are just starting out, you should
|
2002-12-23 18:44:22 +00:00
|
|
|
simply use the server's own root directory,
|
|
|
|
.Pa / ,
|
|
|
|
and not try to clone it.
|
|
|
|
.Pp
|
|
|
|
You often do not want to use the same
|
|
|
|
.Pa rc.conf
|
|
|
|
or
|
|
|
|
.Pa rc.local
|
2003-02-24 22:53:26 +00:00
|
|
|
files for the
|
|
|
|
.Nm
|
|
|
|
boot as you do on the server.
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
boot
|
2002-12-23 18:44:22 +00:00
|
|
|
scripts provide a mechanism through which you can override various files
|
|
|
|
in
|
|
|
|
.Pa /etc
|
2003-02-24 22:53:26 +00:00
|
|
|
(as well as other subdirectories of root).
|
2005-12-10 20:21:46 +00:00
|
|
|
.Pp
|
|
|
|
One difference that you should pay particular attention to is
|
|
|
|
the value of
|
|
|
|
.Va local_startup
|
|
|
|
in
|
|
|
|
.Pa /etc/defaults/rc.conf .
|
|
|
|
A typical value for a
|
|
|
|
.Nm
|
|
|
|
boot is
|
|
|
|
.Va mountcritremote ,
|
|
|
|
however your needs may be different.
|
|
|
|
.Pp
|
2003-02-24 22:53:26 +00:00
|
|
|
The scripts provide four
|
2002-12-23 18:44:22 +00:00
|
|
|
overriding directories situated in
|
|
|
|
.Pa /conf/base ,
|
|
|
|
.Pa /conf/default ,
|
|
|
|
.Pa /conf/<broadcast-ip> ,
|
|
|
|
and
|
|
|
|
.Pa /conf/<machine-ip> .
|
|
|
|
You should always create
|
|
|
|
.Pa /conf/base/etc ,
|
|
|
|
which will entirely replace the server's
|
|
|
|
.Pa /etc
|
2003-02-24 22:53:26 +00:00
|
|
|
on the
|
|
|
|
.Nm
|
|
|
|
machine.
|
2002-12-23 18:44:22 +00:00
|
|
|
You can clone the server's
|
|
|
|
.Pa /etc
|
2003-02-24 22:53:26 +00:00
|
|
|
here or you can create a special file which tells the
|
|
|
|
.Nm
|
|
|
|
boot scripts
|
2002-12-23 18:44:22 +00:00
|
|
|
to remount the server's
|
|
|
|
.Pa /etc
|
|
|
|
onto
|
|
|
|
.Pa /conf/base/etc .
|
|
|
|
You do this by creating the file
|
|
|
|
.Pa /conf/base/etc/diskless_remount
|
2003-02-24 22:53:26 +00:00
|
|
|
containing the mount point to use as a basis of the
|
|
|
|
.Nm
|
|
|
|
machine's
|
2001-05-10 20:50:54 +00:00
|
|
|
.Pa /etc .
|
2002-12-23 18:44:22 +00:00
|
|
|
For example, the file might contain:
|
|
|
|
.Pp
|
2003-02-24 22:53:26 +00:00
|
|
|
.Dl 10.0.0.1:/etc
|
|
|
|
.Pp
|
2004-06-21 14:23:31 +00:00
|
|
|
Alternatively, if the server contains several independent roots, the file
|
2003-06-30 21:47:06 +00:00
|
|
|
might contain:
|
|
|
|
.Pp
|
|
|
|
.Dl 10.0.0.1:/usr/diskless/4.7-RELEASE/etc
|
|
|
|
.Pp
|
|
|
|
This would work, but if you copied
|
|
|
|
.Pa /usr/diskless/4.7-RELEASE
|
|
|
|
to
|
|
|
|
.Pa /usr/diskless/4.8-RELEASE
|
|
|
|
and upgraded the installation, you would need to modify the
|
|
|
|
.Pa diskless_remount
|
|
|
|
files to reflect that move.
|
|
|
|
To avoid that, paths in
|
|
|
|
.Pa diskless_remount
|
2004-06-21 14:23:31 +00:00
|
|
|
files beginning with
|
2003-06-30 21:47:06 +00:00
|
|
|
.Pa /
|
|
|
|
have the actual path of the client's root prepended to them so the file
|
|
|
|
could instead contain:
|
|
|
|
.Pp
|
|
|
|
.Dl /etc
|
|
|
|
.Pp
|
2003-02-24 22:53:26 +00:00
|
|
|
The
|
|
|
|
.Nm
|
2004-06-21 14:23:31 +00:00
|
|
|
scripts create memory file systems to hold the overridden
|
2003-02-24 22:53:26 +00:00
|
|
|
directories.
|
2018-03-06 14:31:15 +00:00
|
|
|
Only a 5MB partition is created by default, which may not
|
2003-02-24 22:53:26 +00:00
|
|
|
be sufficient for your purposes.
|
|
|
|
To override this, you can create the
|
2002-12-23 18:44:22 +00:00
|
|
|
file
|
|
|
|
.Pa /conf/base/etc/md_size
|
|
|
|
containing the size, in 512 byte sectors, of the memory disk to create
|
|
|
|
for that directory.
|
|
|
|
.Pp
|
|
|
|
You then typically provide file-by-file overrides in the
|
2001-05-10 20:50:54 +00:00
|
|
|
.Pa /conf/default/etc
|
2003-02-24 22:53:26 +00:00
|
|
|
directory.
|
|
|
|
At a minimum, you must provide overrides for
|
|
|
|
.Pa /etc/fstab , /etc/rc.conf ,
|
2002-12-23 18:44:22 +00:00
|
|
|
and
|
|
|
|
.Pa /etc/rc.local
|
|
|
|
via
|
2003-02-24 22:53:26 +00:00
|
|
|
.Pa /conf/default/etc/fstab , /conf/default/etc/rc.conf ,
|
2002-12-23 18:44:22 +00:00
|
|
|
and
|
|
|
|
.Pa /conf/default/etc/rc.local .
|
|
|
|
.Pp
|
2003-02-24 22:53:26 +00:00
|
|
|
Overrides are hierarchical.
|
|
|
|
You can supply network-specific defaults
|
2002-12-23 18:44:22 +00:00
|
|
|
in the
|
2003-02-24 22:53:26 +00:00
|
|
|
.Pa /conf/ Ns Ao Ar BROADCASTIP Ac Ns Pa /etc
|
|
|
|
directory, where
|
|
|
|
.Aq Ar BROADCASTIP
|
|
|
|
represents the broadcast IP address of
|
|
|
|
the
|
|
|
|
.Nm
|
|
|
|
system as given to it via
|
2002-12-23 18:44:22 +00:00
|
|
|
.Tn BOOTP .
|
|
|
|
The
|
|
|
|
.Pa diskless_remount
|
|
|
|
and
|
|
|
|
.Pa md_size
|
|
|
|
features work in any of these directories.
|
|
|
|
The configuration feature works on directories other then
|
2001-05-10 20:50:54 +00:00
|
|
|
.Pa /etc ,
|
2002-12-23 18:44:22 +00:00
|
|
|
you simply create the directory you wish to replace or override in
|
|
|
|
.Pa /conf/{base,default,<broadcast>,<ip>}/*
|
|
|
|
and work it in the same way that you work
|
|
|
|
.Pa /etc .
|
2001-05-10 20:45:46 +00:00
|
|
|
.Pp
|
2002-12-23 18:44:22 +00:00
|
|
|
Since you normally clone the server's
|
2001-05-10 20:45:46 +00:00
|
|
|
.Pa /etc
|
2002-12-23 18:44:22 +00:00
|
|
|
using the
|
|
|
|
.Pa /conf/base/etc/diskless_remount ,
|
2003-02-24 22:53:26 +00:00
|
|
|
you might wish to remove unneeded files from the memory file system.
|
|
|
|
For example,
|
|
|
|
if the server has a firewall but you do not, you might wish
|
2002-12-23 18:44:22 +00:00
|
|
|
to remove
|
|
|
|
.Pa /etc/ipfw.conf .
|
|
|
|
You can do this by creating a
|
2003-02-24 22:53:26 +00:00
|
|
|
.Pa /conf/base/ Ns Ao Ar DIRECTORY Ac Ns Pa .remove
|
|
|
|
file.
|
|
|
|
For example,
|
2002-12-23 18:44:22 +00:00
|
|
|
.Pa /conf/base/etc.remove ,
|
|
|
|
which contains a list of relative paths that the boot scripts should remove
|
|
|
|
from the memory file systems.
|
2001-05-10 20:45:46 +00:00
|
|
|
.Pp
|
|
|
|
As a minimum, you normally need to have the following in
|
|
|
|
.Pa /conf/default/etc/fstab
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
<SERVER>:<ROOT> / nfs ro 0 0
|
|
|
|
<SERVER>:/usr /usr nfs ro 0 0
|
1997-08-16 23:59:29 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2002-12-23 18:44:22 +00:00
|
|
|
You also need to create a customized version of
|
2001-05-10 20:45:46 +00:00
|
|
|
.Pa /conf/default/etc/rc.conf
|
|
|
|
which should contain
|
2003-02-24 22:53:26 +00:00
|
|
|
the startup options for the
|
|
|
|
.Nm
|
|
|
|
client, and
|
2002-12-23 18:44:22 +00:00
|
|
|
.Pa /conf/default/etc/rc.local
|
|
|
|
which could be empty but prevents the server's own
|
|
|
|
.Pa /etc/rc.local
|
2003-02-24 22:53:26 +00:00
|
|
|
from leaking onto the
|
|
|
|
.Nm
|
|
|
|
system.
|
2001-05-10 20:45:46 +00:00
|
|
|
.Pp
|
2002-12-23 18:44:22 +00:00
|
|
|
In
|
|
|
|
.Pa rc.conf ,
|
|
|
|
most likely
|
2001-05-10 20:45:46 +00:00
|
|
|
you will not need to set
|
|
|
|
.Va hostname
|
|
|
|
and
|
|
|
|
.Va ifconfig_*
|
|
|
|
because these will be already set by the startup code.
|
|
|
|
Finally, it might be convenient to use a
|
|
|
|
.Ic case
|
|
|
|
statement using
|
|
|
|
.Li `hostname`
|
|
|
|
as the switch variable to do machine-specific configuration
|
2003-02-24 22:53:26 +00:00
|
|
|
in case a number of
|
|
|
|
.Nm
|
|
|
|
clients share the same configuration
|
2001-05-10 20:45:46 +00:00
|
|
|
files.
|
2000-12-29 09:18:45 +00:00
|
|
|
.It
|
2003-02-24 22:53:26 +00:00
|
|
|
The kernel for the
|
|
|
|
.Nm
|
|
|
|
clients, which will be loaded using
|
|
|
|
.Tn NFS
|
|
|
|
or
|
|
|
|
.Tn TFTP ,
|
2004-01-10 22:38:54 +00:00
|
|
|
must include support for the NFS client:
|
|
|
|
.Pp
|
2011-08-08 13:13:22 +00:00
|
|
|
.D1 Cd "options NFSCL"
|
2004-01-10 22:38:54 +00:00
|
|
|
.D1 Cd "options NFS_ROOT"
|
|
|
|
.Pp
|
|
|
|
If you are using a boot mechanism that does not pass network configuration
|
|
|
|
to the kernel using the kernel environment, you will also need to include
|
|
|
|
the following options:
|
2003-02-24 22:53:26 +00:00
|
|
|
.Pp
|
|
|
|
.D1 Cd "options BOOTP"
|
|
|
|
.D1 Cd "options BOOTP_NFSROOT"
|
|
|
|
.D1 Cd "options BOOTP_COMPAT"
|
1997-08-16 23:59:29 +00:00
|
|
|
.Pp
|
2004-06-16 08:33:57 +00:00
|
|
|
.Em Note :
|
|
|
|
the PXE environment does not require these options.
|
2004-01-10 22:38:54 +00:00
|
|
|
.Pp
|
2004-06-16 08:33:57 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
booting environment relies on memory-backed file systems to
|
2004-01-10 22:38:54 +00:00
|
|
|
support temporary local storage in the event that the root file system
|
|
|
|
is mounted read-only; as such, it is necessary to add the following
|
|
|
|
to the device section of the kernel configuration:
|
2002-12-23 18:44:22 +00:00
|
|
|
.Pp
|
2003-02-24 22:53:26 +00:00
|
|
|
.D1 Cd "device md"
|
|
|
|
.Pp
|
|
|
|
If you use the firewall, remember to default to
|
|
|
|
.Dq open ,
|
|
|
|
or your kernel
|
|
|
|
will not be able to send/receive the
|
|
|
|
.Tn BOOTP
|
|
|
|
packets.
|
1997-08-16 23:59:29 +00:00
|
|
|
.El
|
2001-05-10 20:45:46 +00:00
|
|
|
.Sh SECURITY ISSUES
|
2003-02-24 22:53:26 +00:00
|
|
|
Be warned that using unencrypted
|
|
|
|
.Tn NFS
|
|
|
|
to mount root and user
|
2001-05-10 20:45:46 +00:00
|
|
|
partitions may expose information such as
|
|
|
|
encryption keys.
|
2020-05-03 09:54:19 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
environment first appeared in
|
|
|
|
.Fx 2.2.5 .
|
2005-01-21 08:36:40 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr ethers 5 ,
|
|
|
|
.Xr exports 5 ,
|
2005-10-10 14:55:59 +00:00
|
|
|
.Xr make.conf 5 ,
|
2005-11-18 10:56:28 +00:00
|
|
|
.Xr bootpd 8 ,
|
2005-01-21 08:36:40 +00:00
|
|
|
.Xr mountd 8 ,
|
|
|
|
.Xr nfsd 8 ,
|
|
|
|
.Xr pxeboot 8 ,
|
|
|
|
.Xr reboot 8 ,
|
|
|
|
.Xr tftpd 8
|
|
|
|
.Pp
|
|
|
|
.Pa ports/net/etherboot
|
2001-05-10 20:45:46 +00:00
|
|
|
.Sh BUGS
|
|
|
|
This manpage is probably incomplete.
|
|
|
|
.Pp
|
|
|
|
.Fx
|
|
|
|
sometimes requires to write onto
|
2002-12-23 18:44:22 +00:00
|
|
|
the root partition, so the startup scripts mount MFS
|
2003-02-24 22:53:26 +00:00
|
|
|
file systems on some locations (e.g.\&
|
2001-05-10 20:45:46 +00:00
|
|
|
.Pa /etc
|
|
|
|
and
|
|
|
|
.Pa /var ) ,
|
|
|
|
while
|
|
|
|
trying to preserve the original content.
|
|
|
|
The process might not handle all cases.
|