Upgrade of Solaris 7 8/99 to Solaris 8 10/01
This is a log of a Solaris upgrade using LiveUpdate.The hardware is an Ultra 10 with a single 18GB disk in a Unipack attached to c1.
Solaris 7 8/99 was installed via JET; along with the Solaris 7 filesystems, some Solaris 8 filesystems were also created in the JET config for simplicity, so we have space for Solaris 8 later.
See the LiveUpgrade Index for details of the hardware and filesystem layouts, as well as the subsequent LiveUpgrade from Solaris 8 to Solaris 9.
It is possible for both BE's (Boot Environment, ie, operating system) to use the same swap slice, but in this instance, I have chosen to use a new swap slice in the Solaris 8 environment.
ultra10 console login: root Password: Last login: Thu Apr 22 18:44:21 from 192.168.1.101 Apr 22 19:43:03 ultra10 login: ROOT LOGIN /dev/console Sun Microsystems Inc. SunOS 5.7 Generic October 1998 # # # cat /etc/release Solaris 7 8/99 s998s_u3wos_11 SPARC Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. Assembled 30 July 1999 #On Solaris 7, cpio needs patch 108414 applied - this is not part of the 7_Recommended patch cluster, and is only available to contract customers.
You should also apply the Recommended patch cluster to the source OS before starting any LiveUpgrade process.
# patchadd 108414-06
Checking installed patches...
Verifying sufficient filesystem capacity (dry run method)...
Installing patch packages...
Patch number 108414-06 has been successfully installed.
See /var/sadm/patch/108414-06/log for details
Patch packages installed:
SUNWcsu
#
I have created three additional partitions - /newroot
,
/newvar
, and /newswap
- these partitions will be
used for the Solaris 8 environment.
It is possible to re-use the same swap slice, but in this instance, we
will be creating a new one.It is essential to unmount these filesystems, and take them out of
/etc/vfstab
.
# df -k Filesystem kbytes used avail capacity Mounted on /proc 0 0 0 0% /proc /dev/dsk/c1t0d0s0 12500068 702455 11672613 6% / fd 0 0 0 0% /dev/fd /dev/dsk/c1t0d0s5 1018191 66940 890160 7% /var /dev/dsk/c1t0d0s3 2056211 9 1994516 1% /newroot /dev/dsk/c1t0d0s4 494235 9 444803 1% /newswap /dev/dsk/c1t0d0s6 1018191 9 957091 1% /newvar swap 333136 16 333120 1% /tmp # umount /newroot # umount /newswap # umount /newvar # # cd /etc/ # grep -v "/new" vfstab > vfstab.sol7 # # diff vfstab vfstab.sol7 10,12d9 < /dev/dsk/c1t0d0s3 /dev/rdsk/c1t0d0s3 /newroot ufs 2 yes - < /dev/dsk/c1t0d0s4 /dev/rdsk/c1t0d0s4 /newswap ufs 2 yes - < /dev/dsk/c1t0d0s6 /dev/rdsk/c1t0d0s6 /newvar ufs 2 yes - # cp vfstab vfstab.orig # cp vfstab.sol7 vfstabCertain packages are required on the Solaris 7 system - these are not in the SUNWCreq install cluster, but are in the SUNWCXall cluster.
If upgrading from Solaris 8, SUNWbzip is also required.
# pkginfo SUNWadmap system SUNWadmap System administration applications # pkginfo SUNWadmc system SUNWadmc System administration core libraries # pkginfo SUNWlibC system SUNWlibC Sun Workshop Compilers Bundled libC # pkginfo SUNWadmfw system SUNWadmfw System & Network Administration FrameworkI shall be sharing the Solaris 8 CD's over NFS; having more than one CD means that the Curses interface,
lu
cannot be used. If you
really want to use the Curses interface instead of the command line, then
you will need a Jumpstart-style image available, or a DVD, not two seperate CDs.You don't need them both mounted at once; I'm just doing this for simplicity. You can insert the appropriate CD at the right time.
You'll need CD2 first (for the LiveUpgrade packages), then CD1 (for the initial upgrade) then CD2 again (to complete the upgrade).
# mount 192.168.1.113:/sol8/cd1 /sol8/cd1 # mount 192.168.1.113:/sol8/cd2 /sol8/cd2Now we need to add the Solaris 8 10/01 LiveUpgrade packages.
This is important - add the packages from the OS you are going to upgrade to, not from.
If you are upgrading from Solaris 8, you may need to remove the existing
SUNWlur
and SUNWluu
packages before adding
them from your target release of Solaris (eg, 9 or 10).This screenshot takes up a lot of space, but all that it means is:
Install
SUNWluu
and SUNWlur
from the 2nd CD.
# cd /sol8/cd2 # cd Solaris_8/EA/products/Live_Upgrade_2.0/sparc/Packages # pkgadd -d . The following packages are available: 1 SUNWdelu German Localisable Live Upgrade (sparc) 11.9,REV=2001.08.21.16.49 2 SUNWeslu Spanish Localisable Live Upgrade (sparc) 11.9,REV=2001.08.21.16.50 3 SUNWfrlu French Localisable Live Upgrade (sparc) 11.9,REV=2001.08.21.16.49 4 SUNWitlu Italian Localisable Live Upgrade (sparc) 11.9,REV=2001.08.21.16.50 5 SUNWlur Live Upgrade 2.0 10/01 (root) (sparc) 11.8,REV=2001.08.08.14.22 6 SUNWluu Live Upgrade 2.0 10/01 (usr) (sparc) 11.8,REV=2001.08.22.12.53 7 SUNWsvlu Swedish Localisable Live Upgrade (sparc) 11.9,REV=2001.08.21.16.51 Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]: 5,6 Processing package instance <SUNWlur> from <sol8/cd2/Solaris_8/EA/products/Live_Upgrade_2.0/sparc/Packages> Live Upgrade 2.0 10/01 (root) (sparc) 11.8,REV=2001.08.08.14.22 Copyright 2001 Sun Microsystems, Inc. All rights reserved. Using </> as the package base directory. ## Processing package information. ## Processing system information. 1 package pathname is already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. The following files are already installed on the system and are being used by another package: /etc/default <attribute change only> /etc/init.d <attribute change only> /etc/rc0.d <attribute change only> /etc/rc1.d <attribute change only> /etc/rc2.d <attribute change only> /sbin <attribute change only> Do you want to install these conflicting files [y,n,?,q] y ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of <SUNWlur> [y,n,?] y Installing Live Upgrade 2.0 10/01 (root) as <SUNWlur> ## Executing preinstall script. ## Installing part 1 of 1. 1369 blocks /etc/lu/optfs /etc/lu/synclist [ verifying class <AddNoUpdate> ] Installing /etc/default/lu [ verifying class <EtcDefLu> ] ## Executing postinstall script. ========================================================================= IMPORTANT NOTICE The latest Solaris Recommended Patch Cluster for SunOS 5.7 for the sparc platform must be installed on this system prior to running Live Upgrade. The latest Solaris recommended Patch Cluster brings the system up to the currently-supported release level. Live Upgrade may fail to work properly if the latest Solaris Recommended Patch Cluster is not installed on this system. ========================================================================= Installation of <SUNWlur> was successful. Processing package instance <SUNWluu> from <sol8/cd2/Solaris_8/EA/products/Live_Upgrade_2.0/sparc/Packages> Live Upgrade 2.0 10/01 (usr) (sparc) 11.8,REV=2001.08.22.12.53 Copyright 2001 Sun Microsystems, Inc. All rights reserved. Using </> as the package base directory. ## Processing package information. ## Processing system information. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. The following files are already installed on the system and are being used by another package: /usr <attribute change only> /usr/lib <attribute change only> /usr/sbin <attribute change only> Do you want to install these conflicting files [y,n,?,q] y ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of <SUNWluu> [y,n,?] y Installing Live Upgrade 2.0 10/01 (usr) as <SUNWluu> ## Installing part 1 of 1. 1923 blocks ## Executing postinstall script. ========================================================================= IMPORTANT NOTICE The latest Solaris Recommended Patch Cluster for SunOS 5.7 for the sparc platform must be installed on this system prior to running Live Upgrade. The latest Solaris recommended Patch Cluster brings the system up to the currently-supported release level. Live Upgrade may fail to work properly if the latest Solaris Recommended Patch Cluster is not installed on this system. ========================================================================= Installation of <sunwluu> was successful. The following packages are available: 1 SUNWdelu German Localisable Live Upgrade (sparc) 11.9,REV=2001.08.21.16.49 2 SUNWeslu Spanish Localisable Live Upgrade (sparc) 11.9,REV=2001.08.21.16.50 3 SUNWfrlu French Localisable Live Upgrade (sparc) 11.9,REV=2001.08.21.16.49 4 SUNWitlu Italian Localisable Live Upgrade (sparc) 11.9,REV=2001.08.21.16.50 5 SUNWlur Live Upgrade 2.0 10/01 (root) (sparc) 11.8,REV=2001.08.08.14.22 6 SUNWluu Live Upgrade 2.0 10/01 (usr) (sparc) 11.8,REV=2001.08.22.12.53 7 SUNWsvlu Swedish Localisable Live Upgrade (sparc) 11.9,REV=2001.08.21.16.51 Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]: q # cd /Now we are ready to create the new filesystems and copy the existing OS partitions to the new filesystems.
This involves:
- Creating a "solaris7" BE for the existing system, with its filesystem mounts (this is why it is essential to umount any other filesystems before running this command; anything currently mounted is taken as being part of this OS and cannot be part of the new OS)
- Creating a "solaris8" BE for the new system
- Creating filesystems for the "solaris8" BE
- Copying the existing ("solaris7") OS to the new ("solaris8") filesystems
The syntax for
lucreate
is:
-c solaris7
lucreate will create a BE called "solaris7"-m /:/dev/dsk/c1t0d0s3:ufs
This is a colon-delimited list of mountpoint:device:filesystem.
Repeat for every filesystem (or swap slice) you want created for the new OS.-n solaris 8
The new BE will be called "solaris8"
-c
flag is not required if you have already defined a name for the
existing boot envionment, but typically this is not the case. You can
check with the lustatus
command.NOTE: Any filesystems you specify here will be newfs'd
# lucreate -c solaris7 -m /:/dev/dsk/c1t0d0s3:ufs \
-m /var:/dev/dsk/c1t0d0s6:ufs -m -:/dev/dsk/c1t0d0s4:swap -n solaris8
Please wait while your system configuration is determined.
No name for Current BE.
Current BE is named <solaris7>
Creating initial configuration for primary BE <solaris7>
PBE configuration successful: PBE name <solaris7> PBE Boot Device <dev/dsk/c1t0d0s0>.
Determining what file systems should be in the new BE.
Searching /dev for possible BE filesystem devices
Please wait while the configuration files are updated.
Please wait. Configuration validation in progress...
********************************************************************************
Beginning process of creating Boot Environment <solaris8>.
No more user interaction is required until this process is complete.
********************************************************************************
Setting BE <solaris8> state to Not Complete.
Creating file systems on BE <solaris8>.
Creating <ufs> file system on <dev/dsk/c1t0d0s3>.
/dev/rdsk/c1t0d0s3: 4198392 sectors in 891 cylinders of 19 tracks, 248 sectors
2050.0MB in 41 cyl groups (22 c/g, 50.62MB/g, 8256 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 103952, 207872, 311792, 415712, 519632, 623552, 727472, 831392, 935312,
1039232, 1143152, 1247072, 1350992, 1454912, 1558832, 1662752, 1766672,
1870592, 1974512, 2078432, 2182352, 2286272, 2390192, 2494112, 2598032,
2701952, 2805872, 2909792, 3013712, 3117632, 3221552, 3317280, 3421200,
3525120, 3629040, 3732960, 3836880, 3940800, 4044720, 4148640,
Creating <ufs> file system on <dev/dsk/c1t0d0s6>.
/dev/rdsk/c1t0d0s6: 2101552 sectors in 446 cylinders of 19 tracks, 248 sectors
1026.1MB in 23 cyl groups (20 c/g, 46.02MB/g, 11200 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 94528, 189024, 283520, 378016, 472512, 567008, 661504, 756000, 850496,
944992, 1039488, 1133984, 1228480, 1322976, 1417472, 1511968, 1606464,
1700960, 1795456, 1889952, 1984448, 2078944,
Mounting file systems for BE <solaris8>.
Calculating required sizes of file systems for BE <solaris8>.
Populating file systems on BE <solaris8>.
Copying file system contents to BE <solaris8>.
INFORMATION: Setting asynchronous flag on ABE <solaris8> mount point <alt.2708/var>
file system type <ufs>.
INFORMATION: Setting asynchronous flag on ABE <solaris8> mount point <alt.2708/>
file system type <ufs>.
Copying of file system / directory </var> is in progress...
Copying of file system / directory </var> completed successfully.
Copying of file system / directory </> is in progress...
Copying of file system / directory </> completed successfully.
Creating compare database for file system </var>.
Creating compare database for file system </>.
Updating compare database on other BEs.
Updating compare database on BE <solaris8>.
Compare databases updated on all BEs.
Making Boot Environment <solaris8> bootable.
Making the ABE bootable.
Updating ABE's /etc/vfstab file.
The update of the vfstab file on the ABE succeeded.
Updating ABE's /etc/mnttab file.
The update of the mnttab file on the ABE succeeded.
Updating ABE's /etc/dumpadm.conf file.
The update of the dumpadm.conf file on the ABE succeeded.
Making the ABE <solaris8> bootable succeeded.
Setting BE <solaris8> state to Complete.
Creation of Boot Environment <solaris8> successful.
Creation of Boot Environment <solaris8> successful.
Mention of "ABE" here means "Alternate Boot Environment". "PBE" means "Primary Boot Environment".That has copied the existing OS to the new partitions. Let's have a look:
# mount /dev/dsk/c1t0d0s3 /mnt # ls /mnt 108414-06 devices lost+found noautoshutdown sbin 108414-06.zip etc mnt opt sol8 bin export newroot platform tmp cdrom kernel newswap proc usr dev lib newvar reconfigure var # cat /mnt/etc/release Solaris 7 8/99 s998s_u3wos_11 SPARC Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. Assembled 30 July 1999 # umount /mntNow we are ready to do the upgrade. This took just over one hour for the first CD.
# luupgrade -u -n solaris8 -s /sol8/cd1
Validating the contents of the media <sol8/cd1>.
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains <Solaris> version <8>.
The media contains patches for the product.
Locating upgrade profile template to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE <solaris8>.
Updating ABE's /etc/vfstab file.
The update of the vfstab file on the ABE succeeded.
Determining packages to install or upgrade for BE <solaris8>.
Performing the operating system upgrade of the BE <solaris8>.
CAUTION: Interrupting this process may leave the boot environment unstable
or unbootable.
This stage took around one hour, then continued:
The operating system upgrade completed. Adding operating system patches to the BE <solaris8>. The operating system patch installation completed. INFORMATION: <var/sadm/system/logs/upgrade_log> contains a log of the upgrade operation. INFORMATION: <var/sadm/system/data/upgrade_cleanup> contains a log of cleanup operations required. WARNING: <178> packages still need to be installed. INFORMATION: <var/sadm/system/data/packages_to_be_added> contains a log of packages that need to be added that were not present on the volume of the media being upgraded to. INFORMATION: Please review the above listed files on BE <solaris8> to determine if any additional cleanup work is required, or installers on additional volumes of the media being upgraded to need to be run, before activating the BE. The Live Upgrade of the BE <solaris8> is completed.That was around one hour. Now we need CD2. This is about half an hour.
This is the part the Curses CUI can't deal with; we need to use the command line for a multi-CD upgrade.
The syntax for
luupgrade
is:
-i
Indicates that this is an additional CD-n solaris8
Specifies the BE to be upgraded-s /sol8/cd2
Specifies the source CD-O -nodisplay
Required for a non-graphical upgrade.
# luupgrade -i -n solaris8 -s /sol8/cd2 -O -nodisplay
Validating the contents of the media <sol8/cd2>.
The media is a standard Solaris media.
The media contains a standard Solaris installer.
The media contains <Solaris_2_of_2> version <8>.
Mounting BE <solaris8>.
Running installer on BE <solaris8>.
Installing Solaris 8 Software 2
|-1%--------------25%-----------------50%-----------------75%--------------100%|
Installation details:
Product Result More Info
1. Solaris 8 Software 2 Installed Available
2. Done
Enter the number corresponding to the desired selection for more
information, or enter 2 to continue [2]:
End of Solaris 8 Software 2 installation.
<Press ENTER to continue>
Unmounting BE <solaris8>.
The installer run on BE <solaris8> completed.
We can now check the status - our new BE should be "Complete".
# lustatus
BE_name Complete Active ActiveOnReboot CopyStatus
------------------------------------------------------------------------
solaris7 yes yes yes -
solaris8 yes no no -
We could leave this here for a week, now, if we wanted.We can activate the new OS whenever we like.
luactivate solaris8
will activate the Solaris 8 BE. Then
reboot with either init
or shutdown
- using
the reboot
command will not work as it does not call all
the shutdown scripts required for LiveUpgrade.
# luactivate solaris8 ******************************************************************************** The target boot environment has been activated. It will be used when you reboot. NOTE: You must use either init or shutdown when you reboot. If you do not use one of these commands, 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. Enter the PROM monitor (ok prompt). 2. Boot the machine to Single User mode using a different boot device (like the Solaris Install CD or Network). Examples: At the PROM monitor (ok prompt): For boot to Solaris CD: boot cdrom -s For boot to network: boot net -s 3. Mount the Current boot environment root slice to some directory (like /mnt). You can use the following command to mount: mount -Fufs /dev/dsk/c1t0d0s0 /mnt 4. Run <luactivate> utility with out any arguments from the current boot environment root slice, as shown below: /mnt/sbin/luactivate 5. luactivate, activates the previous working boot environment and indicates the result. 6. Exit Single User mode and reboot the machine. ******************************************************************************** Activation of boot environment <solaris8> successful. # # lustatus BE_name Complete Active ActiveOnReboot CopyStatus ------------------------------------------------------------------------ solaris7 yes yes no - solaris8 yes no yes -So now we can reboot (must use either
init
or shutdown
to reboot)
# cd / # shutdown -i6 -g0 -y Shutdown started. Thursday April 22 22:16:33 BST 2004 Changing to init state 6 - please wait Broadcast Message from root (console) on ultra10 Thu Apr 22 22:16:33... THE SYSTEM ultra10 IS BEING SHUT DOWN NOW ! ! ! Log off now or risk your files being damaged # INIT: New run level: 6 The system is coming down. Please wait. System services are now being stopped. Print services stopped. Apr 22 22:16:45 ultra10 syslogd: going down on signal 15 Live Upgrade: Deactivating current boot environment <solaris7>. Live Upgrade: Executing Stop procedures for boot environment <solaris7>. Live Upgrade: Current boot environment is <solaris7>. Live Upgrade: New boot environment will be <solaris8>. Live Upgrade: Activating boot environment <solaris8>. Live Upgrade: Updating partition ID tag on boot environment <solaris8> device <dev/rdsk/c1t0d0s2> to be root slice. fmthard: New volume table of contents now in place. Live Upgrade: Updating boot loader for <SUNW,Ultra-5_10> on boot environment <solaris8> device <dev/rdsk/c1t0d0s3> to match OS release. Live Upgrade: The boot device for boot environment <solaris8> will be <dev/dsk/c1t0d0s3>. Live Upgrade: Changing primary boot device to boot environment <solaris8>. Live Upgrade: The current boot environment <solaris7> boots from device <pci@1f,0/pci@1/pci@1/SUNW,isptwo@4/sd@0,0:a /pci@1f,0/pci@1/pci@1/SUNW,isptwo@4/sd@0,0:d>. Live Upgrade: The new boot environment <solaris8> boots from device <pci@1f,0/pci@1/pci@1/SUNW,isptwo@4/sd@0,0:d /pci@1f,0/pci@1/pci@1/SUNW,isptwo@4/sd@0,0:a>. Live Upgrade: Activation of boot environment <solaris8> completed. The system is down. INIT: failed write of utmpx entry:"s6" INIT: failed write of utmpx entry:"rb" syncing file systems... done rebooting... Resetting ... Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 440MHz), No Keyboard OpenBoot 3.25, 128 MB (60 ns) memory installed, Serial #13630801. Ethernet address 8:0:20:cf:fd:51, Host ID: 80cffd51. Rebooting with command: boot Boot device: /pci@1f,0/pci@1/pci@1/SUNW,isptwo@4/sd@0,0:d File and args: SunOS Release 5.8 Version Generic_108528-11 64-bit Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved. configuring IPv4 interfaces: hme0. Hostname: ultra10 Configuring /dev and /devices Configuring the /dev directory (compatibility devices) The system is coming up. Please wait. Live Upgrade: Synchronizing new boot environment. Live Upgrade: Previous boot environment was <solaris7>. Live Upgrade: Current boot environment is now <solaris8>. Configuring network interface addresses: hme0 hme1Now we go into a "sys-unconfig" type screen, which asks if we want Kerberos security. Answer this one question, and it continues booting Solaris 8.
starting rpc services: rpcbind keyserv done. Setting netmask of hme0 to 255.255.255.0 Setting default IPv4 interface for multicast: add net 224.0/4: gateway ultra10 syslog service starting. Print services started. volume management starting. The system is ready. ultra10 console login: root Password: Last login: Thu Apr 22 19:43:03 on console Apr 22 22:21:23 ultra10 login: ROOT LOGIN /dev/console Sun Microsystems Inc. SunOS 5.8 Generic February 2000 # cat /etc/release Solaris 8 10/01 s28s_u6wos_08a SPARC Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. Assembled 12 September 2001 # df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c1t0d0s3 2056211 882564 1111961 45% / /proc 0 0 0 0% /proc fd 0 0 0 0% /dev/fd mnttab 0 0 0 0% /etc/mnttab /dev/dsk/c1t0d0s6 1018191 9637 947463 2% /var swap 591760 0 591760 0% /var/run swap 591824 64 591760 1% /tmp # lustatus BE_name Complete Active ActiveOnReboot CopyStatus ------------------------------------------------------------------------ solaris7 yes no no - solaris8 yes yes yes -Job done. Now you're ready to start patching and configuring the new OS.
The End
...until we LiveUpgrade to Solaris 9Articles - Live Upgrade