Using Solaris Live Upgrade for the x86 (and SPARC) PlatformBy Alan DuBoff It is my hope that this document will encourage more people to use Sun's Solaris Live Upgrade software. Even though I'm writing here about the Solaris Operating System, x86 Platform Edition, the information is applicable to the SPARC Platform Edition as well. The Solaris Express program is now offered as an option for Sun's customers to gain early access to the next Solaris release. This program is updated every month. We highly encourage people to download and install these early releases so they will have access to new features coming in the Solaris OS. When we access early releases, we may start running into situations where we have two or three different environments that we might want to either test or develop on. Live Upgrade is a means to boot between these multiple environments. It upgrades the environment so that it will be as close as possible to what existed in the environment you copied from. Sun provides product documentation on http://docs.sun.com/, so you can reference that site for specific technical diagrams and various information. Example: Booting Between the Solaris 9 FCS and the Current Solaris Express ReleaseLet's start out simple. I have a system that I would like to boot between the Solaris 9 FCS release and the current Solaris Express release, which comes out every month. I'm going to partition a single 40-Gbyte disk on an x86 system to accomplish this. Live Upgrade will handle more than a single disk, but in the most basic case I want to demonstrate how a person with only a single disk can benefit from Live Upgrade, using the Solaris 9 OS and Solaris Express. Important note: It is not possible to do a downgrade. Downgrading is not supported by Sun tools, including Live Upgrade.Here's another reason we need to understand that there are no downgrades. All of the changes that you've made to your system, including file permission changes and file system changes, are moved to the new system. This will include symlinks you've changed, software you've installed, packages you've installed, and so on. As you might imagine, this could take quite some time, so in some cases it's best to copy a boot environment with as few changes done to it as possible, at least for time considerations. However, for convenience, it's certainly worth the time to have Live Upgrade copy those changes for you, creating the same environment you were using on a newer release of Solaris. This is of course the concept behind Live Upgrade. For the example we're going to create, see Figure 1, and refer to the example for one hard disk.This fits our scenario where we have three roots: one is our current release, and the other two are upgraded to Solaris Express builds. In this case, I would like to install Solaris 9 update 6 as the current release, and before we add many changes, create the second boot environment for the current release of Solaris Express. Later we'll create and update a future Solaris Express build.
Figure 1: Creating a Boot Environment -- Copying from root (/) to root (/) The example here of using two hard disks shows how you would incorporate Live Upgrade for that scenario. You may have three or more hard disks, and the roots can go on any of the slices within a Solaris partition.
I would like to point out that
I would also like to point out that What we should now have per Figure 1 is one large Solaris partition that has three root slices, one shared swap slice, and one shared export slice. Let's assume that we've partitioned our single 40-Gbyte drive as such. We gave 9 Gbyte for each root slice, 500 Mbyte for our swap partition, and the remaining 10-12 Gbyte for our shared export.
After the install described here, you should remove the additional root partitions if you have them loaded in your Installing Live Upgrade ToolsThe first thing you must do before using Live Upgrade is to install the latest Live Upgrade tools from the update release you're going to install. You can't go backward in releases, only forward, so the most recent Live Upgrade tools must be installed from the media that you are upgrading to. You can install the latest Live Upgrade tools by going to CD 2 of 2, and executing the installer as follows:
This will install the latest utilities for you to use. You must install the latest Live Upgrade utilities before performing an upgrade. If the level of utilities is the same, WebStart should tell you that the same level is already installed. Alternatively, you can use the package commands directly to do this. First you remove the existing Live Upgrade packages: pkgrm SUNWluu SUNWlur Then you add the new Live Upgrade packages from the Solaris install media: pkgadd -d /cdrom/cdrom0/s2/Solaris_9/Product SUNWlur SUNWluu Creating Another Boot EnvironmentThe first thing you'll need to do is create another boot environment. The preferred way to use Live Upgrade is by means of the command-line interfaces: luactivate lucancel lucompare lucreate lucurr ludelete ludesc lufslist lumake lumount lurename lustatus luumount luupgrade
Manual pages in section 1M are available for each Live Upgrade command, as well as for Using the lu(1m) Interface with Solaris Live Upgrade
As root, execute the
Note: You should have taken out any mounts from your You can use the same swap you had, or another if you like. In most cases, people want to use the same swap. By default the same swap devices will be used unless one new swap device is specified, in which case only the new swap devices given will be used. The following instructions refer to using the lu(1M) command to access Live Upgrade. This command is deprecated and will not be supported in the future. Among other issues, lu(1M) only provides access to a subset of the total Live Upgrade functionality. Also, lu(1M) cannot be internationalized and only displays U.S. English text.
After you have selected the "/" partition (which includes Performing the Upgrade
After creating a second boot environment, it's finally time to perform the actual upgrade. As root, enter the
In the case where you use a network install image of Solaris (which can be created from the CDs), you'll need to point the package media to the directory in which you installed the network install. You could have installed it to any location (for example, you might have installed to
For the case where you use CD media, you'll first need to put in CD 1 of 2, and enter Using the Live Upgrade Command-Line InterfacesYou may also use the command-line utilities to perform these functions, and you could create a boot environment with: # lucreate -n S10_51 If you don't enter the disk to be used (as in the preceding example), a dialog box will provide valid choices for you to select from.
To create a new boot environment with the "/" file system on # lucreate -n S10_51 -m /:c1t0d0s0:ufs
To create a new boot environment with the "/" file system on the SVM mirror # lucreate -n S10_51 -m /:d10:mirror,ufs -m /:c1t0d0s0:attach -m /: c2t0d0s0:attachThen you can upgrade with the following command for the first CD: # luupgrade -u -n s10_51 -s /cdrom/cdrom0/s2 And then follow it up with the second CD: # luupgrade -i -n s10_51 -s /cdrom/cdrom0 -O "-nodisplay -noconsole" If you need to install language CDs, repeat the preceding command with each language CD required.
If you have a combined install image available on the network at # luupgrade -u -n s10_51 -s /net/server/export/s10_51/sparc Of course, there are many arguments you can pass on the command line if you wish to do so; please refer to the man pages or the online documentation to understand all of the correct ones. Activating the Boot EnvironmentNow that the boot environment has been upgraded to S10_51, only one small step remains. Activate it! For all practical purpose, let's say that I renamed my first boot environment to S9_U6, and the second boot environment was named S10_51. In this case S10_51 was live upgraded from S9_U6, and S9_U6 is still active. You can get a status by executing: # lustatus This should show your output as follows: Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status ---------------------- -------- ------ --------- ------ ---------- S9_U6 yes yes yes no - S10_51 yes no no yes - You can issue: # luactivate S10_51 # lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status ---------------------- -------- ------ --------- ------ ---------- S9_U6 yes yes no no - S10_51 yes no yes no -
After you issue the # init 6
If you do not use
Now that you have two boot environments, you can add a third by activating the boot environment you want to update from, creating another boot environment as outlined above, performing the upgrade as described above, and activating it along with Once you have done so, you will be able to activate any of the three boot environments. In this example, you might have: Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status ---------------------- -------- ------ --------- ------ ---------- S9_U6 yes yes yes no - S10_51 yes no no yes - S10_54 yes no no yes - I like to use this as our example, since it gives the user the option of activating S9_U6, the current release, or two different versions of Solaris Express. This way the user can have the most recent S9 MU (Maintenance Update), and continue to ping-pong the Solaris Express builds. In this example, when Solaris Express build 56 comes out, you can then rename or delete the S10_51 boot environment and create a S10_56 from the S10_54, and perform a Live Upgrade to the new build. Just keep in mind that you upgrade from whichever boot environment is active, so activate the one you want to perform Live Upgrade from before you execute the commands. Also, to be safe, always install the latest Live Upgrade utilities from the second CD. This will ensure that Live Upgrade works as planned. The number of boot environments you can have is unlimited. Each boot environment must have at least one disk partition assigned to it for the "/" file system. Practically, this means you can have up to seven boot environments per disk (eight slices minus one for slice "2" which may never be used).
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
|