Jan 18 2010

Windows Server Remote Access from HP iLO Console

Published by under Windows

iLO is a management interface supporting SSH, available on HP Proliant servers. It provides interesting features such as remotely powering the server on and off.
HP released access to Windows in graphics mode through a license, surprisingly. However, Microsoft has developed – for Windows 2003 and 2008 server – Emergency Management Services (EMS) that lets you open a command line and run basic tasks such as configuring an IP address or rebooting Windows. This isn’t the best but can be useful in some situations.
 

BIOS

While booting up, press F9 to go in the BIOS Setup
Go in ‘BIOS Serial Console & EMS’ menu
Set ‘BIOS Serial Console Port’ to COM2
Set ‘BIOS Serial Console Baud Rate’ to 115200
Press ESC then F10 to save
Selecting COM1 only redirects the output on to the screen in the slow serial mode fashion.
 

iLO

Press F8 to configure iLO
Set the iLO parameters that suit your network and define users
 

EMS

Edit the boot.ini file to enable EMS: Right click on ‘My Computer’, ‘Properties’, select ‘Advanced’ tab.
Under ‘Startup and Recovery’, click on ‘Settings’, and ‘Edit’ in ‘System Startup’.
Add these 2 lines in the [boot loader] section

redirect=COM2
redirectbaudrate=115200


and /redirect to the end of the partition line.
On my Windows 2003 Server SP2, my boot.ini file looks like this:

[boot loader]
timeout=2
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
redirect=COM2
redirectbaudrate=115200
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003 Standard x64 Edition" \ /noexecute=optout /fastdetect /redirect


The configuration may vary slightly based on the Windows Server you’re running.
 

Notes

F9 or F8 keys have to be switched with ESC+9 and ESC+8. They will lead you to the CLI mode, a command-prompted interface that provides equivalent functionality to the menu-based mode. Check HP for the RBSU user guide.
 
Now, SSH to your iLO IP address, log in and type ‘power on’ to boot the server.
Type in ‘vsp’ to open the virtual console and you’ll get BIOS messages, Windows progress bar, and EMS prompt (SAC>) on the display! Type ‘?’ to list available options.

You can also configure HP iLo console on Linux.

 

No responses yet

Dec 31 2009

Linux Remote Console from HP iLO Interface

Published by under Linux,SSH

iLO is a management interface supporting SSH, available on HP Proliant servers. It provides interesting features such as remotely powering the server on and off.
But it is also possible to access Linux iLO remote console and reboot in single mode from a remote network. How handy is that!?
 

Enable Serial Console in BIOS

While booting up, press F9 to go in the BIOS Setup
Go in ‘BIOS Serial Console & EMS’ menu
Set ‘BIOS Serial Console Port’ to COM2
Set ‘BIOS Serial Console Baud Rate’ to 115200
Press ESC then F10 to save
Selecting COM1 only redirects the output on to the screen in the slow serial mode fashion.
 

Configure iLO

Right after BIOS messages have disappeared, press F8 to configure iLO.
Set the iLO parameters that suit your network and fill in user details.
 

Linux Boot loader

We now need to send kernel messages to the serial interface in Grub, the boot loader. Once Linux installed, edit /boot/grub/menu.lst or /boot/grub/grub.conf
And add the following lines:

# Setup serial (COM2) with baudrate 115200
# Use --unit=0 for COM1
serial --unit=1 --speed=115200
terminal --timeout=5 console serial


And add console=tty0 (screen) console=ttyS1 (ttyS0 for COM1) to the kernel line.
Here is my grub.conf file for instance:

splashimage=(hd0,0)/grub/splash.xpm.gz
serial --unit=1 --speed=115200
terminal --timeout=5 console serial
title Red Hat Enterprise Linux Server (2.6.18-164.el5PAE)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-164.el5PAE ro root=/dev/system/root
        console=tty0 console=ttyS1
        initrd /initrd-2.6.18-164.el5PAE.img


Init Files

This is normally it. On some systems, you may have to add the following line to /etc/inittab to get the login prompt on the console:

s0:12345:respawn:/sbin/agetty -L 115200 ttyS1 vt100

 
Also check ttyS1 is listed in /etc/securetty if you want to log in as root.
Now you should have access to your Linux server through iLO remote console.
 

Notes

F9 or F8 keys have to be switched with ESC+9 and ESC+8. They will lead you to the CLI mode, a command-prompted interface that provides equivalent functionality to the menu-based mode. Check HP for the RBSU user guide.
 
Now, SSH to your iLO IP address, log in and type ‘power on’ to boot the server.
Type in ‘vsp’ to open the virtual console and you’ll get BIOS messages, Grub menu, Linux boot messages including services, and the login prompt on the display!

You can also configure HP iLo console on Windows.

 

2 responses so far

Dec 29 2009

Bash Colored Root Prompt

Published by under Linux

From Linux Suse /etc/bash.bashrc:

# Colored root prompt (see bugzilla #144620)
if test "$UID" -eq 0 -a -t && type -p tput > /dev/null 2>&1 ; then
   _bred="$(tput bold 2> /dev/null; tput setaf 1 2> /dev/null)"
   _sgr0="$(tput sgr0 2> /dev/null)"
   PS1="\[$_bred\]$PS1\[$_sgr0\]"
   unset _bred _sgr0
fi
 

No responses yet

Dec 19 2009

Redhat/Ubuntu/Debian Bridge Interface Startup Scripts

Published by under Linux

All systems need bridge-utils package installed either with yum or apt-get.
 

Redhat / Fedora

Edit each network interface startup file that is going to be added to the bridge

[root@redhat ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:C0:4F:44:41:8A
ONBOOT=yes
BRIDGE=br0

 
And create the bridge configuration file

[root@redhat ~]$ cat /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.100
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=no
ONBOOT=yes


Ubuntu

root@ubuntu:~$ cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

auto br0
iface br0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        pre-up ifconfig eth1 down
        pre-up brctl addbr br0
        pre-up brctl addif br0 eth0
        pre-up brctl addif br0 eth1
        pre-up ifconfig eth0 0.0.0.0
        pre-up ifconfig eth1 0.0.0.0
        post-down ifconfig eth0 down
        post-down ifconfig eth1 down
        post-down ifconfig br0 down
        post-down brctl delif br0 eth0
        post-down brctl delif br0 eth1
        post-down brctl delbr br0


Debian

root@debian:~$ cat /etc/network/interfaces
iface eth0 inet manual

iface eth1 inet manual

 # Bridge setup
 iface br0 inet static
        bridge_ports eth0 eth1
        address 192.168.0.100
        broadcast 192.168.0.255
        netmask 255.255.255.0
        gateway 192.168.0.1
 

No responses yet

Dec 14 2009

A Virtual Cisco Router on your Network

Published by under Cisco,Linux

Dynamips and dynagen let you create a virtual Cisco router on a Linux box. It would be even better if that router was reachable from the LAN, wouldn’t it? Going further, that same router could lead us to another couple of virtual routers running in a lab.
 

Download and Installation

Download dynamips and dynagen from sourceforge.net. Pay attention Dynagen last version 0.11.0 requires Dynamips 0.2.8-RC2.
The 2 programs are provided as rpm packages for Redhat/Fedora.
 
On other Linux systems such as Debian or Ubuntu, Dynagen is provided as an archive you can extract and from which dynagen can be linked from a bin directory of yours. As for Dynamips, it needs to be taken out from the rpm. You can also download it from netexpertise.eu.
You may get an error while running dynamips:

[root@cisco_host]$ dynamips -h
dynamips: error while loading shared libraries:
libpcap.so.0.9: cannot open shared object file: No such file or directory

[root@cisco_host]$ ln -s /usr/lib/libpcap.so.0.9.8 /usr/lib/libpcap.so.0.9

 
A symbolic link should sort things out.
 

Install Network Utilities

The 2 following tools are needed:
– brctl from bridge-utils package (on all Linux flavours) – to create a bridge
– tunctl from rpmfind for Redhat/Fedora and uml-utilities for Debian/Ubuntu – to create a tap interface. This isn’t absolutely needed since dynagen can create a tap interface on its own but is definately handy.
 

Create Bridge and Connect to the Network

Bridge br0 will be made up of the eth1 interface connected to the LAN and tap0 linked to the Cisco router. 192.168.0.100 is the Linux box IP.

[root@cisco_host]$ brctl addbr br0
[root@cisco_host]$ ifconfig br0 up
[root@cisco_host]$ ifconfig eth1 0.0.0.0
[root@cisco_host]$ brctl addif br0 eth1
[root@cisco_host]$ ifconfig br0 192.168.0.100 netmask 255.255.255.0 up


Virtual Cisco Router Configuration File

Create the following Dynagen configuration file. You will need to copy your own Cisco image on your server as this is proprietary indeed. This is where we map the Cisco f0/0 interface to tap0.

[localhost]
workingdir = /tmp

    [[ 7200 ]]
    image = /root/c7200-js-mz.124-3.bin
    ram = 128
    idlepc = 0x6082c30c

    [[ router R1 ]]
    console = 2001
    f0/0 = NIO_tap:tap0

 
I suggest you check dynagen tutorial to find out what’s your your best idlepc value so you do not get your CPU load rise to 100%. We can then launch Dynamips hypervisor and Dynagen to run the virtual router.

[root@cisco_host]$ dynamips -H 7200&
[1] 2347
[root@cisco_host]$ Cisco Router Simulation Platform (version 0.2.8-RC2-x86)
Copyright (c) 2005-2007 Christophe Fillot.
Build date: Apr 20 2008 12:25:53
Hypervisor TCP control server started (port 7200).

[root@cisco_host]$ dynagen router.net
Reading configuration file...

Shutdown in progress...
Shutdown completed.
Network successfully loaded

Dynagen management console for Dynamips and Pemuwrapper 0.11.0
Copyright (c) 2005-2007 Greg Anuzelli, contributions Pavel Skovajsa

=>


Adding the Cisco Router to the Bridge

tap0 has now been created by Dynagen and can now be brought up and added to the bridge.

[root@cisco_host]$ brctl addif br0 tap0
[root@cisco_host]$ ifconfig tap0 up


Connect to the Router

Connect on the router with telnet on port 2001 – as set in the configuration file earlier – and experience the console as if you were on a real Cisco router IOS.

[root@cisco_host]$ telnet localhost 2001
router>enable
router#show interface summary

 *: interface is up
 IHQ: pkts in input hold queue     IQD: pkts dropped from input queue
 OHQ: pkts in output hold queue    OQD: pkts dropped from output queue
 RXBS: rx rate (bits/sec)          RXPS: rx rate (pkts/sec)
 TXBS: tx rate (bits/sec)          TXPS: tx rate (pkts/sec)
 TRTL: throttle count

  Interface              IHQ   IQD  OHQ   OQD  RXBS RXPS  TXBS TXPS TRTL
------------------------------------------------------------------------
* FastEthernet0/0          0     0    0     0     0    0     0    0    0
  FastEthernet0/1          0     0    0     0     0    0     0    0    0
NOTE:No separate counters are maintained for subinterfaces
     Hence Details of subinterface are not shown

router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
router(config)#int fa0/0
router(config-if)#ip address 192.168.0.101 255.255.255.0
router(config-if)#no shutdown
router(config-if)#end
router#

router#ping 192.168.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/16 ms
router#ping 192.168.0.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.100, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 4/20/36 ms

 
192.168.0.1 being the gateway or a device on the LAN.
You can now virtualize as many Cisco routers as you wish, within the limits of your machine’s resources.

 

One response so far

« Prev - Next »