How to add kernel drivers from CLI in HPUX 11.11 and 11.23?
Jump to: navigation, search

How to add kernel drivers from CLI in HPUX 11.11 and 11.23?

The kernel drivers can be changed from SAM or from the command line. Make sure you have the latest SAM patches before using SAM. The kernel rebuilding process is accomplished through the following steps:

1. Change directory to the build environment (/stand/build).

# cd /stand/build

2. Execute a system preparation script, system_prep, which extracts the system file from the current kernel and writes a system file in your current directory. (That is, it creates /stand/build/system.) The -v gives verbose explanation as the script executes.

# /usr/lbin/sysadm/system_prep -v -s system

3. Modify the /stand/build/system file to add the absent driver(s) by invoking the kmsystem command. The -c Y specifies that driver-name is to be configured into the system.

# /usr/sbin/kmsystem -S /stand/build/system -c Y <driver-module>

Note: To avoid introducing format errors, do not edit the HP-UX system description files directly. Instead, use the commands kmsystem and kmtune. These commands are new for Release 11.0; consult kmsystem(1M) and kmtune(1M) in the HP-UX Reference.

4. Build the new kernel by invoking the mk_kernel command. This creates /stand/build/vmunix_test, a kernel ready for testing.

# /usr/sbin/mk_kernel -s /stand/build/system

5. Backup your current kernel related files:

# cp /stand/system /stand/system.old
# cp /stand/vmunix /stand/vmunix.old
# cp -R /stand/dlkm /stand/dlkm.vmunix.old

6. Move the new system file into place.

# mv /stand/build/system /stand/system

7. Prepare for rebooting by invoking the kmupdate command. This sets a flag that tells the system to use the new kernel when it restarts.

# /usr/sbin/kmupdate

8. Reboot the system to start using the new kernel

# cd /
# shutdown -ry 0

If you have any problems booting up the server, you can always boot off the kernel backup you created on step #5. Interrupt the boot sequence and use the following instruction:


1. At the Command Menu prompt type "boot pri":

Main Menu: Enter command or menu > boot pri

2. Answer "y" to interact with IPL:

Interact with ISL (Y or N) ?> y

3. Now, at the ISL prompt type "hpux /stand/vmunix.old":

ISL> hpux /stand/vmunix.old


1. Go to the shell prompt. List the current devices:

shell> map -r

2. Select your bootable device:

shell> fs#:

3. Load the HP-UX kernel loader:

fs#:> HPUX

4. Boot from alternate kernel:

HPUX> boot vmunix.old


Configuring HP-UX for a Tape Drive


Ricardo E. Soto Vargas

This page was last modified on 13 October 2009, at 12:09. This page has been accessed 1,802 times.