Search


print PDF
Serial Over Lan

Serial Over Lan is a mechanism to use the serial port through the IP network, it is however necessary to configure your operating system so you can enjoy.

Configuration


Linux


Open a console on the serial port


To connect to a terminal must open a console on the IPMI serial port (ttyS2 / COM3).

We will make a copy of the file /etc/inittab before editing:
cp /etc/inittab /etc/inittab.backup
pico /etc/inittab

Then add the red line to /etc/ inittab (this may be slightly different depending on your distribution):
# Example how to put a getty on a serial line (for a terminal)
#
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
T2:23:respawn:/sbin/getty -L ttyS2 115200 vt100

Ask init to reload the configuration file /etc/inittab :
/sbin/init q

We will allow connections superuser (root) to the serial port to just edit the file /etc/securetty and, if necessary, add the line in red:
# UART serial ports
ttyS0
ttyS1
ttyS2

Configure the serial port to grub2


To access grub and view messages from the kernel and init the serial port, you must change the configuration of lilo, here's how.

Please note that configuration can disrupt diagnostic from our technicians, thank you activate only if you understand what you are doing (the messages from init will only be displayed on the serial port, it will no longer be displayed on the screen).

Please note this configuration may be going to make a copy of the file /etc/default/grub before editing:
cp /etc/default/grub /etc/default/grub.bak
pico /etc/default/grub

Here is a sample /etc/default/grub, lines changed or added are in red:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS2,115200n8"
GRUB_TERMINAL="console serial"
GRUB_DISABLE_LINUX_UUID=true
GRUB_SERIAL_COMMAND="serial --unit=2 --speed=115200 --word=8 --parity=no --stop=1"

Once the changes made to the /etc/default/grub, grub is updated:
# update-grub
Generating grub.cfg ...
Warning: update-grub_lib is deprecated, use grub-mkconfig_lib instead
Found linux image: /boot/bzImage-2.6.38.2-xxxx-grs-ipv6-64
No volume groups found
done


Configure lilo to the serial port


To have access to lilo and view messages from the kernel and init the serial port, you must change the configuration of lilo, here's how.

Please note that configuration can disrupt diagnostic from our technicians, thank you activate only if you understand what you are doing (the messages from init will only be displayed on the serial port, it will no longer be displayed on the screen).

We will make a copy of the file /etc/lilo.conf before editing:
cp /etc/lilo.conf /etc/lilo.conf.bak
pico /etc/lilo.conf

Here is a sample /etc/lilo.conf the lines changed or added are in red:
prompt
timeout=50
default=linux
boot=/dev/md1
raid-extra-boot=mbr-only
map=/boot/map
install=/boot/boot.b
lba32
append="console=tty0 console=ttyS2,115200n8"
serial=0,115200n8

image=/boot/bzImage-2.6.38.2-xxxx-grs-ipv6-32
label=linux
read-only
root=/dev/md1

Once the changes are made​​, are updated lilo:
# lilo -v
LILO version 22.7, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2005 John Coffman
Released 12-Apr-2005 and compiled at 13:42:58 on May 10 2006

Using BIOS device code 0x80 for RAID boot blocks
Reading boot sector from /dev/md1
Using MENU secondary loader
Calling map_insert_data

Boot image: /boot/bzImage-2.6.38.2-xxxx-grs-ipv6-32
Added linux *

Reading boot sector from /dev/sda
/boot/boot.0800 exists - no boot sector backup copy made.
The Master boot record of /dev/sda has been updated.
Reading boot sector from /dev/sdb
Warning: /dev/sdb is not on the first disk
/boot/boot.0810 exists - no boot sector backup copy made.
The Master boot record of /dev/sdb has been updated.