Serial Console
October 5th, 2006In FreeBSD, on an i386 machine the serial port is not the system console by default. If you have a machine that will run headless you’ll want to do this to make the serial port a viable console.
echo "-P" >/boot.config*
and
- set ttyd0 to cons25 ** and on in /etc/ttys
And from the boot manual page:
-D boot with the dual console configuration. In the single configuration, the console will be either the internal display or the serial port, depending on the state of the -h option below. In the dual console configuration, both the internal display and the serial port will become the console at the same time, regardless of the state of the -h option.
-h force the serial console. For instance, if you boot from the internal console, you can use the -h option to force the kernel to use the serial port as its console device.
-P probe the keyboard. If no keyboard is found, the -D and -h options are automatically set.
* The newest version of the handbook suggests using the /boot/loader.conf method, but there is no allowance for probing the keyboard.
* The “-D” method makes both the local console and the serial port system consoles. Because the console is primarily used to get out of an unforseen sticky situation, having both available is preferable. Unfortunately, the -D option does not show the multiuser startup output, so if a daemon hangs because of a hoarked configuration file, you won’t know it. Depending on which daemon is hanging, this can be very bad.
*** The handbook says vt100 but I find that cons25 works best with my console server.
Filed under: documentation, FreeBSD