---
name: "netboot.config"
section: "5"
platform: "linux"
package: "netboot"
version: "0.8.1-9"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/netboot.config"
---

# netboot.config(5)

## FILES

/etc/netboot.config - Netboot configuration file

- /usr/lib/netboot/netboot.db - Systems database file

  ## DESCRIPTION

These two files control the operation of the various programs which are part of the **netboot** project. While the configuration file contains general definitions for the programs, the systems database contains specifications for client systems. Using this approach, it is for example possible to give a system name on the command line of **mknbi-linux** and then automatically have the boot image file created with the correct Linux kernel and NFS root parameters. This should make it easier to maintain a large base of diskless clients with different configurations.

## CONFIGURATION FILE

The configuration file used by all **netboot** programs is organized into different sections. Each section is introduced by an identifying tag in square brackets and reaches until the next tag or the end of the file. The section **\[general\]** is used by all programs. If a program requires only one additional section, it's tag name is just the name of the program. Otherwise, the tag name is built by the program name, followed by a colon and a name specifying what this section is used for. This name can by itself be divided into several parts by using colons. For example, the **makerom** program uses multiple sections for either defining bootrom kernel and network driver descriptions. Therefore, the tags used look like \[makerom:kernel:\<name\>\] for the kernel descriptions, and \[makerom:netdrv:\<name\>\] for network driver descriptions. There are no spaces allowed between the tag name and the square brackets.

Each section contains a number of definitions, which start with a parameter name, followed by a colon and the parameter value. Depending on the type of parameter, the value can either be a string, a number, a boolean value, an enumeration value or an integer number. In case of a number, the usual C conventions apply. For example, prepending the number with 0x identifies it as a hex number. Boolean parameters can either have a value of **false** or **true**. In case of a string value, leading (between equal sign and first string character) and trailing (following last string character) blanks are ignored. If leading and/or trailing spaces or # characters are required in a string argument, the whole string can be enclosed in double quotes. If a string value names a directory or file, it is possible to make these paths relative to the main netboot directory **/usr/lib/netboot** by prepending the string with two slashes. Therefore, specifying //utils gets expanded to /usr/lib/netboot/utils when the configuration file gets read. See below about how to change the default netboot directory name.

Everything including and following a # character up to the end of the line is ignored as a comment. Empty lines are also ignored, as well as leading and trailing blanks on a line. Therefore, tag names and parameter definitions can start anywhere on a line. Between the parameter name, the equal sign and the parameter value any number of spaces may be placed. Case is significant for everything in the configuration file. Especially, the boolean values and parameter names have to be all lower case.

If no configuration file name is given either on the command line of a netboot program or in the environment variable **NETBOOT\_CONFIG**, the default **/etc/netboot.config** will be used.

The **\[general\]** section of the configuration file is used by all programs in the **netboot** package. It can contain the following parameters:

- **netbootdir**

  Specifies the directory where to look for all the files required for proper operation. If not specified, the default **/usr/lib/netboot** will be used. This parameter can be overriden by the **-N** or **--netboot-dir** command line options with all netboot programs. Also, if neither the configuration file or the command line is used to specify the directory, the environment variable **NETBOOT** will be looked up before using the default.

- **database**

  Specifies the name of the database file to be used when operating in batch mode, i.e. when the **-b** or **--batch-sys** command line options are given to a program. It's default value is **//netboot.db**.

The possible parameters in any other section of the configuration file are described in the man pages of the corresponding netboot programs.

## DATABASE FILE

The database file is organized into tag separated sections like the configuration file. However, the tag names are constructed differently in that each name consists of a diskless client's system name followed by the name of the program which uses a section. Both names are seperated by a colon. For example, \[testclient:mknbi-dos\] specifies the section used by the **mknbi-dos** program to generate a boot image file for system **testclient**. The client name can also contain several colon separated parts to specify different configurations for the same operating system. Using the example above, \[testclient:msdos:mknbi-dos\] could be used to specify an MS-DOS setup, while \[testclient:opendos:mknbi-dos\] might be used for an OpenDOS environment.

To use a section in the database file you have to give either the **-b** or **--batch-sys** command line option to the corresponding program. The argument to these options specifies the client's system name. When you use different configurations for the same system, you have to give the full name including the colon and the configuration name. With the example above it would be necessary to use --batch-sys=testclient:opendos on the command line to mknbi-dos to use the \[testclient:opendos:mknbi-dos\] section.

The parameters available for each **netboot** program are discussed in the individual man pages of the programs. When using a system definition from the database file, all parameters specified in the database entry always override any command line options. Therefore, you should not use any other command line option besides **-b** or **--batch-sys**.

## ENVIRONMENT

All **netboot** programs use these environment variables as a last resort when the corresponding configuration file parameters or command line options are not given. If an environment variable is specified it will override the compiled-in default.

- **NETBOOT**

  Specifies the main **netboot** directory. This environment variable setting can be overriden by the **-N** or **--netboot-dir** command line options or the **netbootdir** configuration file entry.

- **NETBOOT\_CONFIG**

  Specifies the name of the configuration file. This environment variable setting can be overriden by the **-c** or **--config-file** command line options.

## SEE ALSO

[makerom(8)](/makerom/8.md), [mknbi-linux(8)](/mknbi-linux/8.md), [mknbi-dos(8)](/mknbi-dos/8.md), [mknbi-mgl(8)](/mknbi-mgl/8.md)
