Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ config(8) — SunOS 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

CONFIG(8)  —  System Manager’s Manual — Maintenance Commands

NAME

config − build system configuration files

SYNOPSIS

/usr/etc/config [ −p ] config_file

DESCRIPTION

Config builds a set of system configuration files from a short file which describes the sort of system that is being configured.  It also takes as input a file which tells config what files are needed to generate a system.  This can be augmented by a configuration-specific set of files that give alternate files for a specific machine.  (see the FILES section below) Specifying the −p option to config configures a system for profiling (see kgmon(8) and gprof(1)).

Run config from the conf subdirectory of the system source (in a Sun environment, from /sys/conf).  Config assumes that there is already a directory ../config_file created and it places all its output files in there.  The output of config consists of several files: ioconf.c, which contains a description of I/O devices attached to the system; a makefile, which is a file used by make(1) in building the system; a set of header files which contain the number of various devices that will be compiled into the system; and a set of swap configuration files which contain definitions for the disk areas to be used for swapping, the root file system, argument processing, and system dumps.

After running config, you must then change directory to the directory in which the new makefile was created, and use make to create the dependency tree for the new system: # cd ../System_Name # make depend Config reminds you of this when it completes. 

If you get any other error messages from config, you should fix the problems in your configuration file and try again.  If you try to compile a system that had configuration errors, you will probably not succeed. 

CONFIG FILE FORMAT

In the following descriptions, a number can be a decimal integer, a whole octal number or a whole hexadecimal number.  Hex and octal are specified to config in the same way they are specified to the C compiler, a number starting with "0x" is a hex number and a number starting with just a "0" is an octal number.  When specifying the timezone, you may also use floating point numbers. 

Comments are specified in a config file with the character "#".  All characters from a "#" to the end of a line are ignored. 

Lines beginning with tabs are considered continuations of the previous line. 

Lines of the configuration file can be one of two basic types.  First, there are lines which describe general things about your system:

machine type
This is system is to run on the machine type specified. Only one machine type can appear in the config file. The legal type for a Sun system is sun. 

cpu "type"
This system is to run on the cpu type specified. For a Sun system, "type" is "SUN2" (note that the double quotes are part of the designation). 

ident name
Gives the system identifier — a name for the machine or machines that run this kernel.

timezone number [ dst ]
Specifies the timezone you are in.  This is measured in the number of hours west of GMT you are.  5 is EST, 8 is PST. Negative numbers indicate hours east of GMT. If you specify dst, the system will operate under daylight savings time. 

maxusers number
The maximum expected number of simultaneously active user on this system is number.  This number is used to size several system data structures. 

options optlist
Compile the listed options into the system.  Options in this list are separated by commas. There is a list of options that you may specify in the generic makefile. A line of the form "options FUNNY,HAHA" yields −DFUNNY −DHAHA to the C compiler. An option may be given a value, by following its name with "=" then the value enclosed in (double) quotes. None of the standard options use such a value. 

config sysname config_clauses... 
Generate a system with name sysname and configuration as specified in config-clauses. The sysname is used to name the resultant binary image and per-system swap configuration files.  The config_clauses indicate the location for the root file system, one or more disk partitions for swapping and paging, a disk partition to which system dumps should be made, and a disk partition on which execve argument lists should be constructed.  All but the root device specification may be omitted, config will fill them in with default values as described below. 

root A root device specification is of the form root on xy0d.  If a specific partition is omitted — for example, if only root on xy0 is specified — the “a” partition is assumed.  When a generic system is being built, no root specification should be given; the root device will be defined at boot time by prompting the console. 

swap Swap device specifications have two possible forms.  If a generic swap configuration is required, the clause swap generic should be specifed.  Otherwise, if a single partition is to be used for swapping, one may specify swap on xy0b.  If multiple partitions are to be interleaved one should specify something of the form swap on xy0 and xy1 and xy1g.  If no swap specification is given, config assumes swapping should be done on the “b” partition of the root device.  Swapping areas may be almost any size and multiple swap partitions of varying size may be interleaved.  Partitions used for swapping are sized at boot time by the system; to override dynamic sizing of a swap area the number of sectors in the swap area can be specified in the config file.  For example, swap on xy0b size 99999 would configure a swap partition with 99999 sectors. 

args The partition to be used for argument list processing may be specified with a clause of the form args on xy1b.  If no argument device is specified, the first swap partition specified is used.  If a device is specified without a particular partition, the “b” partition is assumed.  If a generic system is being built, no argument device should be specified; the argument device will be assigned to the swap device dynamically configured at boot time. 

dumps The location to which system dumps are sent may be specified with a clause of the form dumps on xy1.  If no dump device is specified, the first swap partition specified is used.  If a device is specified without a particular partition, the “b” partition is assumed.  If a generic configuration is to be built, no dump device should be specified; the dump device will be assigned to the swap device dynamically configured at boot time. 

Dumps are placed at the end of the partition specified.  Their size and location is recorded in global kernel variables dumpsize and dumplo, respectively, for use by savecore(8).

Device names specified in configuration clauses are mapped to block device major numbers with a file /sys/conf/devices.machine, where machine is the machine type previously specified in the configuration file.  If a device name to block device major number mapping must be overridden, a device specification may be given in the form major x minor y. 

The second group of lines in the configuration file describe which devices your system has and what they are connected to (for example, I have a Xylogics xy450 on the Multibus).  These lines have the following format:
dev_typedev_name    at    con_dev    more_info

Dev_type is either tape, disk, controller, device, or pseudo-device.  These types have the following meanings:

controller
is a Multibus disk controller or a Multibus tape controller.

disk or tape
are devices connected to a controller.

device
is something that plugs into the Multibus, like a cartridge tape interface.

pseudo-device
is something which should be conditionally loaded, but is not really a device.  Current examples are the pseudo-tty driver and various network subsystems. (For pseudo-devices, more_info may be specified as an integer, that gives the value of the symbol defined in the header file created for that device, and is generally used to indicate the number of instances of the pseudo-device to create. If you load a subsystem you will probably find it convenient to enable conditional code using an options specification. 

dev_name is the name of the device you are specifying.  If it is not a pseudo-device, you must give a number afterwards (for example, xyc0 for a Xylogics controller, or ar0 for an Archive quarter-inch tape controller). 

Con_dev is what the device you are specifying is connected to.  For example, disk xy1 is connected to controller xyc0. 

more_info is a sequence of the following:

csr addr
Specifies the csr (command and status registers) for a device.  Must be specified for all Multibus tape and disk controllers and all devices connected to the Multibus.  Make certain that you put a leading zero on the address so that it will be interpreted as an octal number.

drive number
For a disk or tape, specifies which drive this is.

flags number
These flags are passed to the device driver at system initialization time.

priority level
For devices which interrupt on the Multibus, specifies the interrupt level at which the device operates.

The easiest way to understand config files it to look at a working one and modify it to suit your system.  A good sample is provided in the Installing UNIX for the First Time chapter of the System Installation and Maintenance Guide at the beginning of this manual.  In the example, all lines are explained. 

A ?  may be substituted for a number in two places and the system will figure out what to fill in for the ?  when it boots.  You can put question marks on a con_dev (e.g. at mba?), or on a drive number (e.g. drive ?)  This allows redundancy, as a single system can be built which will reboot on different hardware configurations. 

FILES

/sys/conf/GENERICgeneric config file for Sun systems
/sys/conf/READMEfile describing how to make a new kernel
/sys/conf/makefile.sungeneric makefile for Sun systems
/sys/conf/fileslist of common files system is built from
/sys/conf/files.sunlist of Sun-specific files
/sys/conf/devices.sunname to major device mapping file for Sun systems

SEE ALSO

The SYNOPSIS portion of each device entry in the section 4 pages of the Sun System Interface Manual. 

BUGS

The line numbers reported in error messages are usually off by one. 

Sun System Release 1.0  —  1 April 1981

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