Advanced system management

By Kurt Seifried, [email protected]


There are a number of system management that I felt didn't quite fit into basic system management, many of these advanced issues require modification of critical files in /etc, reboots of the system, and so forth, and can potentially break your system if not done correctly.


Using a serial console

This is one of the best things about UNIX, the ability to have a serial console. If something breaks or you mangle your network settings and you need to remotely fix it, you have a good chance of being able to do so. On more "intelligent" hardware such as the Sparc platform the serial ports are intelligent enough to allow remote access to the BOOT PROM (the equivalent of the BIOS), and the boot command allowing you more flexibility and recovery ability then on Intel platforms (unless you install a third party "intelligent" serial management port). On Intel platforms (and others such as PPC) you will only have access to the "boot>" command generally, however this will allow you to boot rescue kernels, GENERIC kernels (assuming you are playing with custom kernels) and so on.

In OpenBSD (and most UNIX systems) there are two kinds of serial console, the first (and most common) is actually a serial terminal, and is only present once the system has booted, allowing you to log in remotely (via a modem or dumb terminal for example). Using this method you will not be able to access the boot prompt, however once the system is booted you will be able to login via the serial line.

The second type is more common for administrative purposes, and is present when the system boots, allowing you to give options to the boot loader for system recovery to name one possible use. Using this method you will not see boot messages on a monitor if one is plugged in, the boot up messages are sent to the serial console. To enable a serial console you simply need to edit two files and reboot, there is no need to modify your kernel or install additional software. The first step is to modify "/etc/boot.conf" and add the following two lines:

stty com0 9600
set tty com0

Most serial ports support higher speeds such as 19200 and so on, but 9600 is pretty much guaranteed to work, please test higher speeds first before using them on production servers. The next step is to modify the "/etc/ttys" file, and add or modify the console line:

console "/usr/libexec/getty std.9600"  vt100   on  secure	local

Again specify the terminal speed (make sure it is the same as boot.conf) and also the terminal type, vt220 is nicer then vt100 but vt100 is universally supported. Once you have edited these two files simply reboot the system.

If you see an error such as:

open(hd0a:/etc/boot.conf): Unknown error: code 20

Please refer to the boot time error section of the OAG.



Last updated on 7/7/2002

Copyright Kurt Seifried 2002 [email protected]