IPMI SOL setup in Ubuntu Linux

Pre-request:

Server has IPMI SOL feature.


Client setup:

sudo aptitude install ipmitool
Server setup:

Enter BIOS setup, enable console redirect, SOL, and set serial connection parameters.

In Ubuntu Linux, patch this diff

diff --git a/default/grub b/default/grub
index fb1461c..9ed26bc 100644
--- a/default/grub
+++ b/default/grub
@@ -8,8 +8,8 @@ GRUB_HIDDEN_TIMEOUT=0
 GRUB_HIDDEN_TIMEOUT_QUIET=true
 GRUB_TIMEOUT=10
 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
-GRUB_CMDLINE_LINUX_DEFAULT="quiet splash crashkernel=384M-:128M"
-GRUB_CMDLINE_LINUX=""
+GRUB_CMDLINE_LINUX_DEFAULT="quiet"
+GRUB_CMDLINE_LINUX="console=tty0 console=ttyS1,115200n8"
 
 # Uncomment to enable BadRAM filtering, modify to suit your needs
 # This works with Linux (no patch required) and with any kernel that obtains
@@ -18,6 +18,8 @@ GRUB_CMDLINE_LINUX=""
 
 # Uncomment to disable graphical terminal (grub-pc only)
 #GRUB_TERMINAL=console
+GRUB_TERMINAL="serial console"
+GRUB_SERIAL_COMMAND="serial --unit=1 --speed=115200 --word=8 --parity=even --stop=1"
 
 # The resolution used on graphical terminal
 # note that you can use only modes which your graphic card supports via VBE
diff --git a/init/ttyS1.conf b/init/ttyS1.conf
new file mode 100644
index 0000000..765fa9c
--- /dev/null
+++ b/init/ttyS1.conf
@@ -0,0 +1,10 @@
+# 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=[12345]
+stop on runlevel [!12345]
+
+respawn
+exec /sbin/getty -L 115200 ttyS1 vt100

Connect In one terminal:

ipmitool -I lanplus -H HostName -U Username -P Password sol activate
Then reboot in another terminal:

ipmitool -H HostName -U Username -P Password power cycle
Then we shall see the system boot info in the first terminal, and get a login shell.


Reference:

https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html

https://www.gnu.org/software/grub/manual/html_node/serial.html#serial

https://help.ubuntu.com/community/SerialConsoleHowto


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值