Thursday, September 21, 2006

HP/UX kernel building

Kernel building on UX 10.x

  1. cd /stand/build

  2. Create a new system file from the running kernel.

    /usr/lbin/sysadm/system_prep -s /stand/build/system


  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. Copy the old system and vmunix files so if anything goes wrong, the system can be booted from the old kernel.
    cp /stand/system /stand/system.prev
    cp /stand/build/system /stand/system
    cp /stand/vmunix /stand/vmunix.prev
    mv /stand/build/vmunix_test /stand/vmunix

  6. Reboot the system from the new kernel.

    shutdown -r



Kernel building on UX 11.xx


  1. cd /stand/build

  2. Create a new system file from the running kernel.

    /usr/lbin/sysadm/system_prep -s /stand/build/system


  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. Copy the old system and vmunix files so if anything goes wrong, the system can be booted from the old kernel.
    cp /stand/system /stand/system.prev
    cp /stand/vmunix /stand/vmunix.prev
    rm -rf /stand/dlkm.vmunix.prev
    cp -R /stand/dlkm /stand/dlkm.vmunix.prev
    cp /stand/build/system /stand/system

  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

  7. Reboot the system from the new kernel.

    shutdown -r


No comments: