(Modified 10/27/2017 by Patrick Pascual @ppascual)

-Modified 10/27/2017 by Brobeck -Added racadm commands for BIOS configuration settings

Enabling DELL iDRAC Serial Console Access via SSH

Accessing the DELL iDRAC serial console via SSH terminal session is an alternative to using the web-based Virtual Console (accessible via the iDRAC's management port). Using an SSH terminal session to access the serial console has the advantage of bypassing dependencies on web browser and web application client (ActiveX/Java).Enabling serial console access via SSH involves configuring the following:

 

BIOS settings

  1. Enter the System Setup menu on startup.
  2. Navigate to the "Serial Communication" menu.



  3. Change the following settings:

    Serial Communication = "On with Console Redirection via COM2"
    Serial Port Address = "Serial Device1=COM1,Serial Device2=COM2"
    Failsafe Baud Rate = 115200
    Remote Terminal Type = "VT100/VT220"
    Redirection After Boot = "Enabled"

 


Configure BIOS via Racadm

It is best to login to management port and type "racadm" to get the racadm prompt.  What's nice about this is that the "TAB" will finish or give options.

Get BIOS Serial settings:

 

 

racadm>>get BIOS SerialCommSettings

racadm get BIOS.SerialCommSettings.
[Key=BIOS.Setup.1-1#SerialCommSettings]
ConTermType=Vt100Vt220
ExtSerialConnector=Serial1
FailSafeBaud=57600
RedirAfterBoot=Enabled
SerialComm=OnConRedirCom2
SerialPortAddress=Serial1Com1Serial2Com2

Ex)
racadm>>set BIOS SerialCommSettings <TAB>

ConTermType
ExtSerialConnector
FailSafeBaud
RedirAfterBoot
SerialComm
SerialPortAddress

racadm>>set BIOS SerialCommSettings OnConRedirCom2


Schedule:

To schedule this to take effect on reboot


$ racadm jobqueue create BIOS.Setup.1-1
--Then use racadm serveraction powercycle


To View the Job
$ racadm jobqueue view

 


 

iDRAC RACADM settings

To change the RACADM settings for enabling serial console redirection to SSH, access the RACADM commands via one of the following methods (requires OpenManage installation):

  1. Log in to the server remotely via SSH and run the RACADM commands from the command line (requires root privileges)
  2. Log in as root to the server's management port (e.g., <hostname>-mgt) remotely via SSH and run the RACADM commands from the terminal

Then run the RACADM commands as follows for the appropriate iDRAC firmware version on that server:

For iDRAC 6 firmware:

  1. View the current serial console configuration:
    # racadm getconfig -g cfgSerial
    cfgSerialBaudRate=57600
    cfgSerialConsoleEnable=0
    cfgSerialConsoleQuitKey=^\
    cfgSerialConsoleIdleTimeout=600
    cfgSerialConsoleNoAuth=0
    cfgSerialConsoleCommand=
    cfgSerialHistorySize=8192
    cfgSerialCom2RedirEnable=1
    cfgSerialTelnetEnable=0
    cfgSerialSshEnable=0

  2. Enable Serial over SSH:
    # racadm config -g cfgSerial -o cfgSerialSshEnable 1
  3. Verify that the serial over SSH setting has been enabled:
    # racadm getconfig -g cfgSerial -o cfgSerialSshEnable
    1

For iDRAC 7/8 firmware:

  1. View the current serial console configuration:
    # racadm get iDRAC.SSH
    [Key=iDRAC.Embedded.1#SSH.1]
    Enable=Enabled
    Port=22
    Timeout=1800
  2. Enable Serial over SSH:
    # racadm set iDRAC.SSH.Enable 1
  3. Verify that the serial over SSH setting has been enabled:
    # racadm get iDRAC.SSH.Enable
    [Key=iDRAC.Embedded.1#SSH.1]
    Enable=Enabled

Linux Operating System Configuration

For RHEL6, edit the following files:

  1. /etc/grub.conf



    Example snippet of grub.conf shown below:
    # cat /etc/grub.conf
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a /boot partition. This means that
    # all kernel and initrd paths are relative to /, eg.
    # root (hd0,0)
    # kernel /boot/vmlinuz-version ro root=/dev/sda1
    # initrd /boot/initrd-[generic-]version.img
    #boot=/dev/sda
    default=0
    timeout=5
    #splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    serial --unit=1 --speed=57600
    terminal --timeout console serial
    #hiddenmenu
    title Red Hat Enterprise Linux Server (2.6.32-642.3.1.el6.x86_64)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.32-642.3.1.el6.x86_64 ro root=/dev/sda1 console=ttyS1,57600n8r console=tty0 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_NO_LVM crashkernel=auto rd_NO_DM
    initrd /boot/initramfs-2.6.32-642.3.1.el6.x86_64.img
    title Red Hat Enterprise Linux Server (2.6.32-642.1.1.el6.x86_64)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.32-642.1.1.el6.x86_64 ro root=/dev/sda1 console=ttyS1,57600n8r console=tty0 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_NO_LVM crashkernel=auto rd_NO_DM
    initrd /boot/initramfs-2.6.32-642.1.1.el6.x86_64.img

    ...

  2. /etc/securetty

    # cat /etc/securetty
    console
    vc/1
    vc/2
    vc/3
    vc/4
    vc/5
    vc/6
    vc/7
    vc/8
    vc/9
    vc/10
    vc/11
    tty1
    tty2
    tty3
    tty4
    tty5
    tty6
    tty7
    tty8
    tty9
    tty10
    tty11
    ttyS1

  3. /etc/init/ttyS1.conf

    # cat /etc/init/ttyS1.conf
    start on stopped rc RUNLEVEL=[2345]
    stop on starting runlevel [016]
    respawn
    exec /sbin/agetty /dev/ttyS1 57600 ansi