IPMI中sol的使用
http://blog.chinaunix.net/uid-1838361-id-3134038.html
SOL需要IPMI2.0支持,使用lanplus進行遠程連接。
SOL需要IPMI2.0支持,使用lanplus進行遠程連接。
7.1 Serial Over LAN (SOL) 功能非常有用。SOL 通過 IPMI 會話重定向本地串行接口,允許遠程訪問 Windows 的緊急事件管理控制台 (EMS) 特殊管理控制台 (SAC),或訪問 LINUX 串行控制台。
- ipmitool sol set enabled true 1
- ipmitool sol set payload enable 1 3
關於設置波特率:
ipmitool sol set non-volatile-bit-rate 115.2
報錯:
Error setting SOL parameter 'volatile-bit-rate' to '115.2': Parameter out of range
設置為57.6。
如果通過OMSA的web界面配置,可以看到,最高為57600,而不是115200
查看:
- ipmitool sol info 1
7.2
要使用SOL查看BIOS輸出,需要在BIOS里將BIOS的信息重定向到串口COM2
Serial Communications
Serial Communications: On with Console Redirection via COM2
Conole Redirection After Boot: Enable
External Serial Connector: Com2
如果安裝了OMSAm,也可以使用命令行來修改:
/opt/dell/srvadmin/sbin/omconfig chassis biossetup -?
/opt/dell/srvadmin/sbin/omconfig chassis biossetup attribute=serialcom setting=com2
如果安裝了OMSAm,也可以使用命令行來修改:
/opt/dell/srvadmin/sbin/omconfig chassis biossetup -?
/opt/dell/srvadmin/sbin/omconfig chassis biossetup attribute=serialcom setting=com2
7.3
如果要通過SOL查看linux的控制台,還需要重定向kernel的輸出:
Note the choices here for COM port number must match the entry you made in the Firmware Setup section: use ttyS0 for COM1; and ttyS1 for COM2.
注意:ttyS0 對應COM1口,ttyS1對應COM2口,注意選擇
注意:ttyS0 對應COM1口,ttyS1對應COM2口,注意選擇
7.3.1 /etc/inittab添加以下兩行:
- S0:2345:respawn:/sbin/agetty -h -L 57600 ttyS0 vt100
- S1:2345:respawn:/sbin/agetty -h -L 57600 ttyS1 vt100
7.3.2 grub.conf,在kernel的options后面添加參數:
- kernel ...options... console=tty0 console=ttyS1,57600
需要注意:
如果使用sed修改,不要sed /etc/grub.conf,該文件是個軟連接,sed -i會造成該文件變成普通文件,而真正需要修改的grub.conf卻沒有修改。
#注掉splashimage 圖形顯示行,否則在字符模式下無法顯示菜單
#splashimage=(hd0,0)/grub/splash.xpm.gz
7.3.3 /etc/securetty
增加:
- ttyS0
- ttyS1
如果使用kickstart安裝系統,可以加 %post 段,系統安裝后自動執行:
- echo "S0:2345:respawn:/sbin/agetty -h -L 57600 ttyS0 vt100" >>/etc/inittab
- echo "S1:2345:respawn:/sbin/agetty -h -L 57600 ttyS1 vt100" >>/etc/inittab
- echo "ttyS0" >>/etc/securetty
- echo "ttyS1" >>/etc/securetty
- sed -i '/kernel.*root=.*quiet.*/s/$/ console=tty0 console=ttyS1,57600/g' /boot/grub/grub.conf
1) Paste the following into /etc/init/ttyS1.conf
# ttyS1 - getty
#
# This service maintains a getty on ttyS1 from the point the system is
# started until it is shut down again.
start on stopped rc or RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -L 57600 ttyS1 vt100
2) Ask upstart to start the getty
sudo start ttyS1
This will get you access to console. To get access to Linux init console, configure grub.
1) Edit /etc/default/grub to contain the following lines
注意,上面有一條GRUB_CMDLINE_LINUX=""不需要注釋掉
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS1,57600"
GRUB_TERMINAL=serial
#GRUB_SERIAL_COMMAND="serial --speed=57600 --unit=1 --word=8 --parity=no --stop=1"
GRUB_SERIAL_COMMAND="serial --speed=57600 --unit=1 "
2) update grub
sudo update-grub