uxgen(1M) — Series 800 Only
NAME
uxgen − generate an HP-UX system
SYNOPSIS
uxgen [-s] infile
DESCRIPTION
uxgen is used to build an HP-UX system. The user supplies a set of instructions in infile that selects optional parts of the kernel (such as I/O drivers, pseudo-drivers, subsystems, file systems) and specifies values for system parameters such as the location of the swap area.
The files output by uxgen are placed in the directory ../infile. This directory is created if it does not exist. Four files (conf.c, config.h, libs_file, Makefile) are created by uxgen. The file libs_file contains a macro recognized by make specifying the libraries needed to produce a kernel that includes all the subsystems and file systems specified in infile (see make(1)). In addition to infile, the file named Makefile must exist in the current directory. Makefile is supplied with the system and contains targets for compiling conf.c and linking the kernel (hp-ux) using the make macro defined in libs_file. The concatenation of libs_file and Makefile creates the file Makefile in the ../infile directory.
After creating Makefile, uxgen changes the current directory to ../infile and executes the make command. However, if the -s option is specified, make is not executed. make compiles conf.c and links the kernel (hp-ux) with the appropriate kernel libraries. File hp-ux can then be booted. See the HP-UX System Administrator Manuals for information on how to include or remove a subsystem or file system, and how to boot the system.
Many header files are needed to compile conf.c. Also, archive library files containing the kernel objects are needed to link the kernel. These files are supplied with the system and are contained in the directories found under /etc/conf. The directories in /etc/conf can be moved to any location in the file system. However, all the directories must exist before the kernel can be built. By convention, infile is placed in the directory named gen (usually, /etc/conf/gen).
Kernel Building Procedure
To build a new kernel follow these steps, using the commands indicated:
1. Change to the directory containing infile (usually /etc/conf/gen).
Command: cd /etc/conf/gen
2. Edit or create the input file /etc/conf/gen/infile. On a newly installed system, infile is usually named S800.
3. Use the command uxgen infile to build the new kernel file named ../infile/hp-ux.
4. Copy the old kernel to a backup file: cp /hpux /SYSBCKUP. This ensures that a good kernel is still available to boot from if a problem occurs during the copy operation.
5. Overwrite the old kernel file with the new one.
Command: mv ../infile/hp-ux /hp-ux
6. Reboot the system (see shutdown(1M)).
Statements used in infile form a simple C-like language. uxgen first passes infile through the cpp C preprocessor to allow features such as comments, macros, file inclusion and conditional statements (see cpp(1)) before reading the file.
Generally, the first statement in infile is #include /etc/master. This causes the statements in /etc/master to be read prior to the remaining statements in infile. File /etc/master contains "subsystem", "file system", "driver", "pseudo-driver", and "tunable definition" statements which describe kernel software subsystems, file systems, I/O drivers, pseudo-drivers, tunable parameters, and major number assignments for software supplied by HP. Only users who write kernel software need to understand these statements. They are described in the System Administrator manuals supplied with your system.
It is beyond the scope of this manual entry to give a complete description of the statements that can be used in infile. A sketchy syntax description for most statements is given below where:
module_path A module path is a string of names separated by periods, ’.’. Each name identifies a driver controlling a hardware component on the path to a device.
hw_path A hardware path specifies the addresses of the hardware components leading to a device. It consists of a string of numbers, each suffixed by a / character, followed by a string of numbers separated by period (.) characters. Hardware components suffixed by / characters indicate bus converters, and may not be necessary on your machine. Hardware components suffixed by . characters indicate the addresses of the remaining hardware components on the path to the device.
disk_spec module_path at hw_path [minor integer] [section integer]
See the HP-UX System Administrator Tasks manual for more information.
infile Statements
console on default [minor integer];
console on module_path at hw_path [minor integer];
Specify the system console. The default is the console device used when booting the system (i.e., Page Zero).
dumps on default [minor integer] [section integer];
dumps on disk_spec;
Specify location used for writing operating system image after operating system detects a fatal error (panic). Dump device defaults to primary swap.
include identifier;
Include a pseudo-driver, subsystem, file system, or driver in the kernel.
io {
identifier integeraddress integer; . . . identifier address integer {
identifier address integer ;
} . . . }
Specify the number of I/O devices and how they are connected. Used to override default mappings from driver to hardware component or to include drivers that do not support autoconfiguration.
remove identifier;
Remove a pseudo-driver, subsystem, file system or driver that was previously included with an include statement.
root on default [minor integer] [section integer];
root on disk_spec [mirrored on disk_spec];
Specify the root of the file system (/). The default root device is taken from the hpuxboot command line. The root of the file system can be mirrored by explicitly specifying both the root device and the mirror device (see mirror(1M)).
swap on default [minor integer] [section integer] [disk_spec ... ];
swap on disk_spec [mirrored on disk_spec] [disk_spec ... ];
Specify on which disk and section each swap area is located. Multiple swap areas can be defined. Only the first swap area listed (i.e., primary swap) can be mirrored (see mirror(1M)). The default for primary swap is section 1 of the root device.
tunable-ID integer;
tunable-ID "anychars" ;
Assign a value to a tunable parameter. tunable-ID can be any identifier listed below under Tunable Parameters. All HP tunable parameters are defined and assigned a default value using a “tunable definition” statement in file /etc/master.
Tunable Parameters
acctresume The percentage of file system space that must be free to reactivate process accounting after it is suspended due to insufficient free space (see acctsuspend).
acctsuspend The percentage of file system space that must be free to allow process accounting (see acctresume).
bootspinlocks The number of kernel spinlocks available for allocation during system boot. If the kernel panics during system boot with the message alloc_spinlock: not enough boot spinlocks, this parameter should be increased.
bufpages The number of memory pages allocated to the file-system buffer cache. Each page is NBPG bytes long (see <sys/param.h>). If bufpages is zero, two pages are allocated for each buffer header specified by nbuf, provided nbuf is non-zero. If both nbuf and bufpages are zero, ten percent of available memory is allocated by the kernel.
check_alive_period
The period between checking for alive messages from an HP cluster cnode (specified in seconds).
dmmax
dmmin
dmshm
dmtext The values of these parameters are used as described below under Swap Space Parameter Interaction.
dskless_cbufs Obsolete. This parameter is no longer used.
dskless_fsbufs The number of pages allocated to the fsbuf (file system buffer) pool. Each page is NBPG bytes long (see <sys/param.h>).
dskless_mbufs Obsolete. This parameter is no longer used.
dskless_node A flag that identifies a diskless client node or cluster server. A value of 1 identifies a client node. A value of 0 identifies the cluster server.
dst A flag that specifies whether daylight saving time should be used. A value of 0 means not to use daylight saving time. A value of 1 indicates that U.S.A. daylight saving time should be used.
maxdsiz The maximum size (in pages) of a process’s data segment.
maxfiles The maximum number of files a given process can have open simultaneously. This limit can be changed using setrlimit(2).
maxfiles_lim A limit on the number of open files a non-super-user process can have. Non-super-user processes cannot increase their open file limit beyond maxfiles_lim.
maxssiz The maximum size (in pages) of a process’s stack.
maxswapchunks The maximum number of dmmax ∗ 1 kbyte blocks of swap space allocated.
maxtsiz The maximum size (in pages) of a process’s shared text segment.
maxuprc The maximum number of processes a user may have.
maxusers The maximum number of expected users. Assigning a value to this parameter causes the macro MAXUSERS to be defined (for example, #define MAXUSERS 8). MAXUSERS is used to determine other tunable parameters (for example, nproc "(20 + 8 * MAXUSERS)";).
minswapchunks The minimum number of dmmax × 1K-byte blocks of swap space allocated.
msgmap The number of message map entries.
msgmax The maximum number of bytes in a message.
msgmnb The total number of bytes allowed for all messages queued on a message queue.
msgmni The number of message queue identifiers.
msgseg The number of units (each msgssz bytes long) available for messages.
msgssz The size (in bytes) of each unit of memory used for messages (see msgseg).
msgtql The number of message headers.
nbuf The number of file-system buffer cache buffer headers. If both nbuf and bufpages are set to 0, the kernel allocates ten percent of available memory to buffer space. If only nbuf is 0, it will be computed from bufpages, assuming 4096 bytes per buffer. If both variables are non-zero, the kernel attempts to adhere to both requests, but if necessary, nbuf is changed to correspond to bufpages.
ncallout The number of timeouts that can be pending simultaneously.
netisr_priority If a networking subsystem is configured, netisr_priority specifies the realtime priority by which the process /etc/netisr is scheduled, and by which all networking runs. Otherwise, netisr_priority is ignored.
nfile The maximum number of open files.
nflocks The maximum number of file locks.
ngcsp The number of general cluster server processes (for diskless server).
ninode The maximum number of open in-core inodes.
nproc The maximum number of processes that can exist simultaneously.
npty The number of ptys (pseudo-terminals).
nstlbe The number of Software TLB entries requested.
nswapdev The maximum number of devices that can be enabled for swapping.
nswapfs The number of file systems available for swapping.
ntext The maximum number of active shared text descriptors.
num_cnodes The limiter for diskless system resource allocation. It is used as an indicator of the number of diskless cnodes that a server can reasonably expect to serve simultaneously. Assigning a value to this parameter causes the macro NUM_CNODES to be defined (for example, #define NUM_CNODES 5). NUM_CNODES is used to determine other tunable parameters (for example, ngcsp "8 * NUM_CNODES";). pfail_enabled Specifies whether recovery from system power loss is enabled. A value of 1 enables this feature. A value of 0 disables it.
retry_alive_period
The period to continue checking for alive messages from an HP cluster cnode (specified in seconds).
scroll_lines The number of lines of emulated terminal memory, both on-screen and off-screen, for each ITE (Internal Terminal Emulator) port.
selftest_period The period between execution of kernel self-test (specified in seconds).
semaem The maximum value by which a semaphore can be adjusted due to the death of a process.
semmap The number of semaphore map entries.
semmni The number of semaphore identifiers.
semmns The maximum number of semaphores.
semmnu The maximum number of processes that can have pending "semaphore undo" requests on a semaphore.
semume The maximum number of semaphores on which a process can have a pending "semaphore undo" request.
semvmx The maximum value of a semaphore.
server_node A flag used to size an array for the root server’s inbound requests. A value of 1 causes the serving_array[] and ninode to be sized for a server node. A value of 0 causes the serving_array[] and ninode to be sized for a cluster cnode.
serving_array_size
The size of the cluster’s serving array. The serving array is an array of kernel structures that holds information related to inbound requests.
shmmax The maximum number of bytes in a shared memory segment.
shmmni The maximum number of shared memory segments.
shmseg The maximum number of shared memory segments that can be attached simultaneously to a process.
timeslice The number of 10-millisecond intervals used for round-robin scheduling. A value of −1 disables round-robin scheduling.
timezone The minutes west of Greenwich.
unlockable_mem The number of bytes of memory that cannot be locked.
using_array_size
The size of the diskless cnode’s using array. The using array is an array of kernel structures that holds information related to outbound requests.
Swap Space Parameter Interaction
If you change maxdsiz, maxssiz, maxtsiz, or shmmax, you must also change dmmin, dmmax, dmtext, and dmshmem. All of these swap space system parameters interact, and a wrong value might make your virtual memory system unworkable.
Appendix A of the HP-UX System Administrator Tasks manual contains a table listing the values these parameters must have for given values of maxdsiz, maxssiz, maxtsiz, or shmmax.
EXAMPLES
A typical infile resembles the following:
include mirror;
include nfs;
include nsdiag0;
include cio_ca0;
include hpib0;
include hpib1;
include disc1;
include hpfl0;
include disc2;
include mux0;
include tape0;
include instr0;
include gpio0;
console on default;
root on cio_ca0.hpfl0.disc2 at 8.3.0 section 0
mirrored on cio_ca0.hpfl0.disc2 at 8.3.1 section 0;
dumps on default;
swap on default
cio_ca0.hpib0.disc1 at 8.0.0 section 1
cio_ca0.hpib0.disc1 at 8.0.1 section 1;
dskless_node 1;
maxuprc 30;
maxusers 32;
nproc "(20 + 8 ∗ MAXUSERS)";
server_node 0;
timezone 420;
io {
cio_ca0 address 8 {
hpib0 address 2 {
instr0 address 7;
}
gpio0 address 5;
}
}
AUTHOR
uxgen was developed by HP.
FILES
/etc/master
SEE ALSO
make(1), insf(1m), cpp(1m), lssf(1m), mirror(1m), mksf(1m), shutdown(1m), privilege(5).
Hewlett-Packard Company — HP-UX Release 9.03: April 1994