tail head cat sleep
QR code linking to this page

Manual Pages  — DISKLESS

NAME

diskless – booting a system over the network

CONTENTS

DESCRIPTION

The ability to boot a machine over the network is useful for diskless or dataless machines, or as a temporary measure while repairing or re-installing file systems on a local disk. This file provides a general description of the interactions between a client and its server when a client is booting over the network.

OPERATION

When booting a system over the network, there are three phases of interaction between client and server:
  1. The stage-1 bootstrap, typically PXE built into your Ethernet card, loads a second-stage boot program.
  2. The second-stage boot program, typically pxeboot(8), loads modules and the kernel, and boots the kernel.
  3. The kernel NFS mounts the root directory and continues from there.

Each of these phases are described in further detail below.

First, the stage-1 bootstrap loads the stage-2 boot program over the network. The stage-1 bootstrap typically uses BOOTP or DHCP to obtain the filename to load, then uses TFTP to load the file. This file is typically called pxeboot, and should be copied from /boot/pxeboot into the TFTP directory on the server, which is typically /tftpdir.

The stage-2 boot program then loads additional modules and the kernel. These files may not exist on the DHCP or BOOTP server. You can use the next-server option available in DHCP configurations to specify the server holding the second stage boot files and kernel. The stage-2 program uses NFS or TFTP to obtain these files. By default, NFS is used. If you are using pxeboot(8), you can install a version that uses TFTP by setting LOADER_TFTP_SUPPORT=YES in your make.conf(5), then recompiling and reinstalling pxeboot(8) via the command listed below. It is often necessary to use TFTP here so you can place a custom kernel in /tftpdir/. If you use NFS and do not have a custom root file system for the diskless client, the stage-2 boot will load your server's kernel as the kernel for the diskless machine, which may not be what you want to have happen.

cd /usr/src/stand/i386
make clean; make; make install
cp /boot/pxeboot /tftpdir/

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. If the phase 2 loader supports passing network configuration to the kernel using the kernel environment, then the kernel will configure the network interface using that information. Otherwise, it must use DHCP or BOOTP to acquire configuration information. The boot scripts recognize a diskless startup and perform the actions found in /etc/rc.d/resolv, /etc/rc.d/tmp, /etc/rc.d/var, and /etc/rc.initdiskless.

CONFIGURATION

In order to run a diskless client, you need the following:

SECURITY ISSUES

Be warned that using unencrypted NFS to mount root and user partitions may expose information such as encryption keys.

SEE ALSO

ethers(5), exports(5), make.conf(5), bootpd(8), mountd(8), nfsd(8), pxeboot(8), reboot(8), tftpd(8)

ports/net/etherboot

BUGS

This manpage is probably incomplete.

FreeBSD sometimes requires to write onto the root partition, so the startup scripts mount MFS file systems on some locations (e.g. /etc and /var), while trying to preserve the original content. The process might not handle all cases.


DISKLESS (8) August 7, 2011

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock.

To err is human...to really foul up requires the root password.