CONFIG(1M)
Series 200/300 Only
NAME
config - configure an HP-UX system
SYNOPSIS
/etc/config [-t] [-m master] [-c file] [- l file] [-a file] dfile
DESCRIPTION
Config enables the user to configure the following parts of the operating system:
1. device switch drivers and I/O cards
2. root and swap devices
3. selected system parameters
4. kernel code that handles messages, semaphores, and shared memory
It takes as input, a user-provided description of an HP-UX system (dfile) and always generates two files, with an optional third file. The first file is a C program that defines the configuration tables for the various devices on the system. The second file is a makefile script that will compile the C program produced and relink the newly configured system. The third file (if specified) contains a mknod command for each device specified in dfile.
The options available:
-t gives 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 specifies that the file master contains all the information regarding supported devices. The default file name is /etc/master. This file is supplied with the HP-UX system and should not be modified unless the user fully understands its construction.
-c file specifies the name of the configuration table file produced by running the user-data file, dfile, through config(1M). The default file name is conf.c
-l file specifies the name of the makefile script that will compile the configuration program and relink the newly configured system. The default file name is config.mk
-a file serves two functions:
1. When specified without dfile, a mkdev script of templates is produced.
2. If dfile is given, this indicates that the user will supply addresses for devices so that config can produce a script that contains both the mkdev templates and a list of mknod commands for each device specified in dfile. If this option is chosen, all devices must have addresses. Zero (0) as a dummy address, is valid and necessary for many of the devices, e.g., the card drivers. The default file name is mkdev.
The only required argument is either dfile or -a. If dfile is given it must contain device information for the user’s system. This file is divided into two parts. The first part contains physical device and driver specifications; the second part contains system-dependent information. Any line with an asterisk (*) in column 1 is a comment.
The following devices are not configurable and should not be specified in the system descrition file, dfile:
| swap | cons |
| tty | sy |
| mm | ite200 |
| iomap | graphics |
| r8042 | hil |
| nimitz |
Part 1 of dfile:
This part of dfile allows you to configure:
1. device switch drivers
2. I/O cards
3. pseudo-drivers, e.g., ieee802, pty
Each line contains 1, 2, or 3 fields, delimited by blanks and/or tabs in the following format:
devname [address] [specialfilename]
where:
devname is the driver name for the device (e.g., cs80 for the HP7912 64MB disc drive) or card (98629 for the SRM card) or the name of the pseudo-driver (e.g., iee802 for the ieee802 protocol) you wish to configure.
address is the minor number for that device as given to mknod or the select code of the card if addressing checking is desired. For pseudo-drivers, i.e., iee802, pty, ethernet, the address field is 0. (in hexadecimal, without the preceding 0x).
specialfilename
is what you want the device’s special file to be called in the afile.
For example, to specify a 7914 disc at select code 14, bus address 0 with mknod name /dev/hd:
cs80 0E0000 hd
The complete list of configurable devices, cards, and pseudo-drivers is given in the EXAMPLE section.
It is not necessary to specify the address field, but if you do specify this field and use the -a option, config will produce a file containing a mknod command for each device you specify. It will also check for the unique use of addresses. The -a option allows you to name this file.
Part 2 of dfile:
The second part contains four different types of lines; none of these specifications are required.
1. Root device specification lines which have the following form:
root devname address
where devname is the product number (without the suffix) of the device you wish to configure, e.g., cs80 for the HP7912 64MB disc drive, and address is the minor device number (in hexadecimal, without the preceding 0x).
2. Swap device specification lines:/fR
If you want the system to auto-configure the swap device but you want to specify the swap size, then use:
swapsize <#blocks>
If you want to specify both the swap device location and its size then the specification line has the following form:
swap devname address swplo [nswap]
where:
devname is the product number (with the suffix) of the device you wish to configure, e.g., cs80 for the HP7912 64MB disc drive (in hexadecimal).
address is the minor device number (in hexadecimal)
swplo is the location (decimal) of the swap area
nswap is the number of disc blocks (decimal) in the swap area. Only the nswap parameter is optional. Zero is the default for auto-configuration.
swplo:
A negative value (typically -1) for swplo specifies that a file system is expected on the device. At boot-up, the super block will be read to determine the exact size of the file system, and this value will be put in swplo. If the swap device is auto-configured, this is the mechanism used. If the super block doesn’t appear valid, the entry will be skipped, so that the case of a corrupted super block won’t later cause the entire file system to be corrupted by configuring the swap area on top of it.
A positive (including zero) value for swplo specifies that at least that much area must be reserved. Zero obviously means to reserve no area at the head of the device. The case for swplo pointing beyond the end of the device is gracefully handled.
nswap:
If nswap is zero, the entire remainder of the device is automatically configured in as swap area.
If nswap is non-zero, it’s absolute value is treated as an upper bound for the size of the swap area. Then, for the case that 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. Parameter specification
These parameters should not be modified unless the user fully understands the ramifications of doing so. See the System Administrator’s Manual for more detail on each parameter.
The format: lines of two fields each (number is decimal). Each line is independent and optional.
System Parameters:
| maxusers | number or formula |
| timezone | number or formula |
| dst | number or formula |
| procs | number or formula |
| inodes | number or formula |
| files | number or formula |
| nbuf | number or formula |
| ncallout | number or formula |
| texts | number or formula |
| unlockable_mem | number or formula |
| nflocks | number or formula |
| npty | number or formula |
| maxuprc | number or formula |
| dmmin | number or formula |
| dmmax | number or formula |
| dmtext | number or formula |
| dmshm | number or formula |
| maxdsiz | number or formula |
| maxssiz | number or formula |
| maxtsiz | number or formula |
| shmmaxaddr | number or formula |
System V code: messages (mesg), semaphores (sema) and shared memory (shmem) capability
If mesg, sema, shmem= 1, the kernel code for these features will be included (default); if they = 0, the kernel code will not be included: they are independent. If they are included any of the parameters listed below may be modified.
| mesg | 1 |
| msgmap | number or formula |
| msgmax | number or formula |
| msgmnb | number or formula |
| msgmni | number or formula |
| msgssz | number or formula |
| msgtql | number or formula |
| msgseg | number or formula |
| sema | 1 |
| semmap | number or formula |
| semmni | number or formula |
| semmns | number or formula |
| semmnu | number or formula |
| semmsl | number or formula |
| semvmx | number or formula |
| semaem | number or formula |
| shmem | 1 |
| shmmax | number or formula |
| shmmin | number or formula |
| shmmni | number or formula |
| shmseg | number or formula |
| shmbrk | number or formula |
EXAMPLE
The dfile below will configure an HP-UX system with all the drivers that are currently supported on the Series 200 Release 4.0. The tunable parameters given are the system defaults.
* drivers
cs80
flex
amigo
tape
printer
stape
srm
ptymas
ptyslv
ieee802
ethernet
hpib
gpio
ciper
* cards
98624
98625
98626
98628
98642
* reconfigure the swap area to occupy an entire CS/80 drive at
* select code 14 bus address 01
swapcs800E010000
* tunable parameters
maxusers8
timezone420
dst1
procs(20+8*MAXUSERS)
inodes((NPROC+16+MAXUSERS)+32)
files(16*(NPROC+16+MAXUSERS)/10+32+2*NETSLOP)
nbuf0/* configure based on memory */
ncallout(16+NPROC)
texts(24+MAXUSERS+NETSLOP)
unlockable_mem50
nflocks200
npty96
maxuprc25
dmmin16
dmmax2048
dmtext1365
dmshm512
maxdsiz0x01000000
maxssiz0x01000000
maxtsiz0x01000000
shmmaxaddr0x00ffffff
* configure in messages, semas, and shared memory
mesg1
msgmap(msgtql + 3)
msgmax8192
msgmnb16384
msgmni50
msgssz1
msgtql40
msgseg16384
sema1
semmap10
semmni64
semmns128
semmnu30
semmsl25
semvmx32767
semaem16384
shmem1
shmmax(2048*1024)
shmmin1
shmmni100
shmseg10
shmbrk16
FILES
/etc/master default input master device table
conf.c default output configuration table
config.mk default makefile script
mkdev default mknod script
SEE ALSO
Hewlett-Packard Company — May 11, 2021