|
|
Linux Serial Console Howto
The below configuration has been tested with Windows "Hyper Terminal" as a Serial Console client.
In order to configure and use a serial console for your linux system you will need the following:
- Install mgetty
rpm -ivh mgetty-1.1.21-4.i386.rpm
- Add to "/etc/inittab". ttyS0 is for COM Port 1 and ttyS0 is for COM Port 2 and so on. The "respawn" is invoked in the event the application abnormally abends. This will restart the serial session.
s0:2345:respawn:/sbin/mgetty ttyS0
s1:2345:respawn:/sbin/mgetty ttyS1
- Edit "mgetty.config" within /etc/mgetty+sendfax and add the below lines.
port ttyS0
direct y
speed 115200
data-only y
port ttyS1
direct y
speed 115200
data-only y
- To test the serial connection perform the following: configure hyperterm to use a baud rate of 115200, with 8 data bits, no parity and 1 stop bit.
Issue "/sbin/mgetty ttyS0" from the command line and then test the hyperterm session. If all is well you will have login access to the system.
NOTE: Make sure to connect a cable from this system to the computer you are using as a client. You will require a 9pin adapter at both ends with a straight through data cable. Once both computers are connected you should be able to access your system provided you have not run into any problems.
NOTE: In order to login using "root" modify the "/etc/securetty" file and add the COM Ports
ttyS0
ttyS1
- Once the above changes have been made the "/etc/inittab" will have to be re-read in order for the changes to take effect.
telinit q
- To see the boot messages at boot add the below line to "/etc/lilo.conf" within the "image" section.
append="console=ttyS0,115200n8 console=tty0"
Example:
image=/boot/vmlinuz-2.2.12-1.0
label=linux
read-only
root=/dev/hdc1
append="console=ttyS0,115200n8 console=tty0"
- Once the "lilo.conf" has been modified rebuild the kernel
lilo
|
|
|