Serial console on ubuntu

If you’d like to have a serial console additionally (and not as a replacement) on an ubuntu system, you have to add the following line to /etc/default/grub:

GRUB_TERMINAL=”console serial”

For configuring use

GRUB_SERIAL_COMMAND=”serial –speed=115200 –unit=0 –word=8 –parity=no –stop=1″

To have the kernel writing it’s output to the serial console too add this (of course use the same serial line parameters for that):

GRUB_CMDLINE_LINUX=”rootflags=data=writeback console=tty0 console=ttyS0,115200n8″


To get a login on the serial console create the file /etc/init/ttyS0.conf with content

# ttyS0 – getty
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.

start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

exec /sbin/getty -L 115200 ttyS0 vt102


This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s