Applied FreeBSD: Enabling the Serial Console

To enable the serial console in FreeBSD, edit /boot/loader.conf and add the following:

boot_multicons=”YES”
boot_serial=”YES”
comconsole_speed=”115200″
console=”comconsole,vidconsole”

The above configuration allows for the use of both a video console connected to some form of a display port and the serial port.  It also sets the console baud rate to 115,200 baud rather than the default 9,600 baud. The default for the console is 8N1 9600 baud, just for reference.

Also, edit /boot.config (it may need to be created) and add the following:

-P

According to the man page for boot.config(5), this activates the serial console during the boot process. Finally, to get a serial console login from the host on the other end of the serial cable, in this case, a RHEL7 box, use screen:

sudo screen /dev/ttyS0 115200

I have my FreeBSD box attached to my Linux workstation via a serial patch cable. Of course I can use ssh to remotely login and manage the FreeBSD box, but in case my little network goes down, I can still login to my FreeBSD box.

Advertisements