加载中…
个人资料
走向希望
走向希望
  • 博客等级:
  • 博客积分:0
  • 博客访问:5,462
  • 关注人气:55
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

[转载]SOL 浅析

(2014-12-22 17:00:15)
标签:

转载

原文地址:SOL 浅析作者:追求存在

Enable and configure Linux serial console

In order to use serial console you need to configure GRUB boot loader. Following instructions are tested on :
[1] Cent OS 4/5
[2] Redhat Enterprise Linux (RHEL) 3/4/5
[3] Debian 3/4

Step # 1: Serial redirection in the GRUB

Open grub configuration file

/boot/grub/grub.conf(Redhat/CentOS/Fedora Core Linux).

/boot/grub/menu.lst (Debian / Ubuntu Linux) 


# vi /boot/grub/grub.conf
add the following lines below "hiddenmenu" option:

serial --unit=3 --speed=115200

terminal --timeout=8 console serial

  • The first line tells GRUB to use the third serial port (com 3) at a baud rate of 115200
  • The second line gives the user 9 seconds to decide where GRUB should output it's information.

Next make sure splashimage options is disabled as graphics can't be displayed across the serial port. Remove splashimage line or just comment it out by prefixing # symbol:
#splashimage=(hd0,0)/grub/splash.xpm.gz

Step # 2: Enabling serial output from the Linux kernel

Find the kernel line (grub config file) which corresponds to your currently running kernel. Add the following at the end of that line - console=tty0 console=ttyS2,115200n8 (tty0 for local VGA, ttyS2 for the third serial port), When multiple console= options are listed, the Linux kernel will output (tty0, ttyS2) to both when possible. Now the kernel errors get logged with on both the normal VGA console and on the serial console.

title Red Hat Enterprise Linux ES (2.6.9-42.0.10.ELsmp)

        root (hd0,0)

        kernel /vmlinuz-2.6.9-42.0.10.ELsmp ro root=LABEL=/ console=tty0 console=ttyS2,115200n8

        initrd /initrd-2.6.9-42.0.10.ELsmp.img

Save and close the file.

Now reboot your system. Next you need to connect to the serial console using IPMI Java client or IPMIView Linux client. Next you should see the following message on screen:
Press any key to continue.
Now hit any key to launch GRUB on the serial console. Please note that if you do nothing, it will open server's VGA console.

SOL是什么?

SOLSerial Over Lan)顾名思义,就是通过网络访问的串口,我们知道到普通串口的线长最大到15米,而且需要一对一直接连接,有很大的局限性,而很多服务器电脑都是运行着UNIX/LINUX,几乎所有的管理都可以通过串口命令行实现,SOL由此应运而生,我们只需要一个IP就可以在世界的任意个角落管理我们的电脑。

SOL的实现

硬件上是通过一个LPC连接的BMCBoard Manager Controller)芯片,BMC芯片有一个Serial Port(实际上这个Serial Port只有硬件寄存器,并没有任何的输入输出pin没办法做回环测试),同时有一个Ethernet Controller,数据通讯就是通过CPU—LPC--Serial Port--Ethernet—IP完成。

软件上,服务器本地系统里我们可以看到有一个,软件编程和其他不做SOL功能的串口没有任何区别,通过IP打开SOL客户端时候,BMC里的SOL服务程序才会捕捉Serial Port的寄存器数据通过网络SOL终端输出,同时也会把SOL终端的输入数据输入到Serial Port

SOL问题:

SOLIP终端无法输入输出可能有那些原因,如何排查?

我觉得首先要看服务器端WINDOWS的设备管理里是否看到这个SOL串口,

如果看不到是BIOS ACPI代码的问题;

如果看到却有黄叹号,说明是IO地址的问题,我们要先排除LPC线路连接问题,我们可以通过访问BMCLPC寄存器是否有问题,如果有问题,说明LPCBMC确实存在问题,可能是LPC线路或BMC边硬件问题。如果没有问题,说明LPC通路是好的,继续查看SOL Serial PortIO地址是多少,在PCH里有没有decode(我们就有碰过没有解码导致的问题)?如有解码,可能是BMC边硬件问题。

如果看到且没有黄叹号,可能是中断IRQ的问题(我们有碰过BMCLPC里没有给Serial Port分配IRQ问题,但当时的现象是,BIOS Console Redirect功能是OK, Windows 里的超级终端无法收发数据,说明Windows里的通讯会用中断),也可能是BMC里的硬件或FW问题。

 

0

  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有