BlueQuartz serial console HOWTO

Dec,15 2004.
Makoto Oda, Cobalt Users Group.

[ Japanese ]


Cobalt series hardware has a serial port console because it has no VGA display.
The boot message and some will be outputted via a serial console. It is also usable to login as root user even the box has not any network connection.

Operation step by step

The system which is based on BlueQuartz FC1 Reference kit, the GRUB boot loader had been chosen. Let us check and modify the boot process step by step. At first, GRUB loads the kernel image file. Then next, the kernel calls init program and init changes the system run level to the multi user mode. And there is kudzu program which recognizes all devices and expansion cards automatically.
Totaly 3 stages; GRUB, init and kudzu are. We have to change the console function from VGA screen and PS/2 keyboard to serial port.

At first, let us make a backup for in case of trouble.

[root@blue root]# cp -pi /etc/grub.conf /etc/grub.conf.bak
[root@blue root]# cp -pi /etc/sysconfig/kudzu /etc/sysconfig/kudzu.bak
[root@blue root]# cp -pi /etc/sysconfig/init /etc/sysconfig/init.bak
[root@blue root]# cp -pi /etc/inittab /etc/inittab.bak
[root@blue root]# cp -pi /etc/securetty /etc/securetty.bak

Add following 2 lines to GRUB setting file in order to change the I/O device.
"serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
"terminal --timeout=5 serial console"
And comment out following line to disable graphical splash while booting.
Then append following strings after "kernel/boot/..." line. It will be kernel parameters to enable serial port as a console.
"console=tty0 console=ttyS0,115200n8"
[root@blue root]# vi /etc/grub.conf
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/hda1
#          initrd /boot/initrd-version.img
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal --timeout=5 serial console
title Fedora Core (2.4.22-1.2199.nptl)
        root (hd0,0)
        kernel /boot/vmlinuz-2.4.22-1.2199.nptl ro root=LABEL=/ hdc=ide-scsi console=tty0 console=ttyS0,115200n8
        initrd /boot/initrd-2.4.22-1.2199.nptl.img

Change SAFE paramter to "yes" because kudzu should not do reset the serial port.
[root@blue root]# vi /etc/sysconfig/kudzu
# Set to anything other than 'no' to force a 'safe' probe on startup.
# 'safe' probe disables:
# - serial port probing
# - DDC monitor probing
# - PS/2 probing

Change BOOTUP parameter to "serial". It makes init message out by monochrome.
[root@blue root]# vi /etc/sysconfig/init
# color => new RH6.0 bootup
# verbose => old-style bootup
# anything else => new style bootup without ANSI colors or positioning
# Turn on graphical boot
# column to start [ OK ] label in
# terminal sequence to move to that column. You could change this
# to something like tput hpa  if your terminal supports it

To accept login on serial port as a console, add following line.

[root@blue root]# vi /etc/inittab
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon
# Serial console login
s0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100

Add "ttyS0" to security file. It enables root login from serial port.
[root@blue root]# vi /etc/securetty

Now your BlueQuartz box is ready. Connect your PC and the box by serial cable such as BlueQuartz<-> serial cable <->PC.
If the PC is Windows, please install and run some terminal emulator software such as TeraTerm. After rebooting the server by using the control panel or shutdown command, all messages will be displayed on your terminal software.