Serial console and IPMI setup for Linux

Update: fixed grub configuration directives

Supermicro has IPMI client software and web interface but they are a bit oldish and may not work in every environment so I decided to be able to use standard repository tool “ipmitool” to be able to access my Supermicro boxes.

I am using Almalinux 8 in this case which is identical to RHEL 8 / CentOS 8 / Cloudlinux / Oracle Linux or other RHEL derivative. But your distro should not have much of a difference here as we “go to the source” a bit here. This kind of stuff was done more back in the days.

To be able to remote control your Supermicros with text console you must have your BIOS serial redirection, set up your Linux for serial console and install an IPMI tool from repository. This is a quick cheat sheet on this subject.

Set IPMI base configuration with web access using your web browser. Set IP address, create users and set rights. Can do it from command line as well using ipmitool or equivalent but I did not write down the commands. It was easy with a little Googling though.

You can set IP address from BIOS and admin password with command line Supermicro ipmicfg tool with command:

./IPMICFG-Linux.x86_64 -user setpwd 2 <password>

Supermicro seems to have a default setting of ttyS1 console redirection and 115200 baud speed. Lets keep that.

Enable Linux serial console with following steps. Below setup will allow you to see kernel boot messages in serial console.

  • stty -F /dev/ttyS1 speed 115200
  • vim /etc/sysconfig/grub
    • add GRUBCMDLINELINUX so that it includes “console=tty0 console=ttyS1,115200n8”
  • grub2-mkconfig -o /boot/grub2/grub.cfg
  • vim /usr/lib/systemd/system/serial-getty\@.service and modify ExecStart like this:
    • ExecStart=-/sbin/agetty 115200 %I $TERM
  • systemctl enable serial-getty@ttyS1
  • reboot

Install ipmitool with “dnf in ipmitool”, “zypper in ipmitool” or “apt-get install ipmitool”

Connect to your Supermicro IPMI console with command:

ipmitool -I lanplus -H <ip address> -U <username> sol activate

And that should do it. At least did it for me. Now you should be able to see not only Linux console but also BIOS and other hardware setups so it should be good with crash situations as well.

ISO image mounting can be used for installing OS or other software. This can be done in Supermicro SMCIPMITool shell with vmwa command.

./SMCIPMITool <ipaddr> <user> <password> shell
vmwa dev2iso /path/to/image.iso

And unmounted in the shell.

vmwa dev2stop

There also seems to be a script made by David Wittman. I did not try this yet but here is the link to his github project.

Please leave a comment if you have additional information.

All comments and corrections are welcome.

  • tips_and_howtos/serial_console.txt
  • Last modified: 2022/09/15 09:03
  • by