Home > centOS, Fedora 12, FreeBSD, Ubuntu, Unix/Linux > how to setup serial console on ubuntu debian fedora centos linux

how to setup serial console on ubuntu debian fedora centos linux

Practical in Ubuntu: setserial, minicom application requires.

Test my console is it DB9 or USB?

# dmesg | grep tty ;this is for USB
[    0.000000] console [tty0] enabled
[ 4718.771404] usb 3-1: pl2303 converter now attached to ttyUSB0
[ 7828.000574] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[10878.054407] usb 3-1: pl2303 converter now attached to ttyUSB0
$ dmesg | grep tty ; this is for COM1
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.38-11-generic-pae root=UUID=f5afb2f7-bcb2-4c3c-8cd1-0e898e0dc292 ro console=tty0 console=ttyS0,9600n8 quiet splash vt.handoff=7
[    0.000000] console [tty0] enabled
[    0.000000] console [ttyS0] enabled
[    1.155514] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    1.336144] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    1.513380] 00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    1.534132] 00:0b: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    1.554757] 0000:00:16.3: ttyS4 at I/O 0xf140 (irq = 19) is a 16550A
# setserial -g /dev/ttyUSB[0123] /dev/ttyS[0123]
/dev/ttyUSB0, UART: 16654, Port: 0x0000, IRQ: 0
/dev/ttyS0, UART: unknown, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
Server setup
vim /etc/default/grub ; This is for Grub2
GRUB_CMDLINE_LINUX='console=tty0 console=ttyS0,9600n8' 
GRUB_TERMINAL=serial 
GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"
:w
update-grub
vim /etc/inittab ; This is for login 
T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
vim /etc/securetty ; This is to check security ttyS0 or ttyUSB0 open
ttyS0 #showing...
init 6 ; reboot once
Server Connect
# cat /etc/minirc.dfl 
# Machine-generated file - use "minicom -s" to change parameters.
pu port             /dev/ttyUSB0
pu baudrate         9600
pu bits	8
pu parity N
pu stopbits 1
pu rtscts No
# minicom -s -c on

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: