Patches for serial console available

Miquel van Smoorenburg (
18 Jul 1995 00:37:57 +0200

I've hacked up serial console support for Linux 1.3.10.
The diffs are pretty big (17k) so I won't post them
here. Instead, get them from:

Please let me know what you think, and if you think it's
ready to go into the kernel (probably not :))

This week I'm going to find out if this also
works on Linux/Alpha :)

The current README follows:

Linux Serial Console

1. build a new kernel with the patches.
2. Tell LILO to use the serial port.
In lilo.conf (global section):

serial = 1,9600n8 (ttyS1, 9600 bd, no parity, 8 bits)

3. Adjust to kernel flags for the new kernel,
again in lilo.conf (kernel section)

append = "console=1,9600n8"

4. Create 2 new devices:

console: mknod -m 622 systty c 5 255
virtual console master: mknod -m 622 tty0 c 4 0

Now remove /dev/console and link it to /dev/systty:

rm /dev/console
ln /dev/systty /dev/console

/dev/console is now always your system console, and /dev/tty0
is always the master virtual console. These are the same
ofcourse when you boot without the "serial=" flag.

5. Boot the new kernel !

If you compile the next little program, you will be able
to really "halt" the system. It will enter a little
monitor :)

main() { reboot(0xfee1dead, 672274793, 0xCDEF0123); }

This is just a call to the new "halt" function that later
kernels have. This will be included the "halt" command of
a new version of sysvinit.

The monitor will also be entered at a kernel panic, or
when you press "break". That last function does not
work at the moment I think, but it would be useful for
kernel debugging. You don't have alt-scrollock on a serial
console to find out the current EIP...


Miquel van Smoorenburg,      Cistron Internet Services
Mail               An independent Dutch Internet Provider
for more information           <A Href = "">CIS</A>
   +31-1720-19445 (Voice) 30979 (Fax) 42580 (Data) - Alphen a/d Rijn