---------------------------------------- Running LRP over a serial link ---------------------------------------- Written by: Charles Steinkuehler Version: 1.1 Last Revised: 09/18/2000 Revision History: 1.1: Released under GNU General Public License 1.0: Initial release License: Copyright (C) 2000 Charles Steinkuehler This document is free; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details: http://www.gnu.org/copyleft/gpl.txt Disclaimers: The procedure described works for me on my test systems. Your mileage may vary. Absolutely no guarantees are made about the accuracy or suitablity of the procedures described below. I cannot be responsible if you accidently destroy a working LRP system, or even if you just wind up wasting an evening or weekend trying to get things working. It is assumed you are smart enough to adapt some of the commands to your particular environment. For example, if this HOWTO says to perform the command: echo "Hello World" > /dev/ttyS0 and you are trying to use the COM2 serial port, you would actually type something like: echo "Hello World" > /dev/ttyS1 This document is being placed in the public domain. You may feel free to copy, use, modify, record, transmit, archive, fold, spindle, or mutilate this document in any way you see fit. Conventions: For clarity, commands you should type in, filenames, screen output, and other such items are either on their own line: Like this or enclosed in single quotes 'Like this'. You should not type in the single quotes when entering commands or filenames, or expect them to be on screen output. ---------------------------------------- Useful LRP related links: ---------------------------------------- http://lrp.steinkuehler.net/ http://www.c0wz.com/ http://linuxrouter.sourceforge.net/ http://www.linuxrouter.org/ http://beta-linuxrouter.razorsedge.com/ http://lrp.plain.co.nz/ http://wpkgate.kc.com.my.cpwright.com/lrp/ ---------------------------------------- The basics: ---------------------------------------- This HOWTO covers using a serial link to your LRP box to replace the VGA card and keyboard normally used as the primary interface for working with LRP. ---------------------------------------- Configuring a serial terminal as you primary interface ---------------------------------------- BEFORE YOU GET STARTED: You will need a few things, so try to track them all down before you get started. I have tried to collect most of the files needed on my web site at http://lrp.steinkuehler.net 1) A serial terminal (duh). If you don't have a serial terminal, there's not much to help you in the rest of this HOWTO. You can also use a PC running a serial terminal program (that's what I do). 2) A seral cable approprate for connecting your LRP box to your serial terminal. This is typically a 'null modem' cable. I used a combination of a 9 pin straight-through cable, a null modem adapter, and a gender changer (with 2 female plugs) for my setup. I got all the parts at Radio-Shack...we don't have Fry's here in Kansas :< GETTING STARTED: It is assumed at this point that your LRP box is configured and working properly. If this is not the case, you should stop here and get your LRP box working with a keyboard and monitor. 1) Connect your LRP box to the serial terminal. You can use any standard serial ports on your LRP box (I used COM1, or /dev/ttyS0). 2) Set your terminal to 9600 buad (LRP defaults to 9600 buad...you can use a faster baud rate later, when you configure the serial settings). 2) Test the basic connection by typing the following on your LRP console echo "Hello World" > /dev/ttyS0 3) If you're lucky, you will see "Hello World" show up on your serial. If everything is connected properly but the two ends disagree on baud rate, you may see some strange looking characters. If you don't see anything, you can try to figure out why, or you can forge ahead, but be prepared for problems later. CONFIGURING A SERIAL TERMINAL: 1) Get to the lrcfg menu by logging in or running 'lrcfg' 2) Edit the /etc/inittab file (lrcfg menu 2-3) 3) There is an example entry for a serial terminal already: #T1:23:respawn:/sbin/getty -L ttyS1 19200 vt100 4) Simply uncomment this line to enable a console session on COM2. If you would rather use COM1, change the line to the following (note the two items that changed): T0:23:respawn:/sbin/getty -L ttyS0 19200 vt100 ^^ ^^^^^ 5) Adjust the baud rate setting (19200) or terminal type (vt100) as necessary 6) Save the file -w and exit -q 7) Edit the /etc/securetty file (lrcfg menu 2-5) 8) Add ttyS0 (and/or ttyS1 as appropriate) to the list 9) Save the file -w and exit -q 10) Backup the /etc package (lrcfg menu b-2) At this point, you should get a login prompt on the serial terminal the next time you reboot, and you should be able to log in as root from the serial terminal. You might want to try this before continuing, to verify everything is working properly. CONFIGURING KERNEL MESSAGES TO DISPLAY ON THE SERIAL TERMINAL: If you rebooted and tested your serial terminal, you noticed nothing appeared on the serial terminal until the LRP system was completely booted and ready for a user to log in. Now it's time to get the kernel boot messages to display on the serial terminal, as well. I strongly suggest you reboot to test you setup before continuing. Fix anything that is broken before you play with the kernel booting. 1) Mount the boot disk mount -t msdos /dev/boot /mnt 2) Edit syslinux.cfg ae /mnt/syslinux.cfg 3) Add the following to the end of the append= line (which should be long and wrapped around your display). Make sure there is a space in front of the first console=, and a space between the two settings, as shown. append=... console=tty0 console=ttyS0,19200n8 4) This displays kernel messages on both the virtual terminal tty0 (your VGA/keyboard combo), and ttyS0 (COM1), with ttyS0 being the 'primary' console because it is listed last. You can also add more consoles, if you like, and they will all recieve the kernel boot messages. The primary console will get some output (mainly from the linuxrc script) that does not show up on the other console(s). 5) Save the file -w and exit -q 6) Reboot Hopefully everything went well, and you can now unplug the monitor and keyboard from your LRP system.