HP−UX 10.x Kernel Configuration

−p Configure the system for profiling. This option is only available for systems with full source releases. −o obj_dir Use ..obj_dir instead of ..OBJ as the directory to find the object files when the corresponding source file is not present, in order to generate the files necessary to compile and link your kernel. Note that there are differences among kernel configuration commands of different UNIX flavors and types; always consult the available documentation

23.4 Other Flavored Kernel Reconfigurations

This part of the chapter presents several other kernel configuration procedures. The presented UNIX flavors are mostly System V−like, so conditionally we can say they represent System V kernel configuration procedures. Unfortunately there is not a lot in common among them, and the title used for this part is definitely more appropriate than strictly System V−related title. Generally, each implementation of System V had its own kernel configuration procedure. There were major differences between SVR2, SVR3, and SVR4. Because of all of the difficulties in practical implementation, System V vendors have done much to automate the process. Therefore, if a new software package should be added, the system administrator can run a system configuration program to install the package and automatically make the necessary kernel changes. The System V approach is not a single kernel configuration file; instead, it includes a number of so−called master files that contain configuration information used to create a kernel; this means that the kernel configuration database is a collection of files. The files reside in the master directory that has a different name for different flavors. We will discuss this topic with the HP−UX, Solaris, and Linux UNIX flavors in mind. Even though this review should provide sufficient expertise to understand other implementations, it is recommended that you see vendors documentation and manuals for each specific case, as well as the systems online manual pages. Even within the same vendor flavors, completely different approaches between succeeding releases are possible, as is the case with HP−UX 9.0x and HP−UX 10.x.

23.4.1 HP−UX 10.x Kernel Configuration

In HP−UX 10.x the kernel binary is created offline, and the newly created kernel binary will be executed upon the next system reboot. The front−end HP−UX flavored command config is used to configure device drivers, swap and dump devices, and tunable system parameters. The config command reads a user−provided system description in the file standsystem, as well as the provided master kernel configuration tables files, and generates the following: A C program source file that defines the system configuration • A makefile file used to compile the C program and relink the newly configured system the make utility is used for this purpose • The config command performs these steps automatically, so the new kernel binary is the end result of its execution. Correspondingly, our task is to appropriately modify the kernel description file standsystem, and execute the config command. The default kernel values, as well as the permitted ranges of kernel parameters, are defined within master files in the directory usrconfmaster.d: 575 total 146 −r−−r−−r−− 1 bin bin 17122 Mar 18 21:47 core−hpux −r−−r−−r−− 1 bin bin 3950 Jun 10 1996 dfs −r−−r−−r−− 1 bin bin 1170 Jun 10 1996 dskless −r−−r−−r−− 1 bin bin 5474 Apr 3 13:45 flkmgr −r−−r−−r−− 1 bin bin 4086 Jun 10 1996 lan −r−−r−−r−− 1 bin bin 3716 Aug 26 1996 lan100bt_hppb −r−−r−−r−− 1 bin bin 4309 Jun 10 1996 lvm −r−−r−−r−− 1 bin bin 5069 Jun 10 1996 net −r−−r−−r−− 1 bin bin 4001 Jun 10 1996 proc−resrc−mgr −r−−r−−r−− 1 bin bin 4115 Mar 20 1997 spt −r−−r−−r−− 1 bin bin 6358 Jun 10 1996 streams −r−−r−−r−− 1 bin bin 4748 Jun 10 1996 streams−tio −r−−r−−r−− 1 bin bin 4279 Jun 10 1996 vxfs Not all of the master files presented here reside on every system; their presence depends on the installed hardware and software. However, some of them always exist, for example, the master file core−hpux. This file defines all tunable kernel parameters. Do not forget that kernel reconfiguration mostly involves tuning kernel parameters. To add a new driver is only required if new hardware is added, and swap and dump devices rarely change. Also, if drivers are specified in the kernel description file, it does not mean they must be active; drivers are always hardware dependent, and can be active only if the appropriate hardware exists. Let us see what a kernel description file looks like: cat standsystem Drivers and Subsystems asp btlan1 ccio cdfs clone core diag0 ... ... pts sad sc scsi1 sdisk sio stape tpiso uipc vxbase wsio Kernel Device info vxadv diag2 dmem dev_config dump lvol Tunable parameters maxfiles 75 maxfiles_lim 1275 maxswapchunks 1031 maxuprc 175 maxusers 350 msgmax 32768 576 Rebuilding the kernel could be a risky business; any failure in the kernel could be catastrophic for the system itself. The old workable kernel image standvmunix must always be saved for a possible fallback. By default, the config command creates the new kernel image standbuildvmunix vmunix_test if SAM was used; the new kernel must be moved copied into the stand directory, where the system looks for the kernel vmunix, during startup. If something goes wrong with the new kernel, the fallback procedure must be implemented: Halt or reboot the system if possible; you must be logged in as root to do this. The worst−case scenario is to power−cycle the system. • Follow messages on the console and discontinue the system booting. HP−UX allows you to interrupt the booting by pressing any key within the announced 10 second interval. • Continue with the booting; at the menu prompt, type: boot • Accept to Interact with IPL; type y . • Bring the system into single−user mode using the old kernel. Assuming the old kernel was saved as standvmunix.fbk, at the ISL prompt, type: hpux −is standvmunix.fbk • While the system is in single−user mode, fallback to the old kernel: mv standvmunix.fbk standvmunix • Reboot the system into multi−user mode: shutdown −r 0 •

23.4.2 Solaris 2.x Kernel Configuration