Source: Chapter 1, System Admin Tasks, Reconfiguring the kernel
To use HP-UX commands to reconfigure the kernel: - Log in as superuser on the machine for which a new kernel is being generated. You can log in remotely from another location by using the /usr/bin/rlogin command.
- Change directories to the build environment (/stand/build). There, execute a system preparation script, /usr/lbin/sysadm/system_prep, which extracts the system file from the current kernel, as follows:
# cd /stand/build # /usr/lbin/sysadm/system_prep -v -s system The system_prep script creates the system file /stand/build/system in your current directory. The -v option provides explanation as the script executes. - Edit the /stand/build/system file to perform your task.
- The system file contains configuration information. The first part of the file lists the driver specifications while the second part identifies modifiable kernel parameters. man config to get a more detailed description of the system file.
- Consult HP's kernel parameters documentation to obtain valid parameters and associated ranges.
- Build the kernel:
# mk_kernel -s system The mk_kernel command creates /stand/build/vmunix_test, a kernel ready for testing. If you get this message when executing mk_kernel,
ERROR: Kernel is too large to boot.
Actual: 15605892 bytes
Limit: 13580288 byteseliminate optional subsystems or drivers and decrease the tunable parameters. The actual bytes will vary with each instance. The limit will also vary depending on the HP-UX release. - Copy the old system file and kernel so if anything goes wrong, you still have a bootable kernel.
# cp /stand/system /stand/system.prev # cp /stand/vmunix /stand/vmunix.prev - Move the new system file and new kernel into place, ready to be used when you reboot the system.
# mv /stand/build/system /stand/system # mv /stand/build/vmunix_test /stand/vmunix - Notify users that the system will be shut down. You can use the /usr/sbin/wall command and/or the interactive capabilities of the /usr/sbin/shutdown command to broadcast a message to users before the system goes down. For details, see wall(1M), shutdown(1M), and "Shutting Down the System" in Chapter 2 of this manual.
NOTE: You only need to do the next steps if you are changing hardware, such as adding new peripherals. If you are simply changing a kernel parameter, reboot the system to active the new kernel with shutdown -r. - Bring the system to a halt using the shutdown command.
- Turn off the power to all peripheral devices and then to the SPU.
- Install the hardware or remove interface cards or peripheral devices. Refer to the documents shipped with the products being installed and to Configuring HP-UX for Peripherals for specific instructions.
- Turn on the power to all peripheral devices. Wait for them to become "ready", then turn on power to the SPU. The system will attempt to boot the new kernel.
|
|