Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ system(4) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

system(4)

NAME

system − system configuration information file

DESCRIPTION

The system file is used for customizing the operation of the UNIX system kernel. 

The system file contains commands which are read by the kernel during initialization and used to customize the operation of your system.  These commands are useful for modifying the system’s treatment of its loadable kernel modules. 

The syntax of the system file consists of a list of keyword / value pairs which are recognized by the system as valid commands. Comment lines must begin with an asterisk and end with a newline character. All commands are case-insensitive except where noted otherwise. A command line can be no more than 80 characters in length. 

Commands that modify the system’s operation with respect to loadable kernel modules require you to specify the module type by listing the module’s namespace. The following namespaces are currently supported:

drvModules in this namespace are device drivers. 

execModules in this namespace are execution format modules. There are two exec modules currently provided by Sun on SPARC, AOUT, and ELF, and two exec modules provided on Solaris 2.1 for x86, COFF, and ELF. 

fsThese modules are filesystems. 

schedThese modules are process scheduling algorithm modules. 

strmod
These modules are STREAMS modules.

sysThese modules are loadable system call modules. 

miscThese modules don’t fit into any of the above categories, so are considered "miscellaneous" modules. 

Below is a description of each of the supported commands:

EXCLUDE: <namespace>/<modulename>
Do not allow the listed loadable kernel module to be loaded. EXCLUDE commands are cumulative; the list of modules to EXCLUDE is created by combining every EXCLUDE entry in the system file. 

INCLUDE: <namespace>/<modulename>
Include the listed loadable kernel module. This is the system’s default, so using INCLUDE does not modify the system’s operation. INCLUDE commands are cumulative. 

FORCELOAD: <namespace>/<modulename>
Force this kernel module to be loaded during kernel initialization. The default action is to automatically load the kernel module when its services are first accessed. FORCELOAD commands are cumulative. 

ROOTDEV: <device name>
Set the root device to the listed value instead of using the default root device as supplied by the boot program.

ROOTFS: <root filesystem type>
Set the root filesystem type to the listed value.

SWAPDEV: <swap device>
Set the swap device to the listed value. Overrides the default swap device.

SWAPFS: <swap filesystem type>
Set the filesystem type of swap.

MODDIR: <first module path>[[:, ]<second ...>]...]
Set the search path for loadable kernel modules. This command operates very much like the PATH shell variable.  Multiple directories to search can be listed together, delimited either by blank spaces or colons.

SET [<module>:]<symbol> {=, |, &} [~][-]<value>
Set an integer or character pointer in the kernel or in the selected kernel module to a new value. This command is used to change kernel and module parameters and thus modify the operation of your system. Assignment operations are not cumulative, whereas bitwise AND and OR operations are cumulative. Operations that are supported for modifying integer variables are: simple assignment, inclusive bitwise OR, bitwise AND, One’s complement, and negation. Variables in a specific loadable module can be targeted for modification by specifying the variable name prefixed with the kernel module name and a colon (:) separator.  Values can be specified as hexadecimal (0x10), Octal (046), or Decimal (5). The only operation supported for modifying character pointers is simple assignment. Static string data such as character arrays cannot be modified using the SET command. Use care and ensure that the variable you are modifying is in fact a character pointer. The SET command is very powerful, and will likely cause problems if used carelessly. Remember that the entire command, including the quoted string, cannot exceed 80 characters.  The following escape sequences are supported within the quoted string:

\n (newline), \t (tab), and \b (backspace). 

EXAMPLE

This example describes a working system file in detail, with examples of each of the ­commands. 

∗ Prevent the mouse (ms) kernel STREAMS module from being
∗ loaded by the system. Note that streams modules are in the strmod
∗ namespace.
EXCLUDE: strmod/ms
 ∗ Include the lance STREAMS driver module (sle). Really
∗ a no-op.  Note that drivers are in the drv namespace.
INCLUDE: drv/sle
 ∗ Force the ELF exec kernel module to be loaded immediately. Execution
∗ type modules are in the exec namespace.
FORCELOAD: exec/elfexec
 ∗ Change the root device to /sbus/esp@0,800000/sd@3,0:a.  I got this name
∗ from the Device Filesystem, /devices. Note that the device
∗ filesystem reflects the hardware and drivers currently configured into
∗ your system, and is also automatically maintained. Simply stated, you
∗ can find out what hardware is attached and what drivers are available
∗ simply by looking under /devices on your system. In this example,
∗ I selected the first partition (a) of the SCSI disk at esp SCSI host
∗ adapter unit-address 3,0 at sbus unit-address 0,800000.
rootdev: /sbus/esp@0,800000/sd@3,0:a
 ∗ Set the filesystem type of the root to ufs.
ROOTFS:ufs
 ∗ Set the swap device to sd1b. I got the device name from the device
∗ filesystem. I want to use the second partition (b) on esp SCSI
∗ unit-address  1,0.
SWAPDEV:/sbus/esp@0,800000/sd@1,0:b
 ∗ Set the swap fs type to "spec"
SWAPFS:spec
 ∗ Set the search path for kernel modules to look first
∗ /usr/phil/mod_test for modules, then in /kernel/modules (the
∗ default) if not found. Useful for testing new modules.
∗ Note that you can delimit your module pathnames using
∗ colons instead of spaces: moddir /newmodules:/kernel/modules
moddir /usr/phil/mod_test /kernel/modules.
 ∗ Set the integer variable "foobar" in the kernel to 500.
SET foobar = 500
 ∗ Bitwise OR the integer variable "foobar" in the "scsi"
∗ loadable module with the hex value 0x40000000, and
∗ set "foobar" to this new value.
set scsi:foobar | 0x40000000
 ∗ Bitwise AND the kernel variable "moddebug" with the
∗ one’s complement of the hex value 0x800, and set
∗ "moddebug" to this new value.
set moddebug & ~0x800
 ∗ Demonstrate the cumulative effect of the SET
∗ bitwise AND/OR operations by further modifying "moddebug"
∗ by ORing it with 0x40.
set moddebug | 0x40
 ∗ Set the integer variable "foo" in the "testing" module
∗ to −16 octal.
SET testing:foo = −016
 ∗ Change the kernel character pointer "initname" to
∗ be "/sbin/init" rather than the default "/etc/init"
set initname = "/sbin/init"

WARNINGS

Remember that system file lines must be less than 80 characters in length. Use care when modifying the system file; it modifies the operation of your UNIX system kernel. 
 

SunOS 5.1  —  Last change: 30 Sept 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026