In the message dated: Mon, 10 Dec 2012 18:54:03 PST,
The pithy ruminations from Jo Rhett on
<Re: [lopsa-discuss] IP KVM and PDU Recommendations> were:
=> On Dec 10, 2012, at 1:01 PM, [email protected] wrote:
=> > All the DRACs that we've got (version 4 through iDRAC6) support IPMI
=> > with serial redirection, so once that's configured (we do it through
=> > recipies run at the first boot after kickstarting), we can manage machines
=> > strictly through IPMI and serial console commands--so management access is
=> > the same for our Dell and SuperMicro and other boxes from that point on.
=>
=>
=> Hey, that's a project on my back plate I'd love some pointers on. I tried to
get the Dell Repo f
=> or software utilities and it's larger than CentOS and wants to install half
the world. I haven't
=> gotten back to figure out how to get a minimal installation out of it. Can
I throw beer at you
=> for pointers on that?
Pour the virtual beer into /dev/pipe...
=>
=> Basically we just want the DRAC utilities and the RAID card software, but
access to things like
=> hardware temp sensors would be nice too. Feel free to reply directly, or
keep it on list if you
=> want to share with everyone.
Sure.
I use the Dell Repo (yes, it wants to install "too much", and the OpenIPMI
package from Dell has weirdo version numbering which makes YUM think
that it's newer than the distro OpenIPMI) and install the packages:
dell-repo-tools
dell_ft_install
dkms
firmware-addon-dell
srvadmin-base
srvadmin-rac4
srvadmin-rac5
Once the packages are installed, I do the following in the %post stage
of the kickstart process (much of this stolen & combined from a variety
of unattributed blog, web, and mailing list posts):
-----------------------------------------------
GRUB=/boot/grub/grub.conf
INITTAB=/etc/inittab
SECURETTY=/etc/securetty
# start services for DRAC
/opt/dell/srvadmin/sbin/srvadmin-services.sh start
# Configure the DRAC to do serial redirection
/opt/dell/srvadmin/bin/omconfig chassis biossetup attribute=crab
setting=enabled
/opt/dell/srvadmin/bin/omconfig chassis biossetup attribute=extserial
setting=rad
/opt/dell/srvadmin/bin/omconfig chassis biossetup attribute=fbr
setting=115200
/opt/dell/srvadmin/bin/omconfig chassis biossetup attribute=serialcom
setting=com2
/opt/dell/srvadmin/sbin/racadm config -g cfgIpmiLan -o cfgIpmiLanEnable
1
/opt/dell/srvadmin/sbin/racadm config -g cfgIpmiSol -o cfgIpmiSolEnable
1
/opt/dell/srvadmin/sbin/racadm config -g cfgLanNetworking -o
cfgDNSRacName `hostname -s`-drac
/opt/dell/srvadmin/sbin/racadm config -g cfgSerial -o
cfgSerialTelnetEnable 1
/opt/dell/srvadmin/sbin/racadm config -g cfgUserAdmin -o
cfgUserAdminPassword -i 2 Your_DRAC_Password_Goes_Here
/opt/dell/srvadmin/sbin/racadm config -g cfgSerial -o cfgSerialBaudRate
115200
/opt/dell/srvadmin/sbin/racadm config -g cfgSerial -o
cfgSerialConsoleEnable 1
/opt/dell/srvadmin/sbin/racadm config -g cfgSerial -o
cfgSerialHistorySize 2000
/opt/dell/srvadmin/sbin/racadm config -g cfgSerial -o
cfgSerialSshEnable 1
# Edit /boot/grub/grub.conf to enable two things:
# 1- grub interaction
# 2- kernel messages and rc script output.
# Sanity check[s]...don't change grub.conf if it already has the needed
lines
linesneeded=0
grep -q "^#splashimage" $GRUB
linesneeded=$((linesneeded + $?))
grep -q "^serial " $GRUB
linesneeded=$((linesneeded + $?))
grep -q "^terminal .* serial" $GRUB
linesneeded=$((linesneeded + $?))
grep -q "kernel /boot/vmlinuz.*console=" $GRUB
linesneeded=$((linesneeded + $?))
if [ $linesneeded != 4 ] ; then
# at least one of the changes to $GRUB is already present...do
nothing
$GRUB already contains some of the necessary changes.
else
cp $GRUB ${GRUB}.backup
# add a "serial" and "terminal" line to the grub.conf
# and comment out the splashimage
# add the console directives to each kernel line
sed -i -e 's/^splashimage/serial --unit=1 --speed=115200\
terminal --timeout=5 serial console\
#splashimage/' -e "s/\(kernel .boot.vmlinuz.*\)/\1 console=tty0
console=ttyS1,115200/" $GRUB
fi
echo "----------------add a agetty line in the /etc/inittab to redirect
the serial console" | tee /dev/console
grep -q "CONS:2345:respawn.*ttyS1 vt100" $INITTAB
if [ $? = 0 ] ; then
echo "agetty for ttyS1 already exists in $INITTAB"
else
echo "CONS:2345:respawn:/sbin/agetty -i -h -L 115200 ttyS1
vt100" >> $INITTAB
# no need to restart init, as these changes are being made
during kickstart and
# the machine will restart soon.
fi
echo "----------------add root to /etc/securetty" | tee /dev/console
# To allow root login access to the new console, you will need to add
'ttyS1' to
# /etc/securetty (if it's not already there).
grep -q '^ttyS1$' $SECURETTY
if [ $? = 0 ] ; then
echo "Entry for ttyS1 already exists in $SECURETTY"
else
echo "ttyS1" >> $SECURETTY
fi
-----------------------------------------------
Yes, many of those tests could be eliminated, assuming that the machine
is being kickstarted....the sanity checks originated from a script that
applied the changes post-kickstart, and I thought they were worth leaving.
Depending on the generation of the server and type of DRAC, the commands
will vary (syscfg vs racadm vs iradadm).
After this is all setup, you get serial console access via:
local_machine % ssh ${servername}-drac
/admin1-> [DRAC prompt]
/admin1-> console com2 ['serial' connection to
com2]
${servername} login:
to disconnect:
^\ [send CTRL-BACKSLASH to the serial connection]
/admin1-> [back to the DRAC]
/admin1-> exit
Mark
=>
=> --
=> Jo Rhett
=> Net Consonance : net philanthropy to improve open source and internet
projects.
=>
=>
=>
=>
_______________________________________________
Discuss mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
http://lopsa.org/