Firmware upgrade on T4-1 Sparc server

disclaimer: Please refer vendor provided instructions and follow carefully.


  1. cd /tmp/patch/
  2. unzip
  3. cd 148822-05
  4. ./sysfwdownload Sun_System_Firmware-8_2_2_c-SPARC_T4-1.pkg
  5. /usr/sbin/shutdown -i0 -g0 -yOK> type #. to go to ILOM mode in console
  6. show /HOST/boodmode (note config parameter value for LDOM servers to set after upgrade)
  7. show /HOST/ (will display the current versions of Hypervisor, OpenBoot, Post and  sysfw_version)
  8. stop /SYS
  9. set /SYS keyswitch_state=Normal
  10. show /SP/firmware/localimage (This will display upload date and version, if by mistake wrong image uploaded, it will display invalid image)
  11. load -source /SP/firmware/localimage (show progress in … and will reboot ILOM on completion)
  12. set /HOST/bootmode=”config-name”” (This is important for the LDOM servers)
  13. start the system “start /SYS”
  14. console /HOST/console….

Detailed explanation, have patience and read below steps

Step: 1

Go to this Oracle site and find the suitable firmware level for your server or refer your internal engineering documents to know upgrade level.

I need upgrade to SysFW 8.2.2.c, this comes with Oracle Patch “148822-05

Step2: Login to oracle site with valid support id and download the patch. (Most of the enterprise organizations have engineering team, who test these patches and upload to internal repositories)

Step3: copy the “” to the servers, where you need upgrade the firmware and unzip it.

Step4: Pre tasks

  • This firmware upgrade require down time. If you are planning on Production/Live servers, take proper down time from application teams.
  • Firmware upgrade require console, hence check your console access.
  • Take all LDOM guest configuration backup. Refer my previous article on saving and restoring Ldom guest configuration.
  • Check current configuration stored in Service Processor(SP). When you upgrade the firmware, it will reset SP bootmode configuration to default-factory. If you save the config name, it will be easy for you to reset. You can also check this from ILOM using “show /HOST/bootmode” save the config property value.
Step5: Load the firmware to System Processor (SP). ILOM has the mechanism to copy the image from OS using sysfwdownload tool. This tool always comes with your firmware patch and it’s recommended to use the same tool.

cd /tmp/patch/148822-05

./sysfwdownload [image].pkg (in my case the image name “Sun_System_Firmware-8_2_2_c-SPARC_T4-1.pkg

(if you observer image file name has all information like this firmware is for Sun Sparc hardware,it’s version is 8.2.2.c and it’s for Sparc T4-1 model. This is first level of defense to avoid loading wrong firmware image)

When downloading it will show progress in format “….(10%)….” it ends with download completed successfully

shutdown -i0 -g0 -y

OK> type #. to go to ILOM mode in console

show /HOST/boodmode (note config parameter value for LDOM servers)

show /HOST/ will display the current versions of Hypervisor, OpenBoot, Post and  sysfw_version

(sysfw_version is the one we mentioned above)

Verify downloaded image is correct or not with “show /SP/firmware/localimage” and verify upload date and Version. (Here second level of defense comes, if valid image is not uploaded instead of version it will show invalid image).

stop the system to poweroff competely “stop /SYS”

Verify the key_switch state “show /SYS keyswitch_state” it should be in normal state. If it’s in locked state change to normal

“set /SYS keyswitch_state=Normal” Check if value set properly.

After completing all pre checks now we are ready to upgrade the firmware

  load -source /SP/firmware/localimage

This will show progress in … and once it complete, it will reboot the ILOM.

Once it’s completed, change the bootmode “set /HOST/bootmode=”config-name”” (This is important for the LDOM servers)

start the system “start /SYS”

go to console to see the server boot progress

console /HOST/console

DRBD (Distributed Replicated Block Device) a low cost HA solution (alternate to SRDF)

Some of the key features

  • DRBD® refers to block devices designed as a building block to form high availability (HA) clusters. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based raid-1
  •     DRBD® available under the terms of The GNU General Public License v2
  • Fully synchronous, memory synchronous or asynchronous modes of operation


Soalris10: how_to_determine_which_processes using ports

#Use At Your Own Risk
#Beta v0.01

ps -ef | awk ‘{print $2,$9}’ | while read a b
port=`pfiles $a | grep -i port | wc -l`
if [ “$port” -gt 0  ]
echo “$a has opened ports:-($b)”
pfiles $a | grep -i port
echo  “$a —> $b:NONE”

Sample OUTPUT:

pfiles: cannot examine PID: no such process
0 —> sched:NONE
1 —> /sbin/init:NONE
2 —> pageout:NONE
3 —> fsflush:NONE
20908 has opened ports:-(/usr/lib/sendmail)
sockname: AF_INET  port: 25
sockname: AF_INET  port: 587
7 has opened ports:-(/lib/svc/bin/svc.startd)
5: S_IFPORT mode:0000 dev:357,0 uid:0 gid:0 size:0
9 —> /lib/svc/bin/svc.configd:NONE
390 has opened ports:-(/usr/lib/nfs/statd)
sockname: AF_INET  port: 0
279 —> /usr/sbin/cron:NONE
115 —> /usr/sbin/ipmon:NONE
171 —> /usr/lib/crypto/kcfd:NONE
28904 —> /sbin/sh:NONE
384 —> /usr/sbin/rpcbind:NONE
413 —> /usr/lib/saf/sac:NONE
129 —> /usr/lib/sysevent/syseventd:NONE
391 —> /usr/lib/nfs/nfsmapid:NONE
389 —> /usr/lib/nfs/nfs4cbd:NONE
435 —> /usr/lib/utmpd:NONE
169 —> /usr/lib/picl/picld:NONE
141 —> /usr/sbin/nscd:NONE


Solaris: Good Jumpstart Notes

How to Configure a Solaris 10 Jumpstart server and client [SPARC]

Python: Finding Square Root – in 3 methods

1. Approximation (Guess and check to an accuracy of two decimal point dp=0.01)

Disadvantage of this method is it takes manny guess to find the answer and using step value. If we use step value of small it takes too many guess and too much time to find the answer. If we take big step value, it may fail to find the anaswer itself, though big values takes less guess and less time.

#Square root by approximation by guess and  check method
#measure the number of guess

x = 25
dp = 0.01
step = dp**2
numGuesses = 0
ans = 0.0
while (abs(ans**2 – x)) >= dp and ans <= x:
    ans += step
    numGuesses += 1
print(‘numGuesses = ‘ + str(numGuesses))
if abs(ans**2-x) >= dp:
    print(‘Failed on square root of ‘ + str(x))
    print(str(ans) + ‘ is close to the square root of ‘ + str(x))


numGuesses = 49990
4.999 is close to the square root of 25

2. Bisection (Take midpoint between 0 and x and compare it’s higher or smaller
Ex., Find the square root of 25 upto 2 decimal points (epsilon=0.001)
dp=0.01 (we are trying to find square root of 25 to an accuracy of .01 decimals)

# bisection search for square root


This is efficient method compare to Approximation guess and check method
Example below finding square root of 25 to an accuracy of 2 decimal points 0.01


x = 25
dp = 0.01
numGuesses = 0
low = 0.0
high = x
ans = (high + low)/2.0
while abs(ans**2 – x) >= dp:
    print(‘low = ‘ + str(low) + ‘ high = ‘ + str(high) + ‘ ans = ‘ + str(ans))
    numGuesses += 1
    if ans**2 < x:
        low = ans
        high = ans
    ans = (high + low)/2.0
print(‘numGuesses = ‘ + str(numGuesses))
print(str(ans) + ‘ is close to square root of ‘ + str(x))


It took 13 guesses to find the answer, very efficient compare to previous approximation guess and check method
low = 0.0 high = 25 ans = 12.5
low = 0.0 high = 12.5 ans = 6.25
low = 0.0 high = 6.25 ans = 3.125
low = 3.125 high = 6.25 ans = 4.6875
low = 4.6875 high = 6.25 ans = 5.46875
low = 4.6875 high = 5.46875 ans = 5.078125
low = 4.6875 high = 5.078125 ans = 4.8828125
low = 4.8828125 high = 5.078125 ans = 4.98046875
low = 4.98046875 high = 5.078125 ans = 5.029296875
low = 4.98046875 high = 5.029296875 ans = 5.0048828125
low = 4.98046875 high = 5.0048828125 ans = 4.99267578125
low = 4.99267578125 high = 5.0048828125 ans = 4.99877929688
low = 4.99877929688 high = 5.0048828125 ans = 5.00183105469
numGuesses = 13
5.00030517578 is close to square root of 25

3. Newton-Raphson (General approximation algorithms)

Newton and Raphson same time proposed this General Approximation algorithms, hence it got popular with bot the namess. Formula we use for this method is shown below. This method will be very efficient as it takes very less time and less number of guesses.
Formula is guess -(guess^2 – k) / 2*guess

# Newton-Raphson for square root

Newton and Raphson same time proposed this General Approximation algorithms, hence it got popular with bot the #namess. Formula we use for this method is shown below. This method will be very efficient as it takes very less time and #less number of guesses.  
#Formula is guess -(guess^2 – k) / 2*guess
#dp decimal point g Guess


dp = 0.01
x = 25.0
g = x/2.0
while abs(g*g – x) >= dp:
    g = g – (((g**2) – x)/(2*g))
print(‘Square root of ‘ + str(x) + ‘ is about ‘ + str(g))


Square root of 25.0 is about 5.00001295305

Acknowledgement: These are taken from Eric Grimmson lectures in edx for the course “6.00.1x Introduction to Computer Science and Programming”

How to Use Git and GitHub in

Effective use of version control is an important and useful skill for any developer working on long-lived (or even medium-lived) projects, especially if more than one developer is involved. This course, built with input from GitHub, will introduce the basics of using version control by focusing on a particular version control system called Git and a collaboration platform called GitHub.