Feb 102008
 

This tutorial is for those Admins who need to setup serial console on there LINUX servers

Section-1

    • In this first part of of the how to I will show you how to setup serial console on a
      RedHat(Fedora,CentOS) based systems(Does work on other systems as well).

    • First step is to make sure you have a serial port.
    • Second step is to make sure you have a console cable. You can do this by running this..
      linuxdynasty.org]# dmesg |grep ttyS0
      ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    • Once you verified you have the necessary hardware configuration,
      we are on to configuring the server.

    • Add this co:2345:respawn:/sbin/agetty ttyS0 9600 vt100-nav to /etc/inittab
      using your favorite editor. (mine is vi :) ) This is how mine looks like..
      # Run gettys in standard runlevels
      co:2345:respawn:/sbin/agetty ttyS0 57600 vt100-nav
      1:2345:respawn:/sbin/mingetty tty1
      2:2345:respawn:/sbin/mingetty tty2
      3:2345:respawn:/sbin/mingetty tty3
      4:2345:respawn:/sbin/mingetty tty4
      5:2345:respawn:/sbin/mingetty tty5
      6:2345:respawn:/sbin/mingetty tty6
    • Now it is time to edit /boot/grub.conf. These two entries need to be added into grub.conf
      serial –unit=0 –speed=57600
      terminal –timeout=5 serial console

      And append this to console=ttyS0,57600n8 to your kernel entry.

    • Here is the all in one solution..


      serial --unit=0 --speed=57600
      terminal --timeout=5 serial console
      title CentOS (2.6.9-55.0.2.EL)
      root (hd1,0)
      kernel /vmlinuz-2.6.9-55.0.2.EL ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS0,57600n8
      initrd /initrd-2.6.9-55.0.2.EL.img

    • Now reboot your server and from another box console in.

Section-2

    • Now we will show you how to setup a serial console for Ubuntu Feisty 7.0.4,
      (Reason I chose Feisty is that Feisty no longer uses the /etc/inittab .
      Instead uses upstart for its init functions)

    • First step, follow the First step in Section-1 of this tutorial.
    • Once you verified you have the necessary hardware configuration,
      we are on to configuring the server.

    • Add this exec /sbin/getty -L 57600 ttyS0 vt102 to /etc/event.d/ttyS0 (
      If this file does not exist please create it
      ) using your favorite editor. (mine is vi :) )
      This is how mine looks like..
      # tty0 - getty
      #
      # This service maintains a getty on tty1 from the point the system is
      # started until it is shut down again.

      start on runlevel 2
      start on runlevel 3
      start on runlevel 4
      start on runlevel 5

      stop on runlevel 0
      stop on runlevel 1
      stop on runlevel 6

      respawn
      exec /sbin/getty -L 57600 ttyS0 vt102
    • Now proceed to third step of Section-1 of this tutorial.

Warning: fopen(/home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/lib/standard.txt) [function.fopen]: failed to open stream: No such file or directory in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 104

Warning: fread(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 105

Warning: fclose(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 106
.