mknfsroot(8)

mknfsroot8

Create a /tftpboot/$ip directory.

Usage

mknfsroot hostname [hostname]

Overview

Mknfsroot creates entries in /tftpboot/$IP for diskless clients, (or clients that boot with one floppy disk and a "nfsroot" kernel).

It is usually called from nrprobenet whenever it found a new host on the local subnet.

mknfsroot tries to minimize disk-storage, and most files in the /tftpboot/$IP directories have only one phisical copy on the harddisk.

In short, it works like this:

Essential binaries

copy really essential binaries (NEED_BINS in /etc/nfsroot/def) to /tftpboot/store, and make hard-links from /tftpboot/$IP/dir/filename to /tftpboot/store.

Config stuff in /etc

Some of the files in /etc must be writable, and secure servers don't want to export /etc rw. Still, /etc can be about 3M in size, so we don't want to copy it for every client. Thus, mknfsroot creates symlinks from /tftpboot/$ip/etc/[subdirs/]files to /remote_etc, later mounting the server's /etc/ on /remote_etc.

/etc/nfsroot/{default,$IP}

If mknfsroot finds files in /etc/nfsroot/{default,$IP}, it will create links to /remote_etc/nfsroot/{default,$IP} instead of /remote_etc.

Files/directories

/etc/nfsroot/ignorehosts

What hosts to ignore (don't ping them). This file contains regular expressions; any hostname that matches any regular expression in this file will be ignored.

/etc/nfsroot/default

The directory structure under this directory is the default for every new client. If you want every client to have a "/var/lib/mystuff" dir, with the file "myfile" in it, put this file in /etc/nfsroot/default/var/lib/mystuff/myfile. File permissions and modes are preserved.

/etc/nfsroot/$IP

If this directory exists for the hosts mknfsroot is to make a /tftpboot/$IP directory for, files in /etc/nfsroot/$IP overrule the files in the /etc/nfsroot/default directory.

/etc/nfsroot/ignorefiles

If there's no default file in /etc/nfsroot/{default,$IP}, then the template used is /etc, unless the files match any of the regular expressions in /etc/nfsroot/ignorefiles

/etc/nfsroot/def

Tells configuration stuff (like what the server IP is (is used to copy the default /etc/nfsroot/default/etc/fstab and friends files), and other stuff.

Distribution

Distribution is subject to the GNU public license.

Bugs

Hosts listed in /etc/nfsroot/ignorehosts are not ignored. Really, this file is for nrprobenet that reads this file, and doesn't call mknfsroot on hosts matching regexps in this file.

Author

Joost Witteveen <[email protected]>, <[email protected]>

From nfsroot 0.5 in Debian 1.3 (Bo). Parsed by carta from the page's man source.