Serial console access allows you to manage, monitor, and interact with
your system over a serial console. This can allow access from another
nearby system via a null-modem (``LapLink'') cable or remotely via a serial
concentrator.
You system's BIOS, bootloader (GRUB), Xen, Linux, and login access must
each be individually configured for serial console access. It is
not strictly necessary to have each component fully functional,
but it can be quite useful.
For general information on serial console configuration under Linux,
refer to the ``Remote Serial Console HOWTO'' at The Linux Documentation
Project: https://www.tldp.org
Enabling system serial console output neither enables nor disables
serial capabilities in GRUB, Xen, or Linux, but may make remote
management of your system more convenient by displaying POST and other
boot messages over serial port and allowing remote BIOS configuration.
Refer to your hardware vendor's documentation for capabilities and
procedures to enable BIOS serial redirection.
Enabling GRUB serial console output neither enables nor disables Xen or
Linux serial capabilities, but may made remote management of your system
more convenient by displaying GRUB prompts, menus, and actions over
serial port and allowing remote GRUB management.
Adding the following two lines to your GRUB configuration file,
typically either /boot/grub/menu.lst or /boot/grub/grub.conf
depending on your distro, will enable GRUB serial output.
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal --timeout=10 serial console
Note that when both the serial port and the local monitor and keyboard
are enabled, the text ``Press any key to continue'' will appear
at both. Pressing a key on one device will cause GRUB to display to
that device. The other device will see no output. If no key is
pressed before the timeout period expires, the system will boot to the
default GRUB boot entry.
Please refer to the GRUB documentation for further information.
Enabling Xen serial console output neither enables nor disables Linux
kernel output or logging in to Linux over serial port. It does however
allow you to monitor and log the Xen boot process via serial console and
can be very useful in debugging.
In order to configure Xen serial console output, it is necessary to
add a boot option to your GRUB config; e.g. replace the previous
example kernel line with:
kernel /boot/xen.gz dom0_mem=131072 com1=115200,8n1
This configures Xen to output on COM1 at 115,200 baud, 8 data bits, 1
stop bit and no parity. Modify these parameters for your environment.
One can also configure XenLinux to share the serial console; to achieve
this append ``console=ttyS0'' to your module line.
Enabling Linux serial console output at boot neither enables nor
disables logging in to Linux over serial port. It does however allow
you to monitor and log the Linux boot process via serial console and can be
very useful in debugging.
To enable Linux output at boot time, add the parameter
console=ttyS0 (or ttyS1, ttyS2, etc.) to your kernel GRUB line.
Under Xen, this might be:
module /vmlinuz-2.6-xen0 ro root=/dev/VolGroup00/LogVol00 \
console=ttyS0, 115200
to enable output over ttyS0 at 115200 baud.
Logging in to Linux via serial console, under Xen or otherwise, requires
specifying a login prompt be started on the serial port. To permit root
logins over serial console, the serial port must be added to
/etc/securetty.
To automatically start a login prompt over the serial port,
add the line:
c:2345:respawn:/sbin/mingetty
ttyS0
to
/etc/inittab. Run
init q to force
a reload of your inttab and start getty.
To enable root logins, add ttyS0 to /etc/securetty if not
already present.
Your distribution may use an alternate getty; options include getty,
mgetty and agetty. Consult your distribution's documentation
for further information.