United States-English |
|
|
HP-UX System Administrator's Guide: Configuration Management: HP-UX 11i Version 3 > Chapter 10 Configuring the KernelRecovering from Errors |
|
Occasionally, kernel configuration changes are made that are undesirable. Also, hardware failures and changes can ruin a previously acceptable kernel configuration. HP-UX has several mechanisms available to system administrators who need to recover from such issues, including:
The system automatically maintains a saved configuration called backup. Generally, any time you use the kernel configuration tools to make a change to the currently running configuration, the previous (pre-change) configuration is saved to backup. Therefore the backup configuration is somewhat like the “undo” command in a word processor. In these cases, if you load the backup configuration using kconfig -l backup, it will reverse the last change you made to the currently running configuration using the kernel configuration commands. Some changes can be made to the currently running configuration by calling kernel system calls directly. The backup configuration is not updated when those changes are made. There are cases in which you may not want this automatic backup behavior. For example, if you have made an undesirable change and are trying to fix it, you do not want the kernel configuration commands to replace a good backup configuration with the one containing your undesirable change. The -b off option (keep the existing backup) can be given in any kernel configuration command to disable the automatic update of the backup configuration. When making changes using HP SMH, you can clear the back up the current configuration before applying change check box to disable the automatic backup behavior. When your system first boots, the backup configuration mirrors the configuration that was in use before the reboot. You may not want this replaced by the first kernel configuration change you make, especially since the first kernel configuration change could be made by a startup script before you even get a login prompt. For this reason, the first configuration changes after a boot are handled specially. Instead of automatically replacing the backup configuration, the kernel configuration commands will ask you whether or not to do so.[4] They will continue to ask, each time you make a change, until the first time you say Yes. From that point on, until next boot, they will automatically replace the backup configuration with each change as described above. If you want to disable the automatic replacement of the backup configuration for a particular change, specify -b off. If you want to force an automatic replacement of the backup configuration, specify -b on (backup). These options work with any kernel configuration command that makes configuration changes. In extreme circumstances, a mistaken configuration change can result in a kernel configuration that won’t boot. In these cases, you have two options: boot a different configuration, such as the automatic backup configuration, and/or boot in fail-safe mode (described in “Booting in Fail-Safe Mode”). IntegrityTo boot a saved configuration on an Integrity system, interrupt the automatic boot process when it reaches the point that it has started the HP-UX boot loader. (On most systems, this is during the second 10-second countdown.) At the HPUX> prompt, type
HP 9000To boot a saved configuration on an HP 9000 system, interrupt the automatic boot process when you arrive at the boot console handler. Tell it to boot from the desired device (typically with a boot pri command). When it asks if you want to interact with the ISL or IPL, say Yes. (The exact mechanism to get to this point varies; consult your system’s hardware document or the hpux(1M) manpage for details.) At the ISL> prompt, type
In either case, this will boot the saved configuration named thursday. When the boot is complete, it will be the currently running configuration; the previous configuration is lost (unless it was automatically saved as backup). The other alternative for recovering from an unbootable configuration is to boot in fail-safe mode. When you boot the system in fail-safe mode, your configuration settings are ignored. All kernel tunables are given fail-safe values and no kernel modules are dynamically loaded during boot. This method is particularly useful when a hardware change or failure has caused all of your saved configurations to be unbootable. IntegrityTo boot an Integrity system in fail-safe mode, get to the HPUX> prompt as described in “Booting a Saved Configuration” and enter:
HP 9000To boot an HP 9000 system in fail-safe mode, get to the ISL> prompt as described in “Booting a Saved Configuration” and enter:
Some HP 9000 systems that have been updated from earlier versions of HP-UX have boot loaders that do not support the -tm option. On those systems, enter the following instead:
(The two methods can be combined, if you want to boot a saved configuration in fail-safe mode. This uses the kernel executable built for the saved configuration, including all of its static modules, but none of its dynamically loaded modules.) When you boot the system in fail-safe mode, the previous kernel configuration will be automatically saved for you, with a configuration name something like saved_3DE78FA0. The exact name will be printed for you in the boot messages on the console. When you boot the system in fail-safe mode, the boot will stop when you reach single-user mode. At this time you should take any necessary steps to repair your system or your configuration and then reboot onto a valid configuration. HP does not recommend continuing to boot to multiuser mode after a fail-safe boot. Tunable values can be changed at boot time by putting tunable settings at the end of the boot loader command line. These settings have the form tunablename=value, with no embedded white space. The value must be an integer in either hexadecimal (prefixed by 0x) or decimal. This value will replace the value saved in the configuration being booted. (If the value is invalid, no change is made.) For example, to change the value of nproc at boot time, do the following:
If you have an undesirable or unbootable kernel configuration, HP recommends the following approach to resolving the problem. Of course, depending on the level of your support contract with HP, you can call on HP field service personnel to perform these steps, if needed. If you get to a point where you cannot boot any of your saved configurations, even in fail-safe mode, your last resort is to boot from the HP-UX installation media. If that succeeds, you do not necessarily have to reinstall HP-UX; you can open a shell and try to repair your system. [4] If the command is being run noninteractively, such as from a startup script, the answer is assumed to be No for kcmodule, kctune, and kcdevice, and Yes for kconfig. |
Printable version | ||
|