HP-UX Reference (11i v2 04/09) - 5 Miscellaneous Topics (vol 9)

k
kconfig(5) kconfig(5)
change will not take effect at next boot. A warning will be printed in these situations.
Changes that replace the entire currently running configuration, such as
kconfig -i (import), kcon-
fig -l (load), or kconfig -n (nextboot), cause any changes being held for next boot to be discarded.
Changes that are made to the currently running system are retained when the system is rebooted. They
remain in effect until changed, or until a saved kernel configuration is loaded.
Boot Behavior
When the system is booted, the administrator may specify the name of a saved kernel configuration on
the boot command line. (See hpux(1M) and hpux.e(1M).) If so, that kernel configuration will be loaded
during boot.
If no kernel configuration is specified on the boot command line, the system will look for any kernel
configuration that had been marked for use at next boot (via a
kconfig -n, kconfig -l,orkcon-
fig -i command). If any such configuration is found, that configuration will be loaded during boot.
If no kernel configuration is specified on the boot command line, and none is marked for use at next boot,
the system will boot using the same configuration that was in use before the reboot. If the configuration
had any changes that were being held for reboot, either because they could not be applied without a
reboot or because the
-h option was used, those changes will be applied during the boot process.
If the kernel configuration fails to boot properly, recovery can be attempted by booting the
backup
configuration and/or booting with the "failsafe boot" flag (
-tm on Itanium-based systems, -f0x40000
on PA-RISC systems). See hpux(1M) and hpux.e(1M) for details.
SYSTEM FILES
Users of past releases of HP-UX may be used to keeping kernel configuration choices in a text file called
/stand/system. Such a file is known as a "system file". A system file is automatically maintained for
the currently running kernel configuration. This file can be found at /stand/system
. System files are
also automatically maintained for each saved kernel configuration. These files can be found at
/stand/config/system, where config is the name of the saved configuration. Any time a kernel
configuration (saved or current) is changed using one of the kernel configuration commands, the
corresponding system file automatically gets rewritten to reflect the change. System files can also be gen-
erated on demand for any configuration set using kconfig -e. The format of a system file is described
in system (4).
It is possible to make configuration changes by modifying a system file in a text editor and then running
kconfig -i. This command will read the system file and modify the appropriate kernel configuration
to match the contents of the system file. (mk_kernel (1M) can also read a system file and modify a kernel
configuration. It is retained for compatibility with previous releases of HP-UX.)
Note: Some configuration changes can be made without using one of the kernel configuration com-
mands (for example, by calling the settune (2) or modload(2) system calls directly). In these
cases, the system files are not automatically updated. Be sure to update them manually, or re-
create them using
kconfig -e, before using them.
Note: Avoid putting comments in a system file. System files get re-created every time a kernel
configuration change is made, and comments are not preserved in this process.
System files can be useful for propagating kernel configurations to other systems. To do so, use
kconfig
-e to export a configuration set to a system file on a source machine. Move the file to one or more target
machines and use kconfig -i to import the system file into a configuration set on the target. The tar-
get machines must have the same kernel filesets installed, or the import operation may fail. The -V flag
can be used to ensure that the target machine has exactly the same versions of kernel filesets installed.
If there are changes to the currently running kernel configuration that are being held for reboot, those
changes are reflected in the system file
/stand/system.
LOG FILE
The kernel configuration commands maintain a log file that describes all kernel configuration changes.
This log file is located at
/var/adm/kc.log. The kclog command can be used to search and view the
log file, or to make entries that don’t correspond to configuration changes.
When making a configuration change using any of the commands, you can specify a
-C comment option.
The commands will include the specified comment in the log file entry describing the change. Note that
the comment usually must be quoted to avoid interpretation by the shell. kconfig -i and mk_kernel
will include in the log file any comments that they remove from a system file.
Section 5154 Hewlett-Packard Company 2 HP-UX 11i Version 2: September 2004