Solaris Patching using Live Upgrade

Solaris Live Upgrade software enables the operating system to continue to run while upgrades, patch installations, or routine maintenance operations are performed.

System administrators can patch/upgrade a system image rapidly without impacting the boot environment needed by the Solaris OS to run. Administrators simply create a copy of the active boot environment, make changes to the copy, and reboot to the updated boot environment when appropriate. In the event of a problem, administrators can revert to a previous environment with a simple reboot. The result — a simplified way to update systems that minimizes the downtime and risk often associated with patching efforts.

MY SYSTEM CONFIGURATION

The server is running on Kernel Patch level 141445-09. I will upgrade the kernel patch through bundle patching using Solaris Live Upgrade. Below are the outputs before any changes.

Note: I have one disk in the system (30GB), I will create the duplicate environment on slice4 and slice5 (slice4 for root FS & slice5 for /export/home FS). The similar procedure can be used for mirrored disks and can be used for separate disk i.e creating duplicate boot environment on separate disk. The same procedure can be used for SPARC & X-86 platform. I am doing this activity on x-86 box.

 

yogesh#uname -a
SunOS yogesh 5.10 Generic_141445-09 i86pc i386 i86pc - Current OS Kernel Patch Level.

yogesh#echo | format
Searching for disks…done

AVAILABLE DISK SELECTIONS:
0. c1t0d0 /pci@0,0/pci1000,30@10/sd@0,0 ———————–> (root disk of 30GB)
1. c1t2d0 Software /pci@0,0/pci1000,30@10/sd@2,0————-> (additional disk of 10GB for my softwares)

yogesh# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s0 10085921 3514664 6470398 36% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 2032464 556 2031908 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
fd 0 0 0 0% /dev/fd
swap 2032060 152 2031908 1% /tmp
swap 2031940 32 2031908 1% /var/run
/dev/dsk/c1t0d0s3 967199 1046 908122 1% /export/home
/vol/dev/dsk/c0t0d0/sol_10_1009_x86 2503350 2503350 0 100% /cdrom/sol_10_1009_x86
/dev/dsk/c1t2d0s0 10283758 5970398 4210523 59% /software
/dev/lofi/1 2503350 2503350 0 100% /mnt
/usr/lib/libc/libc_hwcap1.so.1 10085921 3514664 6470398 36% /lib/libc.so.1

Install to Solaris Live Upgrade Software:

Users should upgrade to the latest version of the Solaris Live Upgrade software prior to patching the system, regardless of the version of the Solaris OS running on the system. Solaris Live Upgrade is designed and compiled to work on the Solaris 8, 9, and 10 OS releases.

Note: This step is not necessary but better to follow the precautions.

From Solaris10 iso-image I have upgraded the software of Live upgrade. Below are the outputs:

yogesh#df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d4 10093954 4030503 5962512 41% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 2250400 980 2249420 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
10093954 4030503 5962512 41% /lib/libc.so.1
fd 0 0 0 0% /dev/fd
swap 2249464 44 2249420 1% /tmp
swap 2249448 28 2249420 1% /var/run
/dev/md/dsk/d5 967199 1046 908122 1% /export/home
/vol/dev/dsk/c0t0d0/sol_10_1009_x86
2503350 2503350 0 100% /cdrom/sol_10_1009_x86
/dev/dsk/c1t2d0s0 10283758 5970399 4210522 59% /mnt
/dev/lofi/1 2503350 2503350 0 100% /a
yogesh#cd /a/Solaris_10/Tools/Installers

yogesh#pwd
/a/Solaris_10/Tools/Installers

yogesh#ls -l
total 3
-r-xr-xr-x 1 root root 457 Sep 1 2009 liveupgrade20
-r-xr-xr-x 1 root root 554 Sep 1 2009 solarisn
yogesh#

yogesh#./liveupgrade20

Java Accessibility Bridge for GNOME loaded.

Solaris Web Start will assist you in installing software for Live Upgrade.

Sun Microsystems, Inc.
Binary Code License Agreement
Live Upgrade
READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY “AGREEMENT”) CAREFULLY BEFORE OPENING THE SOFTWARE MEDIA PACKAGE. BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU ARE ACCESSING THE SOFTWAREELECTRONICALLY, INDICAT YOUR ACCEPTANCE OF THESE TERMS BY SELECTING THE “ACCEPT” BUTTON AT THE END OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL THESE TERMS,PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR, IF THE SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE “DECLINE” BUTTON AT THE END OF THIS AGREEMENT.

1. LICENSE TO USE. Sun grants you a non-exclusive and non-transferable license for the internal use only of the accompanying software and documentation and any error corrections provided by Sun (collectively “Software”), by the number of users and the class of computer hardware for which
::::: output truncated ::::::::::::::

Enter ‘y’ to accept the license agreement. Enter ‘n’ to decline the license
agreement and exit the install.y

IMPORTANT NOTICE

Patches Needed to Run Solaris Live Upgrade

Correct operation of Solaris Live Upgrade requires that a limited set of patch
revisions be installed for a given OS version.

Before installing or running Live Upgrade, you are required to install a limited set of patch revisions. Make sure you have the most recently updated patch list by consulting sunsolve.sun.com. Search for the info doc 72099 on the SunSolve(tm) web site.

Live Upgrade may fail to work properly if the latest limited set of patch revisions are not installed on this system.

Please select the type of install to perform from the following choices:

Typical – Software will be installed with the most common options. Recommended for most users.

Custom – You may choose the options you want to install. Recommended for advanced users.

1. Typical
2. Custom

What would you like to do [1]? 1

Checking disk space.

The following items will be installed:

Product: Live Upgrade
Location: /
Size: 2.23 MB
———————
Live Upgrade (root) 976.23 KB
Live Upgrade (usr) 1.26 MB
Live Upgrade (config) 17.26 KB

Ready to Install

1. Install Now
2. Start Over
3. Exit Installation

What would you like to do [1]? 1

Installing Live Upgrade
|-1%————–25%—————–50%—————–75%————–100%|

Installation details:

Product Result More Info
1. Live Upgrade Installed Available

2. Done

Enter the number corresponding to the desired selection for more
information, or enter 2 to continue [2]:

Creation of SLICES of the same size on the disk:

In the original configuration I have / & /export/home on slice0 & slice3. I will create slice4 & slice5 of the same size as that of slice0 & 3. Here slice4 is for root and slice5 is for /export/home.

yogesh#format
Searching for disks…done

AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@0,0/pci1000,30@10/sd@0,0
1. c1t2d0 Software
/pci@0,0/pci1000,30@10/sd@2,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c1t0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c1t0d0s1 is currently used by swap. Please see swap(1M).
/dev/dsk/c1t0d0s3 is currently mounted on /export/home. Please see umount(1M).

FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
fdisk – run the fdisk program
repair – repair a defective sector
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
inquiry – show vendor, product and revision
volname – set 8-character volume name
! – execute , then return
quit
format> p

PARTITION MENU:
0 – change `0′ partition
1 – change `1′ partition
2 – change `2′ partition
3 – change `3′ partition
4 – change `4′ partition
5 – change `5′ partition
6 – change `6′ partition
7 – change `7′ partition
select – select a predefined table
modify – modify a predefined partition table
name – name the current table
print – display the current table
label – write partition map and label to the disk
! – execute , then return
quit
partition> p
Current partition table (original):
Total disk cylinders available: 3913 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 1 – 1275 9.77GB (1275/0/0) 20482875
1 swap wu 1276 – 1530 1.95GB (255/0/0) 4096575
2 backup wm 0 – 3912 29.98GB (3913/0/0) 62862345
3 home wm 1531 – 1658 1004.06MB (128/0/0) 2056320
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 – 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0

partition> 4
Part Tag Flag Cylinders Size Blocks
4 unassigned wm 0 0 (0/0/0) 0

Enter partition id tag[unassigned]: ?
Expecting one of the following: (abbreviations ok):
unassigned boot root swap
usr backup stand var
home alternates reserved

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 1659
Enter partition size[0b, 0c, 1659e, 0.00mb, 0.00gb]: 9.77gb
partition> label
Ready to label disk, continue? y

partition> p
Current partition table (unnamed):
Total disk cylinders available: 3913 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 1 – 1275 9.77GB (1275/0/0) 20482875
1 swap wu 1276 – 1530 1.95GB (255/0/0) 4096575
2 backup wm 0 – 3912 29.98GB (3913/0/0) 62862345
3 home wm 1531 – 1658 1004.06MB (128/0/0) 2056320
4 unassigned wm 1659 – 2934 9.77GB (1276/0/0) 20498940
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 – 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0

partition> 5
Part Tag Flag Cylinders Size Blocks
5 unassigned wm 0 0 (0/0/0) 0

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 2935
Enter partition size[0b, 0c, 2935e, 0.00mb, 0.00gb]: 1004.06mb
partition> label
Ready to label disk, continue? y

partition> p
Current partition table (unnamed):
Total disk cylinders available: 3913 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 1 – 1275 9.77GB (1275/0/0) 20482875
1 swap wu 1276 – 1530 1.95GB (255/0/0) 4096575
2 backup wm 0 – 3912 29.98GB (3913/0/0) 62862345
3 home wm 1531 – 1658 1004.06MB (128/0/0) 2056320
4 unassigned wm 1659 – 2934 9.77GB (1276/0/0) 20498940
5 unassigned wm 2935 – 3062 1004.06MB (128/0/0) 2056320
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 – 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0

partition> ^D

 

Creating the Alternate Boot Environment:

Create the alternate boot environment to be used during the Solaris Live Upgrade software patch process.

Where –C for current boot device, -m for mount point with the new device and its filesystem type, -n for new boot environment name.

yogesh#lucreate -C /dev/dsk/c1t0d0s0 -m /:/dev/dsk/c1t0d0s4:ufs -m /export/home:/dev/dsk/c1t0d0s5:ufs -n newroot
Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Checking GRUB menu…
System has findroot enabled GRUB
Analyzing system configuration.
Comparing source boot environment file systems with the file
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Searching /dev for possible boot environment filesystem devices

Updating system configuration files.
The device is not a root device for any boot environment; cannot get BE ID.
Creating configuration for boot environment .
Source boot environment is .
Creating boot environment .
Creating file systems on boot environment .
Creating file system for </> in zone on .
Creating file system for in zone on .
Mounting file systems for boot environment .
Calculating required sizes of file systems for boot environment .
Populating file systems on boot environment .
Checking selection integrity.
Integrity check OK.
Populating contents of mount point </>.
Populating contents of mount point .
Copying.
Creating shared file system mount points.
Creating compare databases for boot environment .
Creating compare database for file system .
Creating compare database for file system </>.
Updating compare databases on boot environment .
Making boot environment bootable.
Updating bootenv.rc on ABE .
File propagation successful
Copied GRUB menu from PBE to ABE
No entry for BE in GRUB menu
Population of boot environment successful.
Creation of boot environment successful.
yogesh#lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
————————– ——– —— ——— —— ———-
c1t0d0s0 yes yes yes no –
newroot yes no no yes –

Note: During the copying process you will be able to see the outputs through df command as shown below:

yogesh# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s0 10085921 3514019 6471043 36% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 2027096 556 2026540 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
fd 0 0 0 0% /dev/fd
swap 2026724 184 2026540 1% /tmp
swap 2026572 32 2026540 1% /var/run
/dev/dsk/c1t0d0s3 967199 1046 908122 1% /export/home
/vol/dev/dsk/c0t0d0/sol_10_1009_x86
2503350 2503350 0 100% /cdrom/sol_10_1009_x86
/dev/dsk/c1t2d0s0 10283758 5970398 4210523 59% /software
/dev/lofi/1 2503350 2503350 0 100% /mnt
/dev/dsk/c1t0d0s4 10093954 9457925 535090 95% /.alt.tmp.b-X7b.mnt
/dev/dsk/c1t0d0s5 967199 14 909154 1% /.alt.tmp.b-X7b.mnt/export/home
swap 2026540 0 2026540 0% /.alt.tmp.b-X7b.mnt/var/run
swap 2026540 0 2026540 0% /.alt.tmp.b-X7b.mnt/tmp
/usr/lib/libc/libc_hwcap1.so.1
10085921 3514019 6471043 36% /lib/libc.so.1

Note: /a is showing 95% because I have one directory which I created under root which different harddisk. But during copying process that directory copied under new boot environment and took 95% instead of 36%. So don’t confused with the 95% space.

After copying will complete the df output will show the original output as shown below:

yogesh# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s0 10085921 3514664 6470398 36% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 2032464 556 2031908 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
fd 0 0 0 0% /dev/fd
swap 2032060 152 2031908 1% /tmp
swap 2031940 32 2031908 1% /var/run
/dev/dsk/c1t0d0s3 967199 1046 908122 1% /export/home
/vol/dev/dsk/c0t0d0/sol_10_1009_x86
2503350 2503350 0 100% /cdrom/sol_10_1009_x86
/dev/dsk/c1t2d0s0 10283758 5970398 4210523 59% /software
/dev/lofi/1 2503350 2503350 0 100% /mnt
/usr/lib/libc/libc_hwcap1.so.1
10085921 3514664 6470398 36% /lib/libc.so.1

yogesh# mkdir /a
yogesh# pwd
/
yogesh# mount /dev/dsk/c1t0d0s4 /a
yogesh# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s0 10085921 3514665 6470397 36% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 2032280 556 2031724 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
fd 0 0 0 0% /dev/fd
swap 2031876 152 2031724 1% /tmp
swap 2031756 32 2031724 1% /var/run
/dev/dsk/c1t0d0s3 967199 1046 908122 1% /export/home
/vol/dev/dsk/c0t0d0/sol_10_1009_x86
2503350 2503350 0 100% /cdrom/sol_10_1009_x86
/dev/dsk/c1t2d0s0 10283758 5970398 4210523 59% /software
/dev/lofi/1 2503350 2503350 0 100% /mnt
/usr/lib/libc/libc_hwcap1.so.1
10085921 3514665 6470397 36% /lib/libc.so.1
/dev/dsk/c1t0d0s4 10093954 9482639 510376 95% /a

Note: /a is showing 95% because I have one directory which I created under root which different harddisk. But during copying process that directory copied under new boot environment and took 95% instead of 36%. So don’t confused with the 95% space.

yogesh# format
Searching for disks…done

AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@0,0/pci1000,30@10/sd@0,0
1. c1t2d0 Software
/pci@0,0/pci1000,30@10/sd@2,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c1t0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c1t0d0s1 is currently used by swap. Please see swap(1M).
/dev/dsk/c1t0d0s3 is currently mounted on /export/home. Please see umount(1M).
/dev/dsk/c1t0d0s4 is currently mounted on /a. Please see umount(1M).
/dev/dsk/c1t0d0s5 is in use for live upgrade /export/home. Please see ludelete(1M).

FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
fdisk – run the fdisk program
repair – repair a defective sector
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
inquiry – show vendor, product and revision
volname – set 8-character volume name
! – execute , then return
quit
format> p

PARTITION MENU:
0 – change `0′ partition
1 – change `1′ partition
2 – change `2′ partition
3 – change `3′ partition
4 – change `4′ partition
5 – change `5′ partition
6 – change `6′ partition
7 – change `7′ partition
select – select a predefined table
modify – modify a predefined partition table
name – name the current table
print – display the current table
label – write partition map and label to the disk
! – execute , then return
quit
partition> p
Current partition table (original):
Total disk cylinders available: 3913 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 1 – 1275 9.77GB (1275/0/0) 20482875
1 swap wu 1276 – 1530 1.95GB (255/0/0) 4096575
2 backup wm 0 – 3912 29.98GB (3913/0/0) 62862345
3 home wm 1531 – 1658 1004.06MB (128/0/0) 2056320
4 unassigned wm 1659 – 2934 9.77GB (1276/0/0) 20498940
5 unassigned wm 2935 – 3062 1004.06MB (128/0/0) 2056320
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 – 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0

partition> ^D

yogesh#lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
————————– ——– —— ——— —— ———-
c1t0d0s0 yes yes yes no –
newroot yes no no yes –

yogesh#uname -a
SunOS yogesh 5.10 Generic_141445-09 i86pc i386 i86pc

 

Patcing Procedure using LiveUpgrade:

I have Bundle patch downloaded in the server. The following steps outline the procedure for applying patches to the Solaris 10 OS:

yogesh#luupgrade -n newroot -t -s /software/10_x86_Recommended/installcluster patch_order

System has findroot enabled GRUB
No entry for BE in GRUB menu
Validating the contents of the media .
ERROR: The path is an ordinary file (not a directory).
ERROR: The add patches (-P) option requires that you specify the patches location with the option.
yogesh#luupgrade -n newroot -t -s /software/10_x86_Recommended/patches patch_order

System has findroot enabled GRUB
No entry for BE in GRUB menu
Validating the contents of the media .
The media contains 178 software patches that can be added.
Mounting the BE .
Adding patches to the BE .
Validating patches…

Loading patches installed on the system…

Package SUNWgrubS from directory SUNWgrubS in patch 138884-01 is not installed on the system. Changes for package SUNWgrubS will not be applied to the system.
Package SUNWgrubS from directory SUNWgrubS in patch 139556-08 is not installed on the system. Changes for package SUNWgrubS will not be applied to the system.
Package SUNWsibi from directory SUNWsibi in patch 119082-25 is not installed on the system. Changes for package SUNWsibi will not be applied to the system.
Package SUNWj5jmp from directory SUNWj5jmp in patch 118668-25 is not installed on the system. Changes for package SUNWj5jmp will not be applied to the system.
Package SUNWsibi from directory SUNWsibi in patch 124629-10 is not installed on the
the system. Changes for package SUNWinplt will not be applied to the system.

:::::::: Output Truncated for easy reading ::::::::::::

Requested patch 119064-01 is already installed on the system.
Requested patch 140560-01 is already installed on the system.
Requested patch 125280-05 is already installed on the system.

The following requested patches do not update any packages installed on the system
No Packages from patch 121212-02 are installed on the system.

Checking patches that you specified for installation.

Done!

The following requested patches will not be installed because
they have been made obsolete by other patches already
installed on the system or by patches you have specified for installation.

0 All packages from patch 118844-20 are patched by higher revision patches.

1 All packages from patch 122661-08 are patched by higher revision patches.

2 All packages from patch 124205-05 are patched by higher revision patches.

The following requested patches will not be installed because
the packages they patch are not installed on this system.

0 No Packages from patch 121182-03 are installed on the system.

1 No Packages from patch 138825-06 are installed on the system.

2 No Packages from patch 120413-11 are installed on the system.

3 No Packages from patch 137005-07 are installed on the system.

4 No Packages from patch 120415-26 are installed on the system.

Approved patches will be installed in this order:

119255-72 120273-28 119758-17 122213-34 122676-04 141031-08 118668-25 124631-33
141511-05 123591-12 140160-02 143913-01 125720-34 119060-49 120411-33 125333-08
137081-04 141501-06 125732-05 138827-06 119314-30 125542-06 125216-03 118669-25
137148-05 119214-22 142085-03 122912-19 118778-13 139100-03 141591-02 142048-06
136999-08 141517-06 141525-07 137001-06 120461-17 142901-03 125534-15 143507-01
119549-14 141875-06 143511-01 126366-16 138823-06 123896-15 138194-03 143503-01
119901-09 139621-01 141879-10 141505-07 120544-15 120095-29 143318-01

Checking installed patches…
Executing prepatch script…
Installing patch packages…
=~=~=~=~=~=~=~=~=~=~=~= =~=~=~=~=~=~=~=~=~=~=~=
Checking installed patches…
Executing prepatch script…
Installing patch packages…

:::: output truncated for easy reading :::::

Patch packages installed:
SUNWxwsvr

Checking installed patches…
Executing prepatch script…
Installing patch packages…

Patch 143318-01 has been successfully installed.
See /a/var/sadm/patch/143318-01/log for details
Executing postpatch script…

Patch packages installed:
SUNWgnome-im-client

Unmounting the BE.

 

Booting the Patched System:

In order to run the patched system, the machine must be rebooted. Prior to rebooting, set the new reboot to boot off the alternative environment newroot. This step changes the boot device to be the newroot partition at the next shutdown.

yogesh# luactivate newroot
System has findroot enabled GRUB
Generating boot-sign, partition and slice information for PBE

Generating boot-sign for ABE
Generating partition and slice information for ABE
Boot menu exists.
Generating multiboot menu entries for PBE.
Generating multiboot menu entries for ABE.
Disabling splashimage
Re-enabling splashimage
No more bootadm entries. Deletion of bootadm entries is complete.
GRUB menu default setting is unaffected
Done eliding bootadm entries.

**********************************************************************

The target boot environment has been activated. It will be used when you  reboot.

NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the target BE.

**********************************************************************

In case of a failure while booting to the target BE, the following process needs to be followed to fallback to the currently working boot environment:

1. Boot from Solaris failsafe or boot in single user mode from the Solaris Install CD or Network.

2. Mount the Parent boot environment root slice to some directory (like /mnt). You can use the following command to mount:

mount -Fufs /dev/dsk/c1t0d0s0 /mnt

3. Run utility with out any arguments from the Parent boot environment root slice, as shown below:

/mnt/sbin/luactivate

4. luactivate, activates the previous working boot environment and indicates the result.

5. Exit Single User mode and reboot the machine.

**********************************************************************

Modifying boot archive service
Propagating findroot GRUB for menu conversion.
File propagation successful
File propagation successful
File propagation successful
File propagation successful
Deleting stale GRUB loader from all BEs.
File deletion successful
File deletion successful
File deletion successful
Activation of boot environment successful.

 

====reboot the box with init6, it came up with following outputs ========

yogesh# init 6
propagating updated GRUB menu
File propagation successful
File propagation successful
File propagation successful
File propagation successful

yogesh# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
————————– ——– —— ——— —— ———-
c1t0d0s0 yes no no yes –
newroot yes yes yes no –

yogesh# uname -a
SunOS yogesh 5.10 Generic_142901-03 i86pc i386 i86pc

yogesh# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s4 10093954 9067585 925430 91% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 2240036 976 2239060 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
10093954 9067585 925430 91% /lib/libc.so.1
fd 0 0 0 0% /dev/fd
swap 2239104 44 2239060 1% /tmp
swap 2239088 28 2239060 1% /var/run
/dev/dsk/c1t0d0s5 967199 1046 908122 1% /export/home
/vol/dev/dsk/c0t0d0/sol_10_1009_x86
2503350 2503350 0 100% /cdrom/sol_10_1009_x86

DELETE THE OLDER BOOT ENVIRONMENT ONCE APPLICATION & DB CAME UP SUCCESSFULLY:

yogesh# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
————————– ——– —— ——— —— ———-
c1t0d0s0 yes no no yes –
newroot yes yes yes no –

yogesh# ludelete c1t0d0s0
System has findroot enabled GRUB
Checking if last BE on any disk…
BE is not the last BE on any disk.
Updating GRUB menu default setting
Changing GRUB menu default setting to
File propagation successful
Successfully deleted entry from GRUB menu
Determining the devices to be marked free.
Updating boot environment configuration database.
Updating boot environment description database on all BEs.
Updating all boot environment configuration databases.
Boot environment deleted.

yogesh# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
————————– ——– —— ——— —— ———-
newroot yes yes yes no –

yogesh# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s4 10093954 9056918 936097 91% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 2221860 980 2220880 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
10093954 9056918 936097 91% /lib/libc.so.1
fd 0 0 0 0% /dev/fd
swap 2220924 44 2220880 1% /tmp
swap 2220908 28 2220880 1% /var/run
/dev/dsk/c1t0d0s5 967199 1046 908122 1% /export/home
/vol/dev/dsk/c0t0d0/sol_10_1009_x86
2503350 2503350 0 100% /cdrom/sol_10_1009_x86

yogesh# init 6
propagating updated GRUB menu
File propagation successful
File propagation successful
File propagation successful
File propagation successful

yogesh# uname -a
SunOS yogesh 5.10 Generic_142901-03 i86pc i386 i86pc – New Kernel Patch Level.

yogesh# uptime
11:06pm up 1 min(s), 1 user, load average: 84.91, 32.90, 12.23

yogesh# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s4 10093954 9060687 932328 91% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 2240104 980 2239124 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
10093954 9060687 932328 91% /lib/libc.so.1
fd 0 0 0 0% /dev/fd
swap 2239168 44 2239124 1% /tmp
swap 2239148 24 2239124 1% /var/run
/dev/dsk/c1t0d0s5 967199 1046 908122 1% /export/home
/vol/dev/dsk/c0t0d0/sol_10_1009_x86
2503350 2503350 0 100% /cdrom/sol_10_1009_x86

yogesh# format
Searching for disks…done

AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@0,0/pci1000,30@10/sd@0,0
1. c1t2d0 Software
/pci@0,0/pci1000,30@10/sd@2,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c1t0d0s1 is currently used by swap. Please see swap(1M).
/dev/dsk/c1t0d0s4 is currently mounted on /. Please see umount(1M).
/dev/dsk/c1t0d0s5 is currently mounted on /export/home. Please see umount(1M).

FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
fdisk – run the fdisk program
repair – repair a defective sector
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
inquiry – show vendor, product and revision
volname – set 8-character volume name
! – execute , then return
quit
format> p

PARTITION MENU:
0 – change `0′ partition
1 – change `1′ partition
2 – change `2′ partition
3 – change `3′ partition
4 – change `4′ partition
5 – change `5′ partition
6 – change `6′ partition
7 – change `7′ partition
select – select a predefined table
modify – modify a predefined partition table
name – name the current table
print – display the current table
label – write partition map and label to the disk
! – execute , then return
quit
partition> p
Current partition table (original):
Total disk cylinders available: 3913 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 unassigned wm 1 – 1275 9.77GB (1275/0/0) 20482875
1 swap wu 1276 – 1530 1.95GB (255/0/0) 4096575
2 backup wm 0 – 3912 29.98GB (3913/0/0) 62862345
3 home wm 1531 – 1658 1004.06MB (128/0/0) 2056320
4 root wm 1659 – 2934 9.77GB (1276/0/0) 20498940
5 unassigned wm 2935 – 3062 1004.06MB (128/0/0) 2056320
6 unassigned wu 0 0 (0/0/0) 0
7 unassigned wu 0 0 (0/0/0) 0
8 boot wu 0 – 0 7.84MB (1/0/0) 16065
9 unassigned wu 0 0 (0/0/0) 0

partition>

NOTE: 1.) You can also use the GUI utility for Liveupgrade under “/usr/sbin/lu”.
2.) Rollback is also very easy, Just check the outputs of “luactivate” it is explaining the rollback to previous state with older disk/slices.

Yogesh Raheja

Yogesh working as a Consultant in Unix Engineering by profession. And he has multiple years experience in Solaris, Linux , AIX and Veritas Administration. He has been certified for SCSA9, SCSA10, SCNA10, VXVM, VCS, ITILv3. He is very much passionate about sharing his knowledge with others. Specialties: Expertize in Unix/Solaris Server, Linux (RHEL), AIX, Veritas Volume Manager, ZFS, Liveupgrades, Storage Migrations, Cluster deployment (VCS and HACMP) and administration and upgrade on Banking, Telecom, IT Infrastructure, and Hosting Services.

27 Responses

  1. seema says:

    @yogesh … Thanks for the post !! can you please diffferenciate between OS patches,kernel patches and security patches ……? OR if you direct me to link will check on patches ….

    • Ramdev Ramdev says:

      @seema – as you know patching is nothing but fixing bugs in the code. kernel patches fixes the kernel related bugs and patching a kernel is mandatory for some kind of application related package installs. And they mostly need a system reboot.

      About security patches, these patches designed for fixing the security
      vulnerabilities in the operating system
      code. (example… it could fix a vulnerability in a simple command code , a vulnerability in memory Management)

      Either kernel patch or security patch, it will be treated as OS related patch.

  2. seema says:

    Ok Thank you !!!!!!

  3. Yogesh Raheja says:

    @Seema, I guess Ram has explained your query in the best and simplest way. Thanks Ram. Actually thats the reason OS Bundle patching is preferred bzu it includes kernel/security patches. Its needs lots of home work to add individual patches as each patch have there dependencies which indeed have there dependencies. So its bit difficult and tricky to install individual patches and Cluster Bundle is preferred. Hope this helps.

  4. seema says:

    Yes that was simple to understand Ramdev …. thanks a lot Yogesh !!!!

  5. Bob Orton says:

    After doing the equivalent procedure on a SunFire 480R (sparc) system the system panics when running “explorer”

    panic[cpu2]/thread=30008b3a0c0:
    free: freeing free block, dev:0x7600000001, block:26752, ino:2, fs:/.alt.tmp.b-M1.mnt

    Oracle Knowledge Base ID 1329401.1
    The solution is to pkgrm SUNWlucfg, SUNWlur, and SUNWluu, SUNWluzone

  6. Yogesh Raheja says:

    @Bob, Thats the reason I have mentioned that LU pkg needs to be at the latest level as per SUN’s recommendation because once I have faced the same crash while doing Sol.8 to Sol.10 upgrade. Thanks for sharing the Crash Thread.

  7. Bob Orton says:

    @Yogesh Raheja, Looks like the fix was Patch 121430-67: SunOS 5.8 5.9 5.10: Live Upgrade Patch released 14 days ago. I was previously at 121430-55.

  8. Sateesh says:

    good one remind my old work done in past. Thanks.

  9. Yigesh Raheja says:

    @Bob, okies. Thank you very much for your extensive research. Now we need to check the behaviour after installing this patch and then proceeding with upgrades via LU.

  10. Yigesh Raheja says:

    Its our pleasure @Sateesh.

  11. anuj says:

    Hi Yogesh,thanks for sharing live upgradation.Plz share the procedure if Our Root,var,usr file system in mirror through SVM. In that case how i’ll create my Boot Environment .

  12. seema says:

    Hello Yogesh how will i apply patches on Linux ?(RHEL) ….

  13. Ramdev Ramdev says:

    @Seema – in linux there is no specific patch management – everything goes through the regular package management tool like yum and rpm. for coming days, we will be focusing on linux in gurkulindia, you will find most of the related things in few days.

  14. Pratap says:

    Hi,

    I can see only upto assigning the cylinders to slice3 and slice 4. Can you please post the commands which is used to create boot environment and upgrading it. Thanks in advance.

  15. Yogesh Raheja says:

    @Pratap, check the post now. You will be able to see complete steps now.

  16. Kiran says:

    Clear cut procedure for LU…

    “I wish Human brains have LU or YUM :) “

  17. chandra says:

    Hi Ram,

    we are having issue in live upgrade from solaris 10 8/07 to solaris 10 9/10. we are able to create lucreate and luupgrade and able to boot with new BE without any issue. But getting lot of SMF service error on non-global zones. Not able to connect the non-globla zones from outside.
    As recommended by oracle we have applied patchset and all required patches but no luck. we also applied latest patch cluster. But still same issue with zones.

  18. Ramdev Ramdev says:

    Hi chandra, as per the Oracle, as of today there are around 20+ unsupported environments that doesn’t support the LU straight forward. And I will collect that information and post that sometime this week.

    By the way, I want to know more about  the errors you see in NGZ? like svcs -xv and errors from /var/log/messages, and boottime errors.

  19. chandra says:

    Please find the svcs -xv output from on NGZ

    —svcs-xv.out
    svc:/system/sysidtool:net (sysidtool)
    State: offline since Sat Mar 23 20:56:16 2013
    Reason: Start method is running.
    See: http://sun.com/msg/SMF-8000-C4
    See: man -M /usr/man -s 1M sysidtool
    See: /var/svc/log/system-sysidtool:net.log
    Impact: 38 dependent services are not running:
    svc:/network/rpc/bind:default
    svc:/network/nis/client:default
    svc:/network/service:default
    svc:/network/dns/client:default
    svc:/milestone/name-services:default
    svc:/system/webconsole:console
    svc:/system/filesystem/autofs:default
    svc:/system/system-log:default
    svc:/milestone/multi-user:default
    svc:/system/boot-config:default
    svc:/milestone/multi-user-server:default
    svc:/application/autoreg:default
    svc:/application/stosreg:default
    svc:/application/sthwreg:default
    svc:/application/graphical-login/cde-login:default
    svc:/application/cde-printinfo:default
    svc:/network/smtp:sendmail
    svc:/application/management/seaport:default
    svc:/application/management/sma:default
    svc:/network/sendmail-client:default
    svc:/network/ssh:default
    svc:/network/nfs/cbd:default
    svc:/network/nfs/client:default
    svc:/network/nfs/mapid:default
    svc:/network/inetd:default
    svc:/network/ntp:default
    svc:/system/cron:default
    svc:/network/nfs/nlockmgr:default
    svc:/network/nfs/status:default
    svc:/system/sysidtool:system
    svc:/milestone/sysconfig:default
    svc:/system/utmp:default
    svc:/system/console-login:default
    svc:/application/management/wbem:default
    svc:/system/sac:default
    svc:/system/postrun:default
    svc:/application/management/dmi:default
    svc:/system/filesystem/volfs:default

    svc:/network/rpc/gss:default (Generic Security Service)
    State: uninitialized since Sat Mar 23 20:55:34 2013
    Reason: Restarter svc:/network/inetd:default is not running.
    See: http://sun.com/msg/SMF-8000-5H
    See: man -M /usr/share/man -s 1M gssd
    Impact: 17 dependent services are not running:
    svc:/network/nfs/client:default
    svc:/system/filesystem/autofs:default
    svc:/system/webconsole:console
    svc:/system/system-log:default
    svc:/milestone/multi-user:default
    svc:/system/boot-config:default
    svc:/milestone/multi-user-server:default
    svc:/application/autoreg:default
    svc:/application/stosreg:default
    svc:/application/sthwreg:default
    svc:/application/graphical-login/cde-login:default
    svc:/application/cde-printinfo:default
    svc:/network/smtp:sendmail
    svc:/application/management/seaport:default
    svc:/application/management/sma:default
    svc:/network/sendmail-client:default
    svc:/network/ssh:default

    svc:/application/management/snmpdx:default (Sun Solstice Enterprise Master Agent)
    State: disabled since Sat Mar 23 20:55:35 2013
    Reason: Disabled by an administrator.
    See: http://sun.com/msg/SMF-8000-05
    See: man -M /usr/share/man/ -s 1M snmpdx
    Impact: 3 dependent services are not running:
    svc:/application/management/dmi:default
    svc:/milestone/multi-user-server:default
    svc:/application/autoreg:default

    svc:/application/print/server:default (LP print server)
    State: disabled since Sat Mar 23 20:55:34 2013
    Reason: Disabled by an administrator.
    See: http://sun.com/msg/SMF-8000-05
    See: man -M /usr/share/man -s 1M lpsched
    Impact: 1 dependent service is not running:
    svc:/application/print/ipp-listener:default

    svc:/network/rpc/smserver:default (removable media management)
    State: uninitialized since Sat Mar 23 20:55:39 2013
    Reason: Restarter svc:/network/inetd:default is not running.
    See: http://sun.com/msg/SMF-8000-5H
    See: man -M /usr/share/man -s 1M rpc.smserverd
    Impact: 1 dependent service is not running:
    svc:/system/filesystem/volfs:default

  20. chandra says:

    As suggest by the oracle we have applied patchset and also 2011 patch cluster. but still no luck, same issue is occurring even after applying the patches. oonly problem with NGZ. global is able to boot successfully without any smf error.

  21. chetantare says:

    Hi,
    i have performed live upgrade activity while performing live upgrade there no error came but after performing patch upgrade it show me following error
    “The patch add to the BE failed (with result code ).”
    NOTE: after completing live upgrade i didn’t took reboot. up gradation from S10U9 to S10U10. pls help me to slove this issue.

  22. Ramdev Ramdev says:

    Hi Chethan, is there any result code mentioned in the error?

  23. chetantare says:

    YES, the return code is “1”…..

  24. Tom says:

    Hi there,
    If the server contains other critical file systems like /usr /var /opt, how do i choose a slice to create a new boot environment according to your post?

    Filesystem size used avail capacity Mounted on
    /dev/dsk/c0t0d0s0 39G 20G 19G 52% /
    /devices 0K 0K 0K 0% /devices
    ctfs 0K 0K 0K 0% /system/contract
    proc 0K 0K 0K 0% /proc
    mnttab 0K 0K 0K 0% /etc/mnttab
    swap 17G 1.0M 17G 1% /etc/svc/volatile
    objfs 0K 0K 0K 0% /system/object
    sharefs 0K 0K 0K 0% /etc/dfs/sharetab
    /usr/lib/libc/libc_hwcap1.so.1
    39G 20G 19G 52% /lib/libc.so.1
    fd 0K 0K 0K 0% /dev/fd
    /dev/dsk/c0t0d0s3 34G 11G 23G 34% /var
    swap 512M 376K 512M 1% /tmp
    swap 17G 28K 17G 1% /var/run
    /dev/dsk/c0t0d0s4 79G 42G 36G 54% /opt
    /dev/dsk/c0t0d0s5 12G 8.2G 3.5G 71% /export/home

  1. September 16, 2015

    […] Read – Patching Using Live Upgrade […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us