The main advantages of Live upgrade is minimizing the downtime and providing the system admin to revert the original OS in case of any patching failure.
- lucreate to create a new boot environment.
- luupgrade to patch the new inactive boot environment.
- luactivate to activate the new boot environment.
SunOS x4200 5.10 Generic_142910-17 i86pc i386 i86pc
bash-3.00# echo |format
0. c1t0d0 <DEFAULT cyl 8921 alt 2 hd 255 sec 63> /pci@7b,0/pci1022,7458@11/pci1000,3060@2/sd@0,0
0. c1t0d0 <DEFAULT cyl 8921 alt 2 hd 255 sec 63> /pci@7b,0/pci1022,7458@11/pci1000,3060@2/sd@0,0
1. c1t1d0 <DEFAULT cyl 8921 alt 2 hd 255 sec 63> /pci@7b,0/pci1022,7458@11/pci1000,3060@2/sd@1,0
bash-3.00# cat /etc/release
Oracle Solaris 10 9/10 s10x_u9wos_14a X86
Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
Assembled 11 August 2010
If you disk is under SVM, remove it from SVM control and apply the patch on one disk, Here is the disk layout of my system
disk 1 Partition:
------------------
c1t0d0s0 /c1t0d0s1 swap
c1t0d0s2 backup
disk 2 partition:
--------------------
c1t1d0s0 /rootbackupc1t1d0s1 swap
c1t1d0s2 backup
The partition on second disk (/rootbackup) is same size as the root (/) partition and it must not appear in use in “/etc/vfstab”.
This example explains how to upgrade a Solaris 10 9/10 system to the Solaris 10 1/13 release.
Before upgrading, you must install the Solaris Live Upgrade packages from the release to which you are upgrading.
New capabilities are added to the upgrade tools, so installing the new packages from the target release is important.
1.Remove the old Live upgrade packages:
bash-3.00# pkgrm SUNWluu SUNWlur SUNWlucfg
Do not remove SUNWluzone and SUNWzoneu (Ignore the warning)
In this example, you will upgrade from Solaris 10 9/10 to Solaris 10 1/13, so you must get the Solaris Live Upgrade packages from the Solaris 10 1/13 DVD.
2. Install Live Upgrade package:
Insert Solaris DVD, then from “Solaris_10/Tools/Installers” directory, run the “liveupgrade20″ command.you can run the command without option “noconsole” and “nodisplay” if you want to display the GUI.
bash-3.00# cd /cdrom/sol-10-u11-ga-x86/Solaris_10/Tools/Installers/
Note:
-----------------------------------------------------------------------------------
In Case of ISO image
bash-3.00# lofiadm -a /share/iso/10/u11/x86/sol-10-u11-ga-x86-dvd.iso
bash-3.00# lofiadm
bash-3.00# mount -F hsfs /dev/lofi/1 /mnt
bash-3.00# cd /mnt/Solaris_10/Tools/Installers/
------------------------------------------------------------------------------------
bash-3.00# ./liveupgrade20 -noconsole -nodisplay
3. Verify Live Upgrade packages are installed
bash-3.00# pkginfo -l SUNWluu SUNWlur SUNWlucfg
4. Run the “lucreate” command to create a copy of the active boot environment.
bash-3.00# lucreate -c Sol10u9 -C /dev/dsk/c1t0d0s2 -m /:/dev/dsk/c1t1d0s0:ufs -m -:/dev/dsk/c1t1d0s1:swap -n Sol10u11
-c For naming current active boot environment. Since I’m running update 9. I’ve used Sol10u9.
-C current root disk. Normally lucreate finds it automatically. In case of SVM it might not be able to find out then you can specify the current active boot disk using this option.
-m For specifying where to create the alternative boot environment.
-n It’s the name for alternative boot environment. Since I’m going to put update 11. I’ve named it as Sol10u11.
And the output of the above command as follows...
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...
Analyzing system configuration.
No name for current boot environment.
Current boot environment is named <Sol10u9>.
Creating initial configuration for primary boot environment <Sol10u9>.
INFORMATION: No BEs are configured on this system.
The device </dev/dsk/c1t0d0s2> is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name <Sol10u9> PBE Boot Device </dev/dsk/c1t0d0s2>.
Updating boot environment description database on all BEs.
Updating system configuration files.
The device </dev/dsk/c1t1d0s0> is not a root device for any boot environment; cannot get BE ID.
Creating configuration for boot environment <Sol10u11>.
Source boot environment is <Sol10u9>.
Creating file systems on boot environment <Sol10u11>.
Creating <ufs> file system for </> in zone <global> on </dev/dsk/c1t1d0s0>.
Mounting file systems for boot environment <Sol10u11>.
Calculating required sizes of file systems for boot environment <Sol10u11>.
Populating file systems on boot environment <Sol10u11>.
Analyzing zones.
Mounting ABE <Sol10u11>.
Cloning mountpoint directories.
Generating file list.
Copying data from PBE <Sol10u9> to ABE <Sol10u11>.
100% of filenames transferred
Finalizing ABE.
Fixing zonepaths in ABE.
Unmounting ABE <Sol10u11>.
Fixing properties on ZFS datasets in ABE.
Reverting state of zones in PBE <Sol10u9>.
Making boot environment <Sol10u11> bootable.
Updating bootenv.rc on ABE <Sol10u11>.
File </boot/grub/menu.lst> propagation successful
Copied GRUB menu from PBE to ABE
No entry for BE <Sol10u11> in GRUB menu
Population of boot environment <Sol10u11> successful.
Creation of boot environment <Sol10u11> successful.
bash-3.00# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
Sol10u9 yes yes yes no -
Sol10u11 yes no no yes -
bash-3.00# lufslist -n Sol10u11
boot environment name: Sol10u11
Filesystem fstype device size Mounted on Mount Options
----------------------- -------- ------------ ------------------- --------------
/dev/dsk/c1t1d0s1 swap 542868480 - -
/dev/dsk/c1t1d0s0 ufs 72826629120 / -
bash-3.00# lufslist -n Sol10u9
boot environment name: Sol10u9
This boot environment is currently active.
This boot environment will be active on next system boot.
Filesystem fstype device size Mounted on Mount Options
----------------------- -------- ------------ ------------------- --------------
/dev/dsk/c1t0d0s1 swap 542868480 - -
/dev/dsk/c1t0d0s0 ufs 72826629120 /
bash-3.00# luupgrade -u -n Sol10u11 -s /cdrom/cdrom0
Note:
-------------------------------------------------------------------------------
In case of ISO image
bash-3.00#luupgrade -u -n Sol10u11 -s /mnt
If you get an error related to auto-registration, please do as follows
bash-3.00# echo "autoreg=disable" > /var/tmp/no-autoreg
bash-3.00# regadm status
Solaris Auto-Registration is currently disabled
bash-3.00# luupgrade -u -n Sol10u11 -s /mnt -k /var/tmp/no-autoreg
-------------------------------------------------------------------------------
And the output of the above command as follows...
System has findroot enabled GRUB
No entry for BE <Sol10u11> in GRUB menu
Copying failsafe kernel from media.
64995 blocks
miniroot filesystem is <lofs>
Mounting miniroot at </mnt/Solaris_10/Tools/Boot>
###########################################################
NOTE: To improve products and services, Oracle Solaris communicates
configuration data to Oracle after rebooting.
You can register your version of Oracle Solaris to capture this data
for your use, or the data is sent anonymously.
For information about what configuration data is communicated and how
to control this facility, see the Release Notes or
www.oracle.com/goto/solarisautoreg.
INFORMATION: After activated and booted into new BE <Sol10u11>,
Auto Registration happens automatically with the following Information
autoreg=disable
###########################################################
Validating the contents of the media </mnt>.
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains <Solaris> version <10>.
Constructing upgrade profile to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE <Sol10u11>.
Checking for GRUB menu on ABE <Sol10u11>.
Saving GRUB menu on ABE <Sol10u11>.
Checking for x86 boot partition on ABE.
Determining packages to install or upgrade for BE <Sol10u11>.
Performing the operating system upgrade of the BE <Sol10u11>.
CAUTION: Interrupting this process may leave the boot environment unstable
or unbootable.
Upgrading Solaris: 100% completed
Installation of the packages from this media is complete.
Restoring GRUB menu on ABE <Sol10u11>.
Updating package information on boot environment <Sol10u11>.
Package information successfully updated on boot environment <Sol10u11>.
Adding operating system patches to the BE <Sol10u11>.
The operating system patch installation is complete.
ABE boot partition backing deleted.
ABE GRUB is newer than PBE GRUB. Updating GRUB.
GRUB update was successfull.
INFORMATION: The file </var/sadm/system/logs/upgrade_log> on boot
environment <Sol10u11> contains a log of the upgrade operation.
INFORMATION: The file </var/sadm/system/data/upgrade_cleanup> on boot
environment <Sol10u11> contains a log of cleanup operations required.
INFORMATION: Review the files listed above. Remember that all of the files
are located on boot environment <Sol10u11>. Before you activate boot
environment <Sol10u11>, determine if any additional system maintenance is
required or if additional media of the software distribution must be
installed.
The Solaris upgrade of the boot environment <Sol10u11> is complete.
Creating miniroot device
Configuring failsafe for system.
Failsafe configuration is complete.
Installing failsafe
Failsafe install is complete.
6. After finished on step 5, now time to activate the new environment.
bash-3.00# luactivate Sol10u11
bash-3.00# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
Sol10u9 yes yes no no -
Sol10u11 yes no yes no -
bash-3.00#init 6 (don't use reboot)
bash-3.00# uname -a
SunOS x4200 5.10 Generic_147148-26 i86pc i386 i86pc
bash-3.00# cat /etc/release
Oracle Solaris 10 1/13 s10x_u11wos_24a X86
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
Assembled 17 January 2013
Note:
-------------------------------------------------------------------------------------
init 6 will boot the system from disk1 . It should be with Solaris 10 u11 and you are good to go. If you’ve issues booting from 2nd disk due to some installation issues you can go back to original Boot environment ( Sol10u9 or boot disk0). Then mount the alternative boot environment /var file system and look for upgrade logs in file /var/sadm/system/logs/upgrade_log.
If boot disk1 is successful. You can reboot back to update 9 (disk 0) and apply the patches on Update 11 (disk1) as mentioned below.
Same way you can install the 10_Recommended patches to alternative boot environment. Solaris install_cluster has option -B for specifying alternative boot environment. Before jumping and applying patches we need to install pre-required patches on current active boot environment. You can do that using.
-------------------------------------------------------------------------------------
bash-3.00# ./installcluster --apply-prereq --s10patchset
Setup ....
Recommended OS Patchset Solaris 10 x86 (2015.03.13)
Application of patches started : 2015.03.18 10:32:50
Applying 120901-03 ( 1 of 11) ... skipped
Applying 121334-04 ( 2 of 11) ... skipped
Applying 119255-91 ( 3 of 11) ... success
Applying 119318-01 ( 4 of 11) ... skipped
Applying 121297-01 ( 5 of 11) ... skipped
Applying 138216-01 ( 6 of 11) ... skipped
Applying 147062-02 ( 7 of 11) ... success
Applying 148337-01 ( 8 of 11) ... success
Applying 146055-07 ( 9 of 11) ... success
Applying 142252-02 (10 of 11) ... success
Applying 125556-14 (11 of 11) ... success
Application of patches finished : 2015.03.18 10:33:35
Following patches were applied :
119255-91 148337-01 146055-07 142252-02 125556-14
147062-02
Following patches were skipped :
Patches already applied
120901-03 121334-04 119318-01 121297-01 138216-01
Installation of prerequisite patches complete.
Install log files written :
/var/sadm/install_data/s10x_rec_patchset_short_2015.03.18_10.32.50.log
/var/sadm/install_data/s10x_rec_patchset_verbose_2015.03.18_10.32.50.log
bash-3.00#
Now Install the 10_Recommended patches on inactive boot environment using -B option.
bash-3.00# ./installcluster -B Sol10u11 --s10patchset
Setup ....
Recommended OS Patchset Solaris 10 x86 (2015.03.13)
Application of patches started : 2015.03.18 10:54:00
Applying 120901-03 ( 1 of 367) ... skipped
Applying 121334-04 ( 2 of 367) ... skipped
Applying 119255-91 ( 3 of 367) ... success
Applying 119318-01 ( 4 of 367) ... skipped
Applying 121297-01 ( 5 of 367) ... skipped
Applying 138216-01 ( 6 of 367) ... skipped
Applying 147062-02 ( 7 of 367) ... success
Installation of patch set to alternate boot environment complete.
Please remember to activate boot environment Sol10u11 with luactivate(1M)
before rebooting.
bash-3.00# luactivate Solaris10u7
Recommended OS Patchset Solaris 10 x86 (2015.03.13)
Application of patches started : 2015.03.18 10:32:50
Applying 120901-03 ( 1 of 11) ... skipped
Applying 121334-04 ( 2 of 11) ... skipped
Applying 119255-91 ( 3 of 11) ... success
Applying 119318-01 ( 4 of 11) ... skipped
Applying 121297-01 ( 5 of 11) ... skipped
Applying 138216-01 ( 6 of 11) ... skipped
Applying 147062-02 ( 7 of 11) ... success
Applying 148337-01 ( 8 of 11) ... success
Applying 146055-07 ( 9 of 11) ... success
Applying 142252-02 (10 of 11) ... success
Applying 125556-14 (11 of 11) ... success
Application of patches finished : 2015.03.18 10:33:35
Following patches were applied :
119255-91 148337-01 146055-07 142252-02 125556-14
147062-02
Following patches were skipped :
Patches already applied
120901-03 121334-04 119318-01 121297-01 138216-01
Installation of prerequisite patches complete.
Install log files written :
/var/sadm/install_data/s10x_rec_patchset_short_2015.03.18_10.32.50.log
/var/sadm/install_data/s10x_rec_patchset_verbose_2015.03.18_10.32.50.log
bash-3.00#
bash-3.00# ./installcluster -B Sol10u11 --s10patchset
Setup ....
Recommended OS Patchset Solaris 10 x86 (2015.03.13)
Application of patches started : 2015.03.18 10:54:00
Applying 120901-03 ( 1 of 367) ... skipped
Applying 121334-04 ( 2 of 367) ... skipped
Applying 119255-91 ( 3 of 367) ... success
Applying 119318-01 ( 4 of 367) ... skipped
Applying 121297-01 ( 5 of 367) ... skipped
Applying 138216-01 ( 6 of 367) ... skipped
Applying 147062-02 ( 7 of 367) ... success
.
.
.
.
Installation of patch set to alternate boot environment complete.
Please remember to activate boot environment Sol10u11 with luactivate(1M)
before rebooting.
bash-3.00# luactivate Solaris10u7
I have a very old solaris 10 system u5..and I think I went thru the install(upgrade) to u11 without reading this page first! and now I am worried if I lost all the data! jeez!..it is in middle of copying/installing !
ReplyDelete