Console Configuration: Difference between revisions

From CSCWiki
Jump to navigation Jump to search
(New page: This article explains how to configure various operating system to use a serial console. == Linux == === Console Login === To get a login prompt on the serial port, you need to edit /et...)
 
m (add to Software category)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
This article explains how to configure various operating system to use a serial console.
This article explains how to configure various operating systems to use a serial console.

== GRUB ==

To use the serial console exclusively for GRUB, add the following lines to menu.lst:

serial --unit=0 --speed=115200
terminal serial

To allow use of either the serial console or monitor/keyboard, add these lines instead:

serial --unit=0 --speed=115200
terminal --timeout=10 console serial


== Linux ==
== Linux ==

=== Kernel Messages ===

To make /dev/console the serial port, append

console=ttyS1,9600

to the kernel command line. You can replace 115200 by any valid baud rate. This will make calls to printk() display to the serial port. You can have kernel messages displayed on both the serial port and the monitor by specifying two consoles, as in

console=ttyS0,115200 console=tty0


=== Console Login ===
=== Console Login ===
Line 9: Line 31:
T0:2:respawn:/sbin/getty -L ttyS0 115200 vt100
T0:2:respawn:/sbin/getty -L ttyS0 115200 vt100


== Solaris ==
Note: we use [[Puppet]] to manage inittab. You must make this change in nodes.pp rather than editing inittab directly.


To make /dev/console the serial port, use eeprom:
=== Kernel Messages ===

eeprom console=ttya ttya-mode="115200,8,n,1,-"

You must update the boot archive after doing this:

bootadm update-archive

Unfortunately, there does not seem to use both the serial port and monitor as the console in Solaris. Adding a GRUB entry to boot using the keyboard and monitor as the console is highly recommended:

title Solaris 10 AMD64 TEXT CONSOLE
kernel /platform/i86pc/multiboot kernel/amd64/unix -B console=text
module /platform/i86pc/boot_archive
title Solaris 10 AMD64 SERIAL CONSOLE
kernel /platform/i86pc/multiboot kernel/amd64/unix -B console=ttya,ttya-mode="115200,8,n,1,-"
module /platform/i86pc/boot_archive

Next, modify /etc/ttydefs so that console-login doesn't change the baud after boot:

console:115200 hupcl opost onlcr:115200::console

Finally, restart console-login:


svcadm restart console-login
To make /dev/console the serial port, append "console=ttyS1,9600" to the kernel command line. You can replace 115200 by any valid baud rate. This will make calls to printk() display to the serial port.


[[Category:Software]]
You can have kernel messages displayed on both the serial port and the monitor by specifying two consoles, as in "console=ttyS0,115200 console=tty0".

Latest revision as of 19:20, 22 March 2010

This article explains how to configure various operating systems to use a serial console.

GRUB

To use the serial console exclusively for GRUB, add the following lines to menu.lst:

serial --unit=0 --speed=115200
terminal serial

To allow use of either the serial console or monitor/keyboard, add these lines instead:

serial --unit=0 --speed=115200
terminal --timeout=10 console serial

Linux

Kernel Messages

To make /dev/console the serial port, append

console=ttyS1,9600

to the kernel command line. You can replace 115200 by any valid baud rate. This will make calls to printk() display to the serial port. You can have kernel messages displayed on both the serial port and the monitor by specifying two consoles, as in

console=ttyS0,115200 console=tty0

Console Login

To get a login prompt on the serial port, you need to edit /etc/inittab. For example, if you have a vt100 connected to the first serial port at 128k baud, use a line such as the following:

T0:2:respawn:/sbin/getty -L ttyS0 115200 vt100

Solaris

To make /dev/console the serial port, use eeprom:

eeprom console=ttya ttya-mode="115200,8,n,1,-"

You must update the boot archive after doing this:

bootadm update-archive

Unfortunately, there does not seem to use both the serial port and monitor as the console in Solaris. Adding a GRUB entry to boot using the keyboard and monitor as the console is highly recommended:

title Solaris 10 AMD64 TEXT CONSOLE
kernel /platform/i86pc/multiboot kernel/amd64/unix -B console=text
module /platform/i86pc/boot_archive

title Solaris 10 AMD64 SERIAL CONSOLE
kernel /platform/i86pc/multiboot kernel/amd64/unix -B console=ttya,ttya-mode="115200,8,n,1,-"
module /platform/i86pc/boot_archive

Next, modify /etc/ttydefs so that console-login doesn't change the baud after boot:

 console:115200 hupcl opost onlcr:115200::console

Finally, restart console-login:

 svcadm restart console-login