HPlogo HP-UX Reference Volume 2 of 5 > k

kmupdate(1M)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

kmupdate — update default kernel file and files associated with the kernel, or update specified kernel modules.

SYNOPSIS

/usr/sbin/kmupdate [kernel_file]

/usr/sbin/kmupdate -M module_name [[-M module_name]...] [-i | -a]

DESCRIPTION

This command can be invoked to either update the kernel and the kernel modules associated with the kernel (i.e., /stand/dlkm, which is the kernel function set directory), or to update only the specified kernel modules.

Updating the Kernel and the Associated Kernel Function Set Directory

The first form of kmupdate is used to initiate the move of the specified kernel_file to the default kernel located at /stand/vmunix during the next system shutdown or startup. The directory associated with the specified kernel_file, the kernel function set directory, is also moved to /stand/dlkm at the next shutdown or startup. If kernel_file is not specified, /stand/build/vmunix_test is used as the kernel_file to use for the update.

kmupdate is useful in cases where the kernel is built either by config without its -u option, or by mk_kernel with its -o option (which specifies a kernel other than the default). In these cases the administrator should use kmupdate to update the kernel file and its associated kernel function set directory for the next shutdown or startup.

NOTE: Overwriting or replacing the kernel file and associated kernel function set directory using commands like cp or mv should be avoided.

Options for Updating Specified Loadable Kernel Modules

The second form of kmupdate supports the following options.

-M module_name

Update specified module_name module. Without -a or -i, kmupdate will attempt to update module_name immediately. If module_name cannot be updated immediately, the module will be updated asynchronously, as described below.

-i

When specified, kmupdate will only attempt an immediate update.

-a

When specified, kmupdate will update asynchronously without attempting an immediate update.

Immediate Update of Specified Kernel Modules

kmupdate may be used for immediately updating the loadable image of a newly created kernel module, without a reboot. If the module_name is loaded, kmupdate tries to unload it and, if the -i option is specified and the module cannot be unloaded, kmupdate exits with an error. If the kernel module was either not loaded or successfully unloaded, kmupdate checks if it is registered, and if so, unregisters the module. If the kernel module cannot be unregistered, kmupdate exits with an error if -i is specified; otherwise the module will be updated asynchronously. If the unregistration succeeds, kmupdate overlays the existing loadable image of the module with the newly generated image. It then registers the module with the latest registry information and performs module type specific initialization, if required. If the module was loaded originally, kmupdate reloads the module before exiting.

Asynchronous Update of Specified Kernel Modules

If the -a option is specified, the module will be updated asynchronously without first attempting an immediate update. An asynchronous update occurs at shutdown. When the system shuts down, the module's loadable image is updated. The module is registered when the system is restarted.

RETURN VALUE

kmupdate returns 0 upon normal completion, and 1 if an error occurred.

DIAGNOSTICS

Messages that notify an update is successful are sent to stdout. Error messages are sent to stderr.

FILES

/stand/vmunix

Default kernel file

/stand/dlkm

Default kernel function set directory

© Hewlett-Packard Development Company, L.P.