A properly initialized root partition. The script /usr/share/examples/diskless/clone_root can help in creating it, using the servers root partition as a reference. If you are just starting out, you should simply use the servers own root directory, /, and not try to clone it. You often do not want to use the same rc.conf or rc.local files for the diskless boot as you do on the server. The diskless boot scripts provide a mechanism through which you can override various files in /etc (as well as other subdirectories of root). The scripts provide four overriding directories situated in /conf/base, /conf/default, /conf/<broadcast-ip>, and /conf/<machine-ip>. You should always create /conf/base/etc, which will entirely replace the servers /etc on the diskless machine. You can clone the servers /etc here or you can create a special file which tells the diskless boot scripts to remount the servers /etc onto /conf/base/etc. You do this by creating the file /conf/base/etc/diskless_remount containing the mount point to use as a basis of the diskless machines /etc. For example, the file might contain:
10.0.0.1:/etc
Alternatively, if the server contains several independent roots, the file might contain:
10.0.0.1:/usr/diskless/4.7-RELEASE/etc
This would work, but if you copied /usr/diskless/4.7-RELEASE to /usr/diskless/4.8-RELEASE and upgraded the installation, you would need to modify the diskless_remount files to reflect that move. To avoid that, paths in diskless_remount files beginning with / have the actual path of the clients root prepended to them so the file could instead contain:
/etc
The diskless scripts create memory file systems to hold the overridden directories. Only a 2MB partition is created by default, which may not be sufficient for your purposes. To override this, you can create the file /conf/base/etc/md_size containing the size, in 512 byte sectors, of the memory disk to create for that directory.
You then typically provide file-by-file overrides in the /conf/default/etc directory. At a minimum, you must provide overrides for /etc/fstab, /etc/rc.conf, and /etc/rc.local via /conf/default/etc/fstab, /conf/default/etc/rc.conf, and /conf/default/etc/rc.local.
Overrides are hierarchical. You can supply network-specific defaults in the /conf/<BROADCASTIP/etc> directory, where <BROADCASTIP> represents the broadcast IP address of the diskless system as given to it via BOOTP. The diskless_remount and md_size features work in any of these directories. The configuration feature works on directories other then /etc, you simply create the directory you wish to replace or override in /conf/{base,default,<broadcast>,<ip>}/* and work it in the same way that you work /etc.
Since you normally clone the servers /etc using the /conf/base/etc/diskless_remount, 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 to remove /etc/ipfw.conf. You can do this by creating a /conf/base/<DIRECTORY.remove> file. For example, /conf/base/etc.remove, which contains a list of relative paths that the boot scripts should remove from the memory file systems.
As a minimum, you normally need to have the following in /conf/default/etc/fstab
<SERVER>:<ROOT> /nfs ro 0 0
<SERVER>:/usr /usr nfs ro 0 0
proc /proc procfs rw 0 0
You also need to create a customized version of /conf/default/etc/rc.conf which should contain the startup options for the diskless client, and /conf/default/etc/rc.local which could be empty but prevents the servers own /etc/rc.local from leaking onto the diskless system.
In rc.conf, most likely you will not need to set hostname and ifconfig_* because these will be already set by the startup code. Finally, it might be convenient to use a case statement using hostname as the switch variable to do machine-specific configuration in case a number of diskless clients share the same configuration files.