8

I'm trying to create a monitoring system for a remote machine using an IPMI Serial Over Lan (SOL) console. The remote OS is RHEL 6, the mobo manufacturer is Supermicro.

I've successfully enabled SOL redirection in the BIOS. This allows me to see the BIOS and kernel parts of bootup through an attached SOL console over IPMI.

Next, I followed the steps mentioned in many online articles to get my OS ( runlevel 3, just text terminal ) to redirect too.

The result is almost always the same : After making the changes to /etc/grub.conf, /etc/inittab, and /etc/securetty, i can see the grub menu through the SOL console (yay!), but as soon as the OS starts booting, my SOL terminal receives 1 gibberish character, and nothing more.

For reference, this is my grub.conf :

serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1
terminal --timeout=5 serial console
timeout=10
default=0

#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu

title Red Hat Enterprise Linux (2.6.32-220.el6.i686)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.32-220.el6.i686 ro \
     root=UUID=5f8c255c-f997-4d6a-9af5-a133fc9229a0 rd_NO_LUKS \
     rhgb crashkernel=auto quiet biosdevname=0 LANG=en_US.UTF-8 rd_NO_MD quiet \
     SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us \
     rd_NO_LVM rd_NO_DM serial console=tty0 console=ttyS1,115200n8
    initrd /boot/initramfs-2.6.32-220.el6.i686.img

I've added the following line to /etc/inittab:

S1:123456:respawn:/sbin/agetty -L ttyS1 115200 vt100

I've appended the following to my /etc/securetty:

ttyS1

I've created /etc/init/ttyS1.conf which looks like:

start on runlevel [345]
stop on runlevel [S016]

respawn
instance /dev/ttyS1
exec /sbin/agetty ttyS1 115200 vt100

Some concessions:

  • I'm not exaclty sure which serial port my BIOS are trying to redirect stuff into (ttyS0, ttyS1). Most of the examples use ttyS1, and since the grub menu gets redirected there, i'm pretty confident thats 'correct'
  • I know the 'terminal types' and baud rates have to match between the BIOS and OS settings. I am consistently using 115200 for baud, but i'm less confident I'm choosing the right terminal type. The terminal type in BIOS is "ANSI", and this gives the coloration i want for the BIOS over SOL. However, for the OS settings, most of the examples use 'linux'; i'm not sure if that's compatible with my ANSI setting. I've tried VT100 for both BIOS and OS, and I still never see anything past the Grub menu (plus, i lose color info for my BIOS over SOL).

Any help is greatly appreciated.

user2870990
  • 81
  • 1
  • 1
  • 2

4 Answers4

3

I faced similar problem with SOL on Supermicro server (SYS-1028R-WTRT). I used a Centos 7 OS. I think this sequence of actions help me decide this problem:

  1. I shutdown all systemd getty services (systemctl stop serial-getty@ttyS0 , ...ttyS1)
  2. Manually run /sbin/agetty -L ttyS1 115200 vt100 (this set of parameters get me a login string on SoL connection)
  3. Kill manually executed agetty.
  4. In file /etc/default/grub set:

    GRUB_CMDLINE_LINUX="console=ttyS1,115200 console=tty0"
    GRUB_TERMINAL=serial
    GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=1 --word=8 --parity=no --stop=1"
    
  5. grub2-mkconfig -o /boot/grub2/grub.cfg

  6. Reboot!

After that steps I get working SoL console.

h0tw1r3
  • 2,746
  • 18
  • 17
Madox
  • 31
  • 3
  • You nailed it, it works on centOS7 – Satish Jul 28 '16 at 21:40
  • 1
    This works for me also. [Some examples](http://www.hiroom2.com/2016/06/07/centos-7-grub2-and-linux-with-serial-console/) add the `console=...` command to `GRUB_CMDLINE_LINUX_DEFAULT` instead of `GRUB_CMDLINE_LINUX`. Any idea what the difference is? – Stefan Lasiewski Sep 22 '16 at 00:12
1

What happens on the console once you type the following as root in a shell?:

initctl start serial DEV=TTYS1 SPEED=115200
faxmodem
  • 251
  • 1
  • 4
1

Try to change your console ordering in console=ttyS1,115200n8 console=tty0

If that does not work, maybe the BIOS/Grub and the kernel have different enumeration of the serial port, leading to different numbering.

In this case, try to change your kernel line in console=ttyS0,115200n8 console=tty0

shodanshok
  • 44,038
  • 6
  • 98
  • 162
0

I've not used the serial console for sometime but I suspect the issue is the:

rhgb quiet

line in your grub.conf.

This enables the red hat graphical boot. That will likely corrupt the terminal.

https://access.redhat.com/site/articles/2938

jeffatrackaid
  • 4,112
  • 18
  • 22
  • Thank you for the suggestion. I removed all references to 'rhgb' and 'quiet' on the grub lines, but my problem still persists. For what its worth, I was not seeing a graphical boot previously because (i believe), i commented out the `splashimage=....` line in my grub.conf. That stopped the RHEL red/white loading bar etc from displaying during boot. – user2870990 Oct 11 '13 at 15:17
  • Try lowering the console speed: console=ttyS0,9600n8 console=tty0 – jeffatrackaid Oct 11 '13 at 15:21
  • Thanks for the suggestion. Unfortunately this just made all the characters in my SOL console gibberish even before the ( what I'm pretty sure was the )Grub screen. Once it got past grub, it stopped getting new characters as previously. – user2870990 Oct 11 '13 at 18:44