# ipmitool on FreeBSD 8.2



## da1 (Jul 28, 2011)

Hi guys,

I have a supermicro rack server that has a 8.2-STABLE. The machine came with an ipmi v2.0 interface (dedicated interface).

The problem I'm having is that from my laptop (8.2-RELEASE amd64), with ipmitools, I cannot use sol (serial-over-lan).

I do:

```
ipmitool -I lanplus -U <id> -P <pass> -H <IP> sol activate
```
in best case scenario, I get

```
2J
   ï¿½ï¿½
```
Worst case scenario, I get nothing (but can issue the help msg (~?)).

I tried setting the "Volatile Bit Rate" and the "Non Volatile Bit Rate" from 115.2 to 57.6 but it didn't help. I also came across this but I have no settings like that in the BIOS. and I also tried the rest of the tutorial ... no luck.

Any ideas ?


----------



## phoenix (Jul 28, 2011)

Did you configure the boot loader, the kernel, and the console driver to enable serial console access?


----------



## minimike (Jul 29, 2011)

You must configure your bootloader 

See more on http://www.freebsd.org/doc/handbook/serialconsole-setup.html
It's not perfect but helpful 

If you boot the Kernel directly with grub instead the FreeBSD Loader (a much better Solution) you may need to compile some settings hard in the Kernel.

IPMI works fine here. FreeBSD Servers and FreeBSD 8.2 as Client on my Laptop


----------



## da1 (Jul 29, 2011)

We have a ZFS setup there. Will play with it on Monday again.


----------



## da1 (Aug 3, 2011)

phoenix said:
			
		

> Did you configure the boot loader, the kernel, and the console driver to enable serial console access?



/boot/loader.conf:

```
# IPMI settings
hint.uart.0.at="isa"
hint.uart.0.baud="38400"
hint.uart.0.port="0x3f8"
hint.uart.0.flags="0x10"
hint.uart.0.irq="4"

hint.uart.1.at="isa"
hint.uart.1.port="0x2f8"
hint.uart.1.flags="0x10"
hint.uart.1.irq="3"

hint.uart.2.at="isa"
hint.uart.2.port="0x3e8"
hint.uart.2.flags="0x10"
hint.uart.2.irq="5"

console="comconsole,vidconsole"         # A comma separated list of console(s)
comconsole_speed="38400"                # Set the current serial console speed
boot_multicons="yes"                    # -D: Use multiple consoles
boot_serial="YES"
```

The kernel is a GENERIC kernel with device puc enabled. 

/etc/ttys (relevant part):

```
ttyu0   "/usr/libexec/getty std.9600"   vt100   off secure
ttyu1   "/usr/libexec/getty std.9600"   vt100   off secure
ttyu2   "/usr/libexec/getty std.9600"   vt100   off secure
ttyu3   "/usr/libexec/getty std.9600"   dialup  off secure
```


----------



## phoenix (Aug 3, 2011)

Did you also rebuild/install a serial-console aware boot block/loader?

Here are the notes I made the last time I configured serial consoles on FreeBSD (accessed via IPMIv2):


> You'll need to configure the OS to use a serial console in order to see anything once the boot loader and kernel take over. The following instructions will get things working on FreeBSD:
> 
> *Note*: FreeBSD 8.0 changed the name of the TTY to use from tty*d** to tty*u** so be sure to use the correct entry in /etc/ttys
> 
> ...


----------



## da1 (Aug 4, 2011)

The only thing which I was reluctant in doing was rebuilding the boot block code. Regardless of that, I did it and my worst nightmare came true -> machine not booting anymore. The BIOS initializes, the 3ware controller too, I get to see the spinning thing ( | / - \ | ) and then it reboots. I have a ZFSonRooT configuration and after rebuilding and installing the boot code, I wrote the boot blocks with 
	
	



```
gpart bootcode -p /boot/gptboot da0
```
Did the same for da1 (second disk).

The interesting thing will be to bring it up again (since it has no optical unit and I have no USB optical unit @ hand).

LE: and .... it seems it cannot boot from USB (great ... wonder how was this machine installed in the first place)


----------



## da1 (Aug 5, 2011)

Got it booting again (external dvd-rom cable was broken ... go figure). I rewrote the gptzfsboot and now it;s booting again .... 

```
gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 $hdd
```

There is some progress though because if I activate the sol, I can see the cursor moving if I type. The downside is that I still have those weird images instead of the actual keys I type.


----------



## Terry_Kennedy (Aug 6, 2011)

da1 said:
			
		

> There is some progress though because if I activate the sol, I can see the cursor moving if I type. The downside is that I still have those weird images instead of the actual keys I type.


Does your Supermicro system have a dedicated IPMI/KVM Ethernet port? The Supermicro X8DTH-iF board that I use has this feature (listed on their web site as "Integrated IPMI 2.0 with Dedicated LAN").

That gives you a web-based remote console which is capable of displaying graphics as well as text.

I prefer it over the IPMI serial console as it requires no change to the FreeBSD configuration to use it, which means that things like the "fixit" disc can be booted and operated via the remote console without any extra config steps. In fact, I haven't configured serial console redirection on this generation of Supermicro boards.

While this may not directly answer your original question, it might provide a useful alternative.


----------



## da1 (Aug 6, 2011)

Terry_Kennedy said:
			
		

> Does your Supermicro system have a dedicated IPMI/KVM Ethernet port? The Supermicro X8DTH-iF board that I use has this feature (listed on their web site as "Integrated IPMI 2.0 with Dedicated LAN").
> 
> That gives you a web-based remote console which is capable of displaying graphics as well as text.
> 
> ...



The server has a dedicated LAN interface and does have a web-interface for remote control but since I have FreeBSD on my laptop, I cannot use it because it's for Windows users only (this is also specified at each remote control option). One way would be to use wine and IE but we would prefer having access to the sh.


----------



## Sebulon (Aug 7, 2011)

Hi,

I have a X7SBE and IPMI 2.0 with dedicated LAN and I can use the web interface and KVMoIP just fine with windows, linux, fbsd and os x, as long as I have java installed.

I too had much troubles getting SOL to work, whereas KVMoIP worked straight away. In fact I got about as far as you did, getting only rubbish printed on SOL-session. Also, my vidconsole printed about one character every three seconds. Tried asking here on the forum, no answers.

/Sebulon


----------



## phoenix (Aug 8, 2011)

da1 said:
			
		

> I do:
> 
> ```
> ipmitool -I lanplus -U <id> -P <pass> -H <IP> sol activate
> ...



You're missing a few options for the ipmitool command.  The following works for me, from a FreeBSD 7.0 client to a FreeBSD 8-STABLE (post 8.2) system, with a SuperMicro H8DGi motherboard:

```
ipmitool -I lanplus -H 192.168.0.78 -U ADMIN -a -o supermicro sol activate
```

Try adding the *-a* and *-o supermicro* options and see if things work better.

The other glitch you have is a mismatch in the console speed as set in /boot/loader.conf and in /etc/ttys.  You need to update the ttys entry to use *std.<comconsole_speed>* (as set in /etc/make.conf and/or /boot/loader.conf).  For example, since you have the console speed set to *38400* in /boot/loader.conf, then you need to use *std.38400* in /etc/ttys.

And, make sure that that matches what's in the BIOS for the IPMI settings.


----------



## phoenix (Aug 8, 2011)

Sebulon said:
			
		

> I have a X7SBE and IPMI 2.0 with dedicated LAN and I can use the web interface and KVMoIP just fine with windows, linux, fbsd and os x, as long as I have java installed.
> 
> I too had much troubles getting SOL to work, whereas KVMoIP worked straight away. In fact I got about as far as you did, getting only rubbish printed on SOL-session. Also, my vidconsole printed about one character every three seconds. Tried asking here on the forum, no answers.



Does it work once the login screen has loaded?  Or at the single-user shell selection prompt?  Or, anytime after the kernel loads?

On our SuperMicro board, the remote KVM redirection works for the BIOS, the SATA controller BIOS, and the loader menu, but all keyboard input stops working once the kernel has loaded.

Conversely, the SoL works for everything (BIOS, SATA BIOS, loader, single-user, multi-user, etc).


----------



## Terry_Kennedy (Aug 9, 2011)

phoenix said:
			
		

> Does it work once the login screen has loaded?  Or at the single-user shell selection prompt?  Or, anytime after the kernel loads?
> 
> On our SuperMicro board, the remote KVM redirection works for the BIOS, the SATA controller BIOS, and the loader menu, but all keyboard input stops working once the kernel has loaded.


Yes. X8DTH-iF, IPMI firmware 2.02, BIOS 2.0c. Also worked on every prior IPMI and BIOS version I've used. Nothing special in the FreeBSD config.


----------



## Sebulon (Aug 9, 2011)

phoenix said:
			
		

> Does it work once the login screen has loaded?  Or at the single-user shell selection prompt?  Or, anytime after the kernel loads?
> 
> On our SuperMicro board, the remote KVM redirection works for the BIOS, the SATA controller BIOS, and the loader menu, but all keyboard input stops working once the kernel has loaded.
> 
> Conversely, the SoL works for everything (BIOS, SATA BIOS, loader, single-user, multi-user, etc).



Wierd coincidence=)

For me, KMVoIP works for BIOS, SATA controller BIOS, loader, kernel, the whole shebang. SOL on the other hand bums out right after kernel and starts printing one character every 3 seconds or so.

But IÂ´ve read that some people rebuild kernel without:

```
device  uhid
device  ums
```
Apparently, SMCÂ´s KVMoIP doesnÂ´t really get along with hid and usb mouse. Could be worth a shot to get the keyboard going, at least.

/Sebulon


----------



## Terry_Kennedy (Aug 9, 2011)

Sebulon said:
			
		

> Apparently, SMCÂ´s KVMoIP doesnÂ´t really get along with hid and usb mouse. Could be worth a shot to get the keyboard going, at least.


I think the KVM *is* those devices:

```
ugen1.2: <American Megatrends Inc.> at usbus1
ukbd0: <Keyboard Interface> on usbus1
kbd2 at ukbd0
ums0: <Mouse Interface> on usbus1
ums0: 3 buttons and [XY] coordinates ID=0
```
(This is from the same system that successfully works with KVM per my screenshot above.)


----------



## da1 (Aug 9, 2011)

phoenix said:
			
		

> You're missing a few options for the ipmitool command.  The following works for me, from a FreeBSD 7.0 client to a FreeBSD 8-STABLE (post 8.2) system, with a SuperMicro H8DGi motherboard:
> 
> ```
> ipmitool -I lanplus -H 192.168.0.78 -U ADMIN -a -o supermicro sol activate
> ...


Works now, but the *-a -o supermicro* makes no difference. There is a glitch however, or bug (or maybe work-as-design ?) because after I issue 
	
	



```
ipmitool -I lanplus -U ADMIN -P xxxxx -H xxxxxxxx (-a -o supermicro) sol activate
```
 the login prompt doesn't appear by itself, I need to hit Enter. A bit unexpected I have to admit.



			
				phoneniz said:
			
		

> The other glitch you have is a mismatch in the console speed as set in /boot/loader.conf and in /etc/ttys.  You need to update the ttys entry to use *std.<comconsole_speed>* (as set in /etc/make.conf and/or /boot/loader.conf).  For example, since you have the console speed set to *38400* in /boot/loader.conf, then you need to use *std.38400* in /etc/ttys.And, make sure that that matches what's in the BIOS for the IPMI settings.


Sorry, my mistake. I forgot to mention that I changed everything to 19200 according to the BIOS setting I "discovered" in the meantime.


----------



## da1 (Aug 9, 2011)

Sebulon said:
			
		

> Hi,
> 
> I have a X7SBE and IPMI 2.0 with dedicated LAN and I can use the web interface and KVMoIP just fine with windows, linux, fbsd and os x, as long as I have java installed.
> 
> ...


I'm using Opera and IcedTea-WEB 1.1 java plugin (with openjdk) and the web-interface SOL works (I have a 2-3 seconds delay but it works) but there is another option called *"Launch the remote console via Java or ActiveX (Internet Explorer only) viewers."* that works only on windows. However, I believe that this option does pretty much the same as the SOL session.


----------



## danbi (Aug 9, 2011)

I too switched all over to KVMoverIP from serial consoles. About the only thing that doesn't work on FreeBSD is the virtual media interface. I found that to work best on Linux, so I just keep an Ubuntu install in VirtualBox for when I need remote install or fixit boot. It sometimes has issues even on Windows. But the virtual console works fine on FreeBSD desktop.
Weird that those people do not standardize on JAVA APIs for virtual media --- every IPMI firmware has different quirks -- one would expect an interface like this, that is needed in emergency to be more compatible.


----------



## phoenix (Aug 9, 2011)

Terry_Kennedy said:
			
		

> I think the KVM *is* those devices:
> 
> ```
> ugen1.2: <American Megatrends Inc.> at usbus1
> ...



Hrm, that might be why it doesn't work on my system, then, as I have disabled USB in the BIOS and removed the USB devices from the kernel.

I'll see about adding those in and testing if that makes a difference.

Yeah, looks like that's it.    Enabling USB in the BIOS/kernel makes the KVM redirector work again.  Wonder how I missed that in the manual ...

Thanks for the tip!


----------



## phoenix (Aug 9, 2011)

Wow!  Who knew? (Well, obviously some in this thread.)  Point the browser at the management IP, login, and voila!  Access to the IPMI chipset on the motherboard, including the KVMoIP, SoL, power control, etc.  Very nice!


----------



## Sebulon (Aug 9, 2011)

phoenix said:
			
		

> Wow!  Who knew? (Well, obviously some in this thread.)  Point the browser at the management IP, login, and voila!  Access to the IPMI chipset on the motherboard, including the KVMoIP, SoL, power control, etc.  Very nice!



Hahaha! For me, the biggest sellingpoint of an SMC MB is this awsome feature, and you had just totally missed it=) That is so funny. Well, I'm very glad you found out about it, it is a feature you would have to pay dearly for in other systems.

/Sebulon


----------



## da1 (Aug 9, 2011)

phoenix said:
			
		

> Wow!  Who knew? (Well, obviously some in this thread.)  Point the browser at the management IP, login, and voila!  Access to the IPMI chipset on the motherboard, including the KVMoIP, SoL, power control, etc.  Very nice!



Unfortunately, for me, some options just don't work (console access and virtual media - both via the web-i). Still, it's nice to have something .

Thx for the hand btw 

SOLVED.


----------



## Terry_Kennedy (Aug 9, 2011)

phoenix said:
			
		

> Wow!  Who knew? (Well, obviously some in this thread.)  Point the browser at the management IP, login, and voila!  Access to the IPMI chipset on the motherboard, including the KVMoIP, SoL, power control, etc.  Very nice!


Yes, there's all sort of cool stuff in there - and, you can monitor it from FreeBSD. From my forthcoming RAIDzilla II web page (which isn't ready yet), I've extracted the section about hardware monitoring.

You can view it here.

The graphs are from a heavily-modified version of ipmimon from the sysutils/freeipmi port. The rest of the data collection is from locally-written scripts. The hardest part was getting the system to report its PMBus data.


----------

