August 31, 2001, 12:00 AM — My tendency to be absentminded and careless got me into an annoying
situation recently. I made several changes to my system at once. I
swapped my network card, rebuilt the kernel to try out different USB
drivers, and made a few other changes. But I forgot to make changes to
the file /etc/modules, which would tell the system to load the
appropriate modules for my USB driver, keyboard, mouse, and new network
When I rebooted the system, I couldn't operate the machine. Linux
ignored my USB keyboard and mouse and I couldn't contact the computer
over the network using ssh (secure shell) because it didn't load
support for the new network card.
There are several very simple ways of dealing with this situation. For
example, I could hunt down a keyboard with a PS/2 connector and plug it
in, or I could reboot the system with a previous kernel version. Being
lazy by nature, I didn't want to look for a keyboard. Being impatient
by nature, I didn't want to wait for the system to reboot. I especially
dislike reboots. My system seems to take forever to initialize the IDE
drives and controllers, the Intel Ethernet Express Pro management BIOS,
and the Adaptec SCSI BIOS at boot time.
Fortunately, I anticipated such an event and left myself one more
option. I set up Linux so that I could access it using my Palm Pilot as
a VT100 terminal connected to the serial port. I logged in via the Palm
Pilot, loaded the USB driver and modules for my keyboard, and was back
in business in a wink.
There are other ways a Palm Pilot terminal can help you work or get you
out of a jam. I imagine it could really come in handy as a debugging
tool, especially if you're building a full-screen graphical
application. You can redirect various types of error or debugging
messages to your Palm terminal while you develop your application. Your
Palm instantly takes on the role of a second monitor.
Here's how to set up your Linux system to work that way: First, make
sure your Linux kernel supports the serial ports on your machine, and
also supports the console on the serial port. Your kernel may already
support these options, but if not, you can build a new kernel yourself.
If you use make menuconfig as your kernel configuration tool, select
the Character Devices section and mark these two options in the screen
that comes up:
<*> Standard/generic (8250/16550 and compatible UARTs) serial
[*] Support for console on serial port
You also need the program getty or one like it installed on your system
(alternatives include agetty). Next, edit your /etc/inittab file to
include a line like the following:
T0:23:respawn:/sbin/getty -h -L ttyS0 9600 vt100
In the above example, getty is looking for the Palm Pilot on the first
serial port, which PC users tend to think of as COM1. In Linux that's
currently called ttyS0. If you want to use COM2, change that to ttyS1.