Skip to content

Instantly share code, notes, and snippets.

@joshenders
Last active September 2, 2023 08:00
Show Gist options
  • Save joshenders/9065698 to your computer and use it in GitHub Desktop.
Save joshenders/9065698 to your computer and use it in GitHub Desktop.
How to setup an N40L Remote Access Card (BMC/IPMI) under Debian Wheezy

Update BMC Firmware

As of this writing (2014-02-18), the latest firmware is 1.3. It can be updated from the webif. Use Safari, the credentials are admin/password. If you're trying to find it on your network, the OUI of the BMC NIC is a0:b3:cc.

Install Utilities

apt-get install openipmi ipmitool

Create /etc/modprobe.d/ipmi_si.conf

SMBIOS incorrectly exports the IO mapped Keyboard Control Style (KCS) interface at address 0xca8 instead of 0xca2. This causes the ipmi_si kernel module to fail to load. Fortunatly we can override the auto-detection with module options. See modinfo ipmi_si for available options. The correct address was found in the IPMI Messaging Interfaces section in the PDF Manual for the N40L

As seen in dmesg:

[129467.147569] ipmi_si: probing via SMBIOS
[129467.147578] ipmi_si: SMBIOS: io 0xca8 regsize 1 spacing 1 irq 0
[129467.147585] ipmi_si: Adding SMBIOS-specified kcs state machine
[129467.147595] ipmi_si: probing via SPMI
[129467.147601] ipmi_si: SPMI: mem 0x0 regsize 1 spacing 1 irq 0
[129467.147607] ipmi_si: Adding SPMI-specified smic state machine
[129467.147616] ipmi_si: Trying SMBIOS-specified kcs state machine at i/o address 0xca8, slave address 0x20, irq 0
[129467.147632] ipmi_si: Interface detection failed
[129467.160166] ipmi_si: Trying SPMI-specified smic state machine at mem address 0x0, slave address 0x0, irq 0
[129467.160178] ipmi_si: Could not set up I/O space
dmidecode --type 38
# dmidecode 2.11
 SMBIOS 2.6 present.
 
 Handle 0x001B, DMI type 38, 18 bytes
 IPMI Device Information
 	Interface Type: KCS (Keyboard Control Style)
 	Specification Version: 1.5
 	I2C Slave Address: 0x10
	NV Storage Device: Not Present
	Base Address: 0x0000000000000CA8 (I/O)
	Register Spacing: Successive Byte Boundaries

Override the KCS address in /etc/modprobe.d/ipmi_si.conf

options ipmi_si type=kcs ports=0xca2

Update /etc/modules

Features are broken out into modules. Unused features can be disabled. ipmi_msghandler, ipmi_devintf, ipmi_si are a bare minimum configuration. Docs are vague regarding the neccessity of ipmi_poweroff for power commands.

# http://openipmi.sourceforge.net/IPMI.txt
ipmi_msghandler
ipmi_devintf
ipmi_si
#ipmi_smb
#ipmi_watchdog
ipmi_poweroff

Load Kernel Modules

for module in ipmi_msghandler ipmi_devintf ipmi_si ipmi_poweroff; do
    modprobe $module
done

As seen in dmesg:

[151913.764669] ipmi message handler version 39.2
[151913.770104] IPMI System Interface driver.
[151913.770760] ipmi_si: probing via hardcoded address
[151913.770768] ipmi_si: Adding hardcoded-specified kcs state machine
[151913.770775] ipmi_si: Trying hardcoded-specified kcs state machine at i/o address 0xca2, slave address 0x0, irq 0
[151913.949213] ipmi_si ipmi_si.0: Found new BMC (man_id: 0x000001, prod_id: 0x3431, dev_id: 0x20)
[151913.949240] ipmi_si ipmi_si.0: IPMI kcs interface initialized

Enable and Restart ipmievd

Enable the IPMI event daemon for sending events to syslog

sed -i -e 's/ENABLED=false/ENABLED=true/g' /etc/default/ipmievd

Restart ipmievd

/etc/init.d/ipmievd restart

Test

Locally:

ipmitool lan print

Remotely:

ipmitool -I lanplus -U admin -P password -H [BMC IP] lan print

BMC Configuration

The Hetzner IPMI guide is pretty thorough.

References

@endreszabo
Copy link

Thank you for this insightful post.

@lyrz
Copy link

lyrz commented Feb 6, 2018

I have now a usable second hand remote access card (which admin account was not the default one).
Ipmitool worked ok when using the correct IO address and I finally managed to reset the card to factory defaults :-)
Thanks for the info !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment