Sometimes either out of necessity or preference you may find yourself trying to patch a Solaris box without using x windows. Here is a quick guide to get you through:
First you have to register the system with Sun by providing your sun login credentials to get access to patches that can be done with the following
cp /usr/lib/breg/data/RegistrationProfile.properties /tmp/
Fill in your account information in the properties file (replace the caps with your data):
perl -pi -e 's/^userName=/userName=YOURNAME/' /tmp/RegistrationProfile.properties
perl -pi -e 's/^password=/password=YOURPASSWORD/' /tmp/RegistrationProfile.properties
Register the system
sconadm register -a -r /tmp/RegistrationProfile.properties
Download all the appropriate patches, this will typically take a LONG time
smpatch download
Get to the ok prompt, WARNING have console access for this part:
init 0
When you get to the ok prompt type this to boot the user into single user mode:
boot -s
Apply the patches:
smpatch update #output below
Set the box up for reconfigure to pick up any device changes
touch /reconfigure
You may see some of the patches you install durning the smpatch update command not run due to requiring interactive mode. You'll have to run those by hand you can do that with the following the 121430-21 is just an example, input the patch number you are trying to install. You may also see some patches that don't install and if you try the below method you will get something like the following 'The following requested patches have packages not installed on the system' that basically means that smpatch is a bit retarded and decided you needed a patch for software you don't even have installed. You can go ahead and delete those patches from your /var/sadm/spool directory if you wish.:
cd /var/sadm/spool
patchadd -n 121430-21
Get back to the ok prompt
init 0
Boot back into single user mode and make sure everything is in good shape
boot -s
After a once over, reboot the system and pat yourself on the back for being proactive and patching your system ;)