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

From Wiki-UX.info
Jump to: navigation, search

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:

PA-RISC

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

ITANIUM

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


References[edit]

Configuring HP-UX for a Tape Drive
http://docs.hp.com/en/B2355-90698/ch07s02.html


Author[edit]

Ricardo E. Soto Vargas