7 Using a Serial Console on FreeBSD

The procedure for doing this is described in detail in the FreeBSD Handbook. This is a quick summary.

7.1 Check the kernel configuration

Check that the kernel configuration file has flags 0x10 in the config line for the sio0 device. This signals this device (known as COM1 in DOS/Windows® or /dev/ttyd0 in FreeBSD) can be used as a console. This flag is set on the GENERIC and LINT sample configs, so is likely to be set in your kernel.

7.2 Create the /boot.conf file

This file should be created containing a single line containing just “-h” (minus the quotes). This tells the FreeBSD boot blocks to use the serial console.

7.3 Edit /etc/ttys

Edit this file and make the following changes.

If you are not going to have any keyboard/video screen on this server at all, you should find all the lines for ttyv devices like

ttyv1   "/usr/libexec/getty Pc"         cons25  on  secure

Change the on to off. This will stop login screens being run on the useless video consoles.

Find the line containing ttyd0. Change it from

ttyd0   "/usr/libexec/getty std.9600"   dialup  off secure

to

ttyd0   "/usr/libexec/getty std.9600"   vt100   on secure

(replacing vt100 with the term type of your console. The xterms terminal type might be a good choice). This allows you to log in to the console port once the system is running multi-user.

Reboot and off you go!

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:58:38