WarpZero RSS WarpZero@Twitter WarpZero@LinkedIn Michael Marth@Facebook Monday, 21-May-2012 01:50:29 EDT
   
warpzero.com

° Home
° News & Updates
° Howto & Knowledge Base
° External Resources
° Contact us
° Search
° Site Validated
° Site Map




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:

  1. Install mgetty

    rpm -ivh mgetty-1.1.21-4.i386.rpm

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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"

  7. Once the "lilo.conf" has been modified rebuild the kernel
    lilo

Linux Counter
Apache
IBM Canada
Cisco Systems
RedHat
Linux
 
 Published: Wednesday, 10-Nov-2010 05:19:21 EST