Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [148]

By Root 2750 0
the number of file table entries, and the number of buffers for terminal I/O. The most important of these is the maximum number of processes on the system. Here’s the formula:

Maximum processes = 20 + 16 * maxusers

This maximum process count includes the 18 or so processes that start when the system is booted.

The options keyword


Clauses asserted in an options directive become variables that are defined for the C preprocessor during compilation of the kernel. There are two different forms of the options statement.

In the first form, tokens are defined but given no particular value. Such tokens specify whether an option is on or off, using the preprocessor directives #ifdef and #ifndef. When a token is supplied as an argument to an options statement, the corresponding preprocessor symbol is defined and the option is enabled. For example, the phrase to include NFS in the kernel is

options NFS

Note that with FreeBSD, any string in the config file containing both letters and numbers needs to be quoted. For example the ISO-9660 filesystem used on CD-ROMs is enabled with the following line:

options "CD9660"

The second form of options statement not only defines a symbol but also gives it a specific value. The kernel code uses the symbol as if it were a constant, and the C preprocessor makes an appropriate substitution wherever the symbol appears. This type of symbol is declared with the syntax

options symbol="value"

For example, to modify the value of the MAXDSIZ option, which sets the maximum amount of virtual memory that can be allocated to the data segment of a single process, you would use a line such as

options MAXDSIZ="(64*1024*1024)"

This example sets the value to 64 megabytes.

The most common options are listed below. None of these options take a value. See your vendor’s documentation for a complete list.

INET

This option includes networking support. Networking has become so pervasive that a lot of software is likely to break if you don’t include it; it’s an option in name only. When you enable INET, you should also include the pseudo-device loop. See page 242 for information about pseudo-devices. The INET option includes only software-side networking support. Network hardware is declared later in the config file.

FFS

This option allows local disks to be attached to the machine. It’s omitted only when an extremely lean kernel for a diskless client or an embedded device is set up.

NFS

This option includes NFS support in the kernel. It’s required for both NFS clients and servers.

GATEWAY

This option is for use on machines that have more than one network interface and are intended to perform Internet routing and forwarding functions. This option currently has only minor ramifications: it increases the sizes of some kernel data structures to cope with the expected load and provides for special network behavior if one of the interfaces goes down.

The config keyword


The config keyword specifies the location of the root partition on the system’s disks.

The root partition is the topmost component of the filesystem. It contains the directory / and several other important files and subdirectories. Information about how to mount filesystems is normally kept in the /etc/fstab file, but UNIX can’t get to this file until the root partition has already been mounted.

See page 133 for more information about the fstab file.

To bootstrap the filesystem, information about the partition that holds the root must either be compiled into the kernel or, on some systems, passed to the kernel by the bootstrap loader. The situation for swapping is not as dire, since it’s unlikely that any swapping will occur until the /etc/rc* scripts run the swapon command.

A config line has the form

config kernel_name root on partition

The kernel_name parameter sets the filename under which the compiled kernel will be stored. FreeBSD kernels are named kernel; alternates are often named to identify the disk they use for the root partition (e.g., dakernel).

The partition parameter tells

Return Main Page Previous Page Next Page

®Online Book Reader