• HEADS UP, Solaris 11-22-2011 Comments Off

    A kernel patch caused the machine to panic, leaving it in a confused state. I was able to boot from a CD and back out the patch, but it did not update the boot archive, even after issuing
    /sbin/bootadm update-archive -R /a

    to fix:

    Boot into the disk failsafe, then run:

    /a/boot/solaris/bin/create_ramdisk -R /a

  • HEADS UP, Solaris 11-17-2011 Comments Off

    ksh -o vi
    export TERM=vt100
    /usr/openwin/bin/resize
    or, If booted from CD or in failsafe:
    /a/usr/openwin/bin/resize

  • Solaris 06-16-2011 Comments Off

    Problem: not able to connect to the console

    -> start /CH/BL1/SP/cli
    Are you sure you want to start /CH/BL1/SP/cli (y/n)? y

    …just hangs indefinitely

    Solution: We need to reset the serial port to the blade.

    -> reset /CH/BL1/SP
    Are you sure you want to reset /CH/BL1/SP (y/n)? y
    Performing hard reset on /CH/BL1/SP

    -> start cli
    Are you sure you want to start /CH/BL1/SP/cli (y/n)? y

    … connects successfully to the console now.

  • HEADS UP, Solaris 02-22-2011 Comments Off

    connecting to sun blades

    start /CH/blade/SP/cli
    start SP/console

  • HEADS UP, Solaris 02-16-2011 Comments Off
    for i in `ndd -get /dev/${DEV} \? | awk '{print $1}'| grep ^[a-z]`;
    do
    echo -n "$i:"; ndd -get /dev/${DEV} $i;
    done
    
  • HEADS UP, Linux, Solaris 02-05-2011 Comments Off

    The problem is that the ssh session will wait for the command to complete and the ‘&’ to background the task does not seem to work. The net result is that the script running the nohup ssh command hangs.

    This is because by default ssh does not allocate a TTY to run a command. You can force TTY allocation by using the ‘-t’ option to ssh, which will permit backgrounding, and the ssh command will return immediately.

    In order to demonstrate, create a file /tmp/sleepy like so:

    #!/bin/bash
    while ( true ); do
    echo `date` “sleep”
    sleep 1
    done

    This command will invoke the script over ssh using nohup and &:

    ssh -t localhost ‘nohup /tmp/sleepy &’

    Tags: , ,

  • HEADS UP, Solaris 02-02-2011 Comments Off

    passwd -f <login>

  • Solaris 12-22-2010 Comments Off
    XSCF> showdcl -v -a
    DID   LSB   XSB   Status   No-Mem   No-IO    Float    Cfg-policy
    00                Running                             FRU
          00    00-0           False    False    False
          01    -
          02    -
          03    -
          04    -
          05    -
          06    -
          07    -
          08    -
          09    -
          10    -
          11    -
          12    -
          13    -
          14    -
          15    -
    XSCF> console -d 00 -f
    Connect to DomainID 0?[y|n] :y
    
  • Big Brother, Monitoring, Solaris 11-23-2010 Comments Off
    #!/bin/sh
    
    # ext-proto
    #
    # BIG BROTHER - PROTOTYPE EXTERNAL SCRIPT
    # Sean MacGuire
    # Version 1.9
    # Mar 13th, 2002
    #
    # (c) Copyright Quest Software, Inc.  1997-2002  All rights reserved.
    #
    # Adapted to test RAID on Sun boxes (either raidctl or metastat or both)
    # parmanand patram
    # Nov 23rd 2010.
    
    #
    # SCRIPTS IN THE BBHOME/ext DIRECTORY ARE ONLY RUN IF
    # THEY ARE DEFINED IN THE ENTRY FOR THE CURRENT HOST
    # LISTED IN THE ext/bb-bbexttab FILE.
    #
    
    ################################### SETUP #############################
    #
    # root must run a crontab like every 5 minutes to provide raidctl output
    # 0,15,30,45 * * * * for VOLUME in `/usr/sbin/raidctl -l| grep Volume: | awk -F':' '{print $2}'`; do /usr/sbin/raidctl -l $VOLUME > /tmp/raidctl_${VOLUME}_txt; done >/dev/null 2>&1
    #
    # Additional setup is as 'normal' bb extension test.
    
    #
    # BBPROG SHOULD JUST CONTAIN THE NAME OF THIS FILE
    # USEFUL WHEN YOU GET ENVIRONMENT DUMPS TO LOCATE
    # THE OFFENDING SCRIPT...
    #
    BBTEST="RAID"
    BBPROG=$0; export BBPROG
    
    #
    # BBHOME CAN BE SET MANUALLY WHEN TESTING.
    # OTHERWISE IT SHOULD BE SET FROM THE BB ENVIRONMENT
    #
    # BBHOME=/home/sean/bb; export BBHOME   # FOR TESTING
    
    if test "$BBHOME" = ""
    then
            echo "BBHOME is not set... exiting"
            exit 1
    fi
    
    if test ! "$BBTMP"                      # GET DEFINITIONS IF NEEDED
    then
             # echo "*** LOADING BBDEF ***"
            . $BBHOME/etc/bbdef.sh          # INCLUDE STANDARD DEFINITIONS
    fi
    
    #
    # NOW COLLECT SOME DATA
    # IN THIS CASE, IT'S THE STATUS OF THE RAID CHECKED BY raidctl AND metastat
    # FOR MONTREAL, QUEBEC
    
    # SELECT SOME LEVELS... GREEN IS THE DEFAULT...
    
    WARN='undef'       # this test will never have a warning. RAID is either OK or not OK.
    PANIC='yes'      # GO RED AND PAGE if FAILURE is set to 'yes'
    
    # zero out the output file
    cat /dev/null > $BBTMP/$BBTEST
    
    # perform the raidctl tests
    COLOR="green"
    
    # IMPORTANT: user bb cannot run raidctl, so root must run a cron script to dump out
    # raidctl info for each volume into /tmp/raidctl_VOLUME_txt
    
    for VOLUME_FILE in `ls /tmp/raidctl_c*t*d*_txt`; do
    
            VOLUME=`echo $VOLUME_FILE | awk -F'_' '{print $2}'`
            TEST=`cat $VOLUME_FILE | egrep -v '^c|^Volume|Sub|Disk|-' | grep -v GOOD`
            if [ "$TEST" = '' ]; then      #disk is 'GOOD'
                    echo "OK for RAID volume $VOLUME" >> /$BBTMP/$BBTEST
                    cat $VOLUME_FILE >> /$BBTMP/$BBTEST
                    echo "-----------------------------------------" >> /$BBTMP/$BBTEST
            else    # disk has problems
                    COLOR="red"
                    echo "FAILURE on RAID volume $VOLUME" >> /$BBTMP/$BBTEST
                    cat $VOLUME_FILE >> /$BBTMP/$BBTEST
                    echo "-------------> ${TEST} <-----------------" >> /$BBTMP/$BBTEST
            fi
    done
    
    # perform the metastat tests
    for MIRROR in `/sbin/metastat | grep Mirror | awk -F':' '{print $1}'`; do
            TEST=`/sbin/metastat $MIRROR | grep 'State:' | grep -v Okay`
            if [ "$TEST" = '' ]; then      #mirror id OK
                    echo "RAID mirror $MIRROR OK:"
                            /sbin/metastat $MIRROR >> /$BBTMP/$BBTEST
                    echo "-----------------------------------------" >> /$BBTMP/$BBTEST
            else    # disk has problems
                    COLOR="red"
                    echo "FAILURE in RAID mirror $MIRROR" >> /$BBTMP/$BBTEST
                            /sbin/metastat $MIRROR >> /$BBTMP/$BBTEST
                    echo "-------------> ${TEST} <-----------------" >> /$BBTMP/$BBTEST
            fi
    done
    
    #
    # AT THIS POINT WE HAVE OUR RESULTS.  NOW WE HAVE TO SEND IT TO
    # THE BBDISPLAY TO BE DISPLAYED...
    #
    
    # MACHINE NAME MUST EITHER BE A REAL MACHINE NAME, OR
    # LOOK LIKE A REAL MACHINE (in the case of arbitrary measurements
    # like temperature).  IF THE NAME YOU ARE USING DOESN'T EXIST
    # IN THE DNS THEN IT SHOULD BE LISTED IN THE bb-hosts FILE WITH noping,
    # PREFERABLY IN IT'S OWN GROUP...
    
    MACHINE="`hostname`"
    
    #
    # THE FIRST LINE IS STATUS INFORMATION... STRUCTURE IMPORANT!
    # THE REST IS FREE-FORM - WHATEVER YOU'D LIKE TO SEND...
    #
    LINE="status $MACHINE.$TEST $COLOR `date`
    RAID staus of disks
    `cat /$BBTMP/$BBTEST`
    
    # NOW USE THE BB COMMAND TO SEND THE DATA ACROSS
    $BB $BBDISP "$LINE"                     # SEND IT TO BBDISPLAY
    
  • Solaris 09-22-2010 Comments Off

    http://www.sun.com/software/whitepapers/wp-solarisinst/solaris_installation_deployment.pdf

    and

    http://www.sun.com/blueprints/1101/webstart.pdf

    how to use Flash Archive from CD boot instead of from JumpStart Server:

    http://www.sun.com/bigadmin/content/submitted/flash_archive.jsp

    Basic boot commands:

    http://www-uxsup.csx.cam.ac.uk/pub/doc/sun/solaris10/solaris10_basic_installation.pdf