config(1M) — Series 300, 400, 700 Only
NAME
config − configure an HP-UX system
SYNOPSIS
/etc/config [-t] [-m master] [-c c_file] [-l m_file] [-r dir] dfile
/etc/config [-r dir] -a
DESCRIPTION
config is used to configure the following parts of the operating system:
• Device drivers
• Root and swap devices
• Selected system parameters
• Kernel code that handles messages, semaphores, and shared memory
In the first form shown above, config reads a user-provided description of an HP-UX system (dfile) and generates two output files:
• A C program source file that defines the configuration tables for various parts of the system.
• A makefile (see make(1)) to compile the C program produced and relink the newly configured system.
Command Line Arguments
The config command can be used in two forms and recognizes the following arguments:
First Form:
-t Give a short table of major device numbers for the character and block devices named in dfile. This can facilitate the creation of special files.
-m master Specify that the file master contains all the information regarding supported devices. The default file name is /etc/master.
/etc/master is supplied as part of the HP-UX operating system and should not be modified by anyone who does not fully understand its structure and purpose.
-c c_file Specify the name of the C program file produced by config. The default file name is conf.c.
-l m_file Specify the name of the makefile for compiling the configuration program and relinking the newly configured system. The default file name is config.mk.
-r dir Specify the name of the directory where header files and libraries for kernel configuration files reside. The default directory is /etc/conf.
dfile Specify the name of a file containing configuration information for the user’s system. This file is divided into two parts: The first part (mandatory) contains driver specifications; the second part (optional) contains system-dependent information. In this file, any line with an asterisk (*) in column 1 is a comment.
Second Form:
-r dir Specify the name of the directory where header files and libraries for kernel configuration files reside. The default directory is /etc/conf.
-a Produce a script of mknod templates, placing the result in ./mkdev (see mknod(1M) and mkdev(1M)).
The -a option cannot be used if dfile is specified. If the -a option is not specified, dfile is required.
Constructing dfile: First Part
dfile consists of two parts; the first part is required, whereas the second is optional. Any line in dfile that starts with an asterisk (*) in column 1 is treated as a comment. The first part of dfile is used to configure:
• Device drivers
• Pseudo-drivers, such as ptys
Each line has the following format:
devname
where devname is the driver name for the device as it appears in the alias table in file /etc/master. For example, scsi selects the driver for SCSI disk drives, scsitape selects the driver for SCSI tape drives, and dskless selects the diskless (HP Clustered Environment) protocol. /etc/master contains a complete list of configurable devices, cards, and pseudo-drivers.
Constructing dfile: Optional Second Part
The second part of dfile is optional, and is used to:
• Define the root device.
• Specify and set up the swap device.
• Define status and values of selected system parameters.
• Include or exclude kernel code for messages, semaphores, and shared memory features.
Lines are constructed as indicated below for each category.
1. Root device specification
root devname address
Define driver name and minor device number for root device:
devname Driver name for the device, as it appears in the alias table in /etc/master. For example, cs80 for the HP7958 disk drive.
address Minor device number (in hexadecimal without the preceding 0x).
2. Swap device specification
swap auto
Automatically configure swap on the root device to start just after the file system and extend to the end of the disk. Since there is only one root device, auto can be specified only once in the dfile, and must appear before any other swap device specification line. If swap auto is specified, the root device becomes the primary swap device.
swap devname address swplo [nswap]
Configure the swap device location and its size as specified. Arguments are interpreted as follows:
devname Driver name for the device as it appears in the alias table in /etc/master (for example, cs80 for the HP7933 404MB disk drive).
address Minor device number in hexadecimal without the preceding 0x; e.g., e0100 for a disk at select code 14, HP-IB address 01.
swplo Swap area location in decimal. Boundaries are located at 1K-byte intervals.
A negative value (typically -1) for swplo specifies that a file system is expected on the device. At boot-up, the super block is read to determine the exact size of the file system, and this value is put in swplo. If the swap device is auto-configured, this is the mechanism used. If the super block is invalid, the entry will be skipped, so that a corrupted super block will not later cause the entire file system to be corrupted by configuring the swap area on top of it.
A positive or zero value for swplo specifies the minimum area that must be reserved. Zero means to reserve no area at the head of the device. A zero value implies that there is no file system on the device.
nswap The number (in decimal) of 1K-byte disk blocks in the swap area. Only the nswap parameter is optional. Zero is the default for auto-configuration.
If nswap is zero, the entire remainder of the device is automatically configured in as swap area.
If nswap is non-zero, its absolute value is treated as an upper bound for the size of the swap area. Then, if the swap area size has actually been cut back, the sign of nswap determines whether swplo remains as is, resulting in the swap area being adjacent to the reserved area, or whether swplo is bumped by the size of the unused area, resulting in the swap area being adjacent to the tail of the device.
3. System parameters
These parameters should not be modified without a full understanding of the ramifications of doing so (see the HP-UX System Administrator Tasks Manual for information about each parameter.)
Each line contains two fields. The first field can contain up to 20 characters, maximum; the second field up to 60 characters, maximum. Each line is independent, optional, and written in the following format:
| parameter_name | number or formula |
System V interprocess communication consists of messages (mesg), semaphores (sema) and shared memory (shmem) features.
If mesg, sema, and/or shmem are specified as 0, the kernel code for these features is not included. If they are specified as 1, the kernel code is included; this is the default. The features can be specified independent of each other. If the code is included, the parameters listed below can be modified:
| mesg | 1 |
| msgmap | number or formula |
| msgmax | number or formula |
| msgmnb | number or formula |
| msgmni | number or formula |
| msgseg | number or formula |
| msgssz | number or formula |
| msgtql | number or formula |
| sema | 1 |
| semaem | number or formula |
| semmap | number or formula |
| semmni | number or formula |
| semmns | number or formula |
| semmnu | number or formula |
| semume | number or formula |
| semvmx | number or formula |
| shmem | 1 |
| shmall | number or formula |
| smbrk | number or formula |
| shmmax | number or formula |
| shmmin | number or formula |
| shmmni | number or formula |
| shmseg | number or formula |
FILES
/etc/master default input master device table
/etc/conf/config.sys contains skeleton makefile
/etc/conf/mkdev.sys contains skeleton mkdev script
./conf.c default output configuration table
./config.mk default output make(1) script
./mkdev default output mkdev(1M) script
SEE ALSO
make(1), mkdev(1M), master(4).
Hewlett-Packard Company — HP-UX Release 9.10: April 1995