UnixPedia : HPUX / LINUX / SOLARIS: HPUX :Rebuild kernal in HP-UX Version - 10.X, 11.0 and 11.11

Tuesday, October 7, 2014

HPUX :Rebuild kernal in HP-UX Version - 10.X, 11.0 and 11.11

PROBLEM

Sometimes it is necessary to build a kernel via the command line instead of
using SAM.  This document will provide the instructions to do that.


CONFIGURATION

Operating System - HP-UX Version - 10.X, 11.0 and 11.11 Hardware System - HP 9000 Series - N/A

RESOLUTION

11.0-11.11:

1.  Change directories to /stand/build.
cd /stand/build

2.  Create a new system file from the running kernel.
/usr/lbin/sysadm/system_prep -s /stand/build/system

NOTE: HP-UX 11i introduces dynamic tunables to HP-UX.  The system_prep
command will not currently capture dynamic tunable information, since this
commands reads values directly from the kernel.  For HP-UX 11i systems using
dyanmic tunables the /stand/system file should be copied to
/stand/build and used as the kernel template.  kmtune, the
command used to query and alter dynamic kernel tunables, will update the
/stand/system file by default anytime a dynamic tunable is changed.
See the kmtune(1m) and 11.11 Release Notes manpage for more information.
Information on kernel build for 11.23 is available in document
HPUXNEWSI308A6, "HP-UX 11.23 Kernel Builds".



3.  Edit the kernel with the planned changes.
vi /stand/build/system

4.  Build the new kernel.
/usr/sbin/mk_kernel -s /stand/build/system

5.  Move the old system and vmunix files so if anything goes wrong, the system
can be booted from the old kernel.
mv /stand/system /stand/system.prev

6.  Move the new system file and new kernel into place, ready to be used when
rebooting the system.
mv /stand/build/system /stand/system
kmupdate /stand/build/vmunix_test

NOTE: The kmupdate command will move the /stand/vmunix kernel to
/stand/vmunix.prev and the newly created kernel to /stand/vmunix
as part of the shutdown process. 

7.  Reboot the system off the new kernel.
shutdown -r

No comments:

Post a Comment