Registering Solaris 10 and updating patches from the command line (CLI)

All the mainstream Sun documentation on the Sun Connection or Update Manager expects the server to have a GUI, which I completely don’t understand. As a matter of fact, their whole installation process is just as backwards and assumes the same thing. They have a server package installation, and it installs GNOME, duh! Anyway, you do a custom install and check and uncheck all the little boxes and deal with all the dependency issues to install a normal server installation without a GUI. But then, you want to be able to update your server to the latest patch levels, but you don’t have a GUI to register your system. Well, I finally found the tech note that shows how to register from the command line. Here’s how you do it:

cp /usr/lib/breg/data/RegistrationProfile.properties /tmp
vi /tmp/ RegistrationProfile.properties

Fill in the appropriate settings, then run the following command:

# /usr/sbin/sconadm register -a -r /tmp/RegistrationProfile.properties
sconadm is running
Authenticating user …
finish registration!

Note: If you can’t find /usr/lib/breg/data/RegistrationProfile.properties, just create a file in /tmp with the following values: (since it has your Sun Online password in it, make sure you set the file permissions to 400)

userName=
password=
hostName=
subscriptionKey= (if you don’t include this you only get security updates)
portalEnabled=false
proxyHostName=
proxyPort=
proxyUserName=
proxyPassword=

Now you can update your system using the smpatch command which will download and install the updates for you:

# smpatch analyze
119253-24 SunOS 5.10_x86: System Administration Applications Patch
124631-15 SunOS 5.10_x86: System Administration Applications, Network, and Core Libraries Patch
121431-22 SunOS 5.8_x86 5.9_x86 5.10_x86: Live Upgrade Patch
119535-13 SunOS 5.10_x86: Flash Archive Patch
119255-52 SunOS 5.10_x86: Install and Patch Utilities Patch
125387-04 SunOS 5.10_x86: aac driver patch
119813-07 X11 6.6.2_x86: Freetype patch
127887-05 SunOS 5.10_x86: ipf patch
126267-01 SunOS 5.10_x86: ibd patch
126648-02 SunOS 5.10_x86: InfiniBand patch
128029-04 SunOS 5.10_x86: e1000g patch

# smpatch update
119253-24 has been validated.
124631-15 has been validated.
121431-22 has been validated.
119535-13 has been validated.
119255-52 has been validated.
125387-04 has been validated.
119813-07 has been validated.
127887-05 has been validated.
126267-01 has been validated.
126648-02 has been validated.
128029-04 has been validated.

Installing patches from /var/sadm/spool…
119253-24 has been applied.
124631-15 has been applied.
NOTICE: Patch 121431-22 cannot be installed because it is typed as “interactive” which is prohibited by policy.
119535-13 has been applied.
119255-52 has been applied.
NOTICE: Update 125387-04 cannot be applied at this time since it is typed as “single user” which is disallowed by installation policy.
NOTICE: Patch 125387-04 cannot be installed until the next system shutdown.
119813-07 has been applied.
NOTICE: Update 127887-05 cannot be applied at this time since it is typed as “reboot immediate” which is disallowed by installation policy.
NOTICE: Patch 127887-05 cannot be installed until the next system shutdown.
126267-01 has been applied.
126648-02 has been applied.
128029-04 has been applied.

ID’s of the updates that are disallowed by installation policy have been
written to file
/var/sadm/spool/disallowed_patch_list

One or more updates that you installed requires a system shutdown to activate it. To initiate the system shutdown, you must use one of the following commands:
o Drop to the firmware prompt – init 0 or shutdown -i 0
o Power down the system – init 5 or shutdown -i 5
o Restart the system – init 6 or shutdown -i 6

Reboot to install additional patches (obviously during a maintenance window):

# init 6

Here’s what you will see on the console during the reboot:

Patches on the console





Please VOTE for this page at: ADD TO DEL.ICIO.US | ADD TO DIGG | ADD TO FURL | ADD TO NEWSVINE | ADD TO NETSCAPE | ADD TO REDDIT | ADD TO STUMBLEUPON | ADD TO TECHNORATI FAVORITES | ADD TO SQUIDOO | ADD TO WINDOWS LIVE | ADD TO YAHOO MYWEB | ADD TO ASK | ADD TO GOOGLE


12 Comments


  1. This is a good post! Keep up the good work!

    Posted September 4, 2008, 10:14 am

  2. Thank you posting this article, worked great and very, very much appreciated!

    Posted October 22, 2008, 8:35 am

  3. Very usefull. Thank you very much.

    Posted January 30, 2009, 3:33 am

  4. Thanks. You the man!! Works great!! Forget about putting all those patches on a DVD. This is even better!!!

    Posted February 7, 2009, 8:39 pm

  5. I could have used this. I ended up connecting to my server with an X11 session and ran /usr/bin/updatemanager this brings up the manager in an X window. you can run your web browser in the same manner /usr/sfw/bin/mozilla &.

    Posted February 24, 2009, 2:00 pm

  6. Thanks. very useful papers.

    Posted April 27, 2009, 10:45 am

  7. NICE! Thanks for both the instructions, and the examples of expected output. Much appreciate your time in putting this together and posting it for the greater good.

    Posted June 23, 2009, 10:03 am

  8. good post with some useful tips thru CLI

    Posted August 16, 2009, 8:08 pm

  9. Very good! This is what I need to make it work. If you want to know, and use VirtualBox for Solaris 10 you need at least 16 mb of video ram in the VM settings. If you rely on the 12 mb of standard ram you can’t use the keyboard on a standard console (not under X).

    Posted September 21, 2009, 2:54 pm

  10. Thanks buddy – very helpful! They must think we all run these things with a GUI ;)

    Posted December 2, 2009, 3:20 pm

  11. Thanks, this is really really helpful ! I was looking for this for a while … I don’t know why Sun (now Oracle) thinks that me must use a GUI for our daily tasks! Why do we need a graphical interface on a server anyway ?

    Posted August 24, 2010, 8:07 am

  12. […] Follow this excellent article created by Kevin Pendleton about Registering Solaris 10 and updating patches from … […]

    Posted December 11, 2010, 10:04 am

Leave a reply