Solaris Kernel Patching Recommended Patch

Here’s another Kernel patching of Solaris. I know there are tons of this type of post in the internet but another reference for the one who needs it, is I guess ok.

To be honest, this is the steps that really made me understood the steps and procedure and the concept behind the 10_Recommended patch for solaris kernel.

So, here it is:

Check Boot Disk

This step is to check which disks are the member of the boot mirror. We can say that this is the check disk mirror / disk membership step


# df -h /
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 33G 7.3G 25G 23% /
#
# metastat -c d0
d0 m 33GB d10 d20
d10 s 33GB c1t0d0s0
d20 s 33GB c1t1d0s0

As you can see, there are two disk that comprise the boot mirror (d0), 33GB c1t0d0s0 and c1t1d0s0, which is named d10 and d20 respectively

Check which disk is booting up

In this step, we will determine which of the disk are the one being use as the boot default boot disk.

Usually it’s the default ‘disk’ or ‘disk0’, but there are times, very rare, that ‘disk1’ is set as the default boot disk.

To know which disk is the one that boot up the system, you can use the eeprom command in the system shell:


# eeprom boot-device
boot-device=disk0

In this case, it’s the most common disk that is used as the boot disk – disk0. That means, when can detach the other disk as backup just in case the patching screw up.

Check The Bootability of the Backup Disk

Prior to patching, check if the other disk is booting. This is a precaution. Just in case the patching went sour, we know that we can always revert to a good disk, revert to the previous good booting condition of the server.

Since from the previous step, we know that the default boot disk is ‘disk0’, we will switch to ‘disk1’ and try to reboot the server and see if it will come up.

Now, there are two ways to set the value of the ‘boot-device’ paramter of the server. You can either set it at the system shell, or through the Boot PROM, depending on where you are at the moment.

Now, set the default boot disk to ‘disk1’

eeprom boot-device=disk1

or

set boot-device=disk1

After setting it up, reboot the server:

init 0 then boot

or

init 6

If you’re successfull, you just booted on the ‘other half’ of the bootdisk.

Now, don’t forget to switch back to disk0 !!!

Next, (optional… can differ from company to company)

# untar the patch file
cd /var/tmp
rm -rf PatchDir
mkdir PatchDir
mv S10KernelUpdate4.0.tar.gz PatchDir
cd PatchDir
gunzip -c S10KernelUpdate4.0.tar.gz|tar xf -

Splitting the Mirror

The next steps are the meat of the procedure. This is the patching of the kernel itself.. But of course, after checking the boot disk – whether the both disks are good- it’s time to break the mirror and patch one disk.

sync;metadeatch

detach the backup disk

metadetach d0 d20

# mount the detached root file system to root and modify these

mount /dev/dsk/c1t1d0s0 /mnt

vi /mnt/etc/vfstab
vi /mnt/etc/system

Modifying vsfstab and /etc/system of the detached disk will make sure that if the patching fail, we can alyas boot up to the backup disk.

Start Patching

# go to single user mode
sync;sync;init 0

init -s

Rebooting with command: boot -s
Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,0 File and args: -s
SunOS Release 5.10 Version Generic_141414-02 64-bit
Copyright 1983-2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

… You then follow the ReadMe document that comes with the Patch here.

Once the patching is done, you’ll see the difference of the patch level of the kernel.

Boot device: disk0 File and args:
SunOS Release 5.10 Version Generic_142900-02 64-bit
Copyright 1983-2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

Optional
=——————–
For more installation messages refer to the installation logfile:
/var/sadm/install_data/PMGT:_TLP-Set_Solaris_10_SOE_S10KernelUpdate4.1_A1_04_27_10

Use ‘/usr/bin/showrev -p’ or ‘/usr/sbin/patchadd -p’ to verify
installed patch-ids.
Refer to individual patch README files for more patch detail.
Rebooting the system is usually necessary after installation.
svc.startd: The system is coming down. Please wait.
svc.startd: 20 system services are now being stopped.

!!! Please read the logfile for any required action before rebooting !
————–

reboot:! for the bank, it’s automatic

If all is good, you can reattach the other disk

metattach d0 d20

And you’re done.

Leave a Reply

Your email address will not be published. Required fields are marked *