|
| luupgrade - installs, upgrades, and performs other functions on software on a boot environment |
SYNOPSIS
| /usr/sbin/luupgrade [-iIufpPtTcC] [options] |
|
The luupgrade command is part of a suite of commands that make up the Live Upgrade feature of the Solaris operating environment. See live_upgrade(5) for a description of the Live Upgrade feature.
The luupgrade command enables you to install software on a specified boot environment (BE). Specifically, luupgrade performs the following functions:
- Upgrades an operating system image on a BE (-u option). The source for the image can be any valid Solaris installation medium.
- Run an installer program to install software from an installation medium (-i option).
- Extract a flash archive onto a BE (-f option). (See flar(1M).)
- Add a package to (-p) or remove a package from (-P) a BE.
- Add a patch to (-t) or remove a patch from (-T) a BE.
- Check (-C) or obtain information about (-I) packages.
- Check an operating system installation medium (-c).
Before using luupgrade, you must have created a BE, using either the lucreate(1M) command or lu(1M), the FMLI-based user interface. You can upgrade only BEs other than the current BE.
The functions described in the preceding list each has its own set of options, which are described separately for each function.
Note that, for successful completion of an luupgrade operation, the status of a BE must be complete, as reported by lustatus(1M). Also, the BE must not have any
mounted disk slices, mounted either with lumount(1M) or mount(1M).
The luupgrade command requires root privileges.
Options that Apply to All Uses
|
The following options are available for all uses of luupgrade:
- -l error_log
- Error and status messages are sent to error_log, in addition to where they are sent in your current environment.
- -o outfile
- All command output is sent to outfile, in addition to where it is sent in your current environment.
- -N
- Dry-run mode. Enables you to determine whether your command arguments are correctly formed. Does not apply to the -c (check medium) function.
- -X
- Enable XML output. Characteristics of XML are defined in DTD, in /usr/share/lib/xml/dtd/lu_cli.dtd.<num>, where <num> is the version number of the DTD file.
|
Upgrading an Operating System Image
|
The luupgrade command uses -u to upgrade an operating system image. The syntax is as follows:
|
luupgrade -u -n BE_name -s os_image_path [ -j profile_path ]
[ -l error_log ] [ -o outfile ] [-N]
|
The first option, -u, indicates the function to perform--to install an OS image. The remaining options, shown above, are described as follows:
- -n BE_name
- Name of the BE to receive an OS upgrade.
- -s os_image_path
- Path name of a directory containing an OS image. This can be a directory on an installation medium such as a CD-ROM or can be an NFS or UFS directory.
- -j profile_path
- Path to a JumpStart profile. See pfinstall(1M) and the Solaris installation documentation
for information on the JumpStart software.
Note that if you are upgrading from a medium with multiple components, such as from multiple CDs, use luupgrade with the -i option, as described in the section below, to install software from the second and any following media.
|
Running an Installer Program
|
The luupgrade command uses -i to run an installer program. The syntax is as follows:
|
luupgrade -i -n BE_name -s installation_medium [ -N ]
[ -O "installer_options" ] [ -l error_log ] [ -o outfile ]
|
The first option, -i, indicates the function to perform--to run an installer program on the installation specified with -s. The remaining options, shown above, are described as follows:
- -n BE_name
- Name of the BE on which software is to be installed.
- -O "installer_options"
- Options passed directly to the Solaris installer program. See installer(1M)
for descriptions of the installer options.
- -s installation_medium
- Path name of an installation medium. This can be a CD, or an NFS or UFS directory.
With the -i option, luupgrade looks for an installation program on the specified medium and runs that program.
The -i option has a special use when you use the -u option, described above, to install software from a multiple-component medium, such as multiple CDs. See EXAMPLES.
|
Upgrading from a Flash Archive
|
The luupgrade command uses -f to upgrade an operating system from a flash archive. The syntax is as follows:
|
luupgrade -f -n BE_name -s os_image_path ( -a archive | -j profile_path
| -J "profile" ) [ -l error_log ] [ -o outfile ] [ -N ]
|
The first option, -f, indicates the function to perform--to upgrade an OS from a flash archive. The remaining options, shown above, are described as follows:
- -n BE_name
- Name of the BE to receive an OS installation.
- -s os_image_path
- Path name of a directory containing an OS image. This can be a directory on an installation medium, such as a CD-ROM, or can be an NFS or UFS directory.
- -a archive
- Path to the flash archive when the archive is available on the local file system. You must specify one of -a, -j, or -J.
- -j profile_path
- Path to a JumpStart profile that is configured for a flash installation. See pfinstall(1M)
and the Solaris installation documentation for information on the JumpStart software. You must specify one of -a, -j, or -J.
- -J "profile"
- Entry from a JumpStart profile that is configured for a flash installation. See pfinstall(1M)
and the Solaris installation documentation for information on the JumpStart software. You must specify one of -a, -j, or -J.
Note that the version of the OS image
specified with -a must be identical to the version of the
OS contained in the flash archive specified with
the -a, -j, or -J options.
|
Add or Remove Packages
|
The luupgrade command uses -p to add a package and -P to remove a package. The syntax is as follows:
For adding packages:
|
luupgrade -p -n BE_name -s packages_path [ -l error_log ][ -o outfile ]
[ -O "pkgadd_options" ] [ -a admin ] [ pkginst [ pkginst...]] [ -N ]
|
For removing packages:
|
luupgrade -P -n BE_name [ -l error_log ][ -o outfile ]
[ -O "pkgrm_options" ] [ pkginst [ pkginst...]] [ -N ]
|
The first option, -p, to add packages, or -P to remove packages, indicates the function to perform. The remaining options, shown above, are described as follows:
- -n BE_name
- Name of the BE to which packages will be added or from which packages will be removed.
- -s packages_path
- (For adding packages only.) Path name of a directory containing packages to add. You can substitute -d for -s. The -d support is for pkgadd(1M) compatibility.
- -d packages_path
- Identical to -s. Use of -s is recommended.
- -O "pkgadd_options" or "pkgrm_options"
- Options passed directly to pkgadd (for -p)
or pkgrm (for -P). See pkgadd(1M) and pkgrm(1M)
for descriptions of the options for those commands.
- -a admin
- (For adding packages only.) Path to an admin file. Identical to the pkgadd -a option. Use of the -a option here is identical to -O "-a admin"
-
pkginst [ pkginst... ]
- Zero or more packages to add or remove. For adding packages, the default is to add all of the packages specified with the -s option, above. Separate multiple package names
with spaces.
It is critically important that any packages you add be compliant with the SVR4 Advanced Packaging Guidelines. See WARNINGS, below.
|
Add or Remove Patches
|
The luupgrade command uses -t to add a patch and -T to remove a patch. The syntax is as follows:
For adding patches:
|
luupgrade -t -n BE_name -s patch_path [ -l error_log ][ -o outfile ]
[ -O "patchadd_options" ] [ patch_name [ patch_name...]] [ -N ]
|
For removing patches:
|
luupgrade -T -n BE_name [ -l error_log ][ -o outfile ]
[ -O "patchrm_options" ] [ patch_name [ patch_name...]] [ -N ]
|
The first option, -t, to add patches, or -T to remove patches, indicates the function to perform. The remaining options, shown above, are described as follows:
- -n BE_name
- Name of the BE to which patches will be added or from which patches will be removed.
- -s patch_path
- (For adding patches only.) Path name of a directory containing patches to add.
- -O "patchadd_options" or "patchrm_options"
- Options passed directly to patchadd (for -p)
or patchrm (for -P). See patchadd(1M) or patchrm(1M)
for a description of these options.
-
patch_name [ patch_name... ]
- Zero or more patches to add or remove. For adding patches, the default is to add all of the patches specified with the -s option, above. Separate multiple patch
names with spaces.
It is critically important that any patches you add be compliant with the SVR4 Advanced Packaging Guidelines. See WARNINGS, below.
|
Check or Return Information on Packages
|
Use the -C to perform a pkgchk(1M) on all or the specified packages on a BE. Use the -I option to perform a pkginfo(1).
For performing a pkgchk:
|
luupgrade -C -n BE_name [ -l error_log ][ -o outfile ]
[ -O "pkgchk_options" ][ pkginst [ pkginst...]] [ -N ]
|
For performing a pkginfo:
|
luupgrade -I -n BE_name [ -l error_log ][ -o outfile ]
[ -O "pkginfo_options" ][ pkginst [ pkginst...]] [ -N ]
|
The first option, -C, for pkgchk, or -I, for pkginfo, indicates the function to perform. The remaining options, shown above, are described as follows:
- -n BE_name
- Name of the BE on which packages will be checked or on whose packages information will be returned.
- -O "pkgchk_options" or "pkginfo_options"
- Options passed directly to pkgchk (for -C) or pkginfo (for -I).
See pkgchk(1M) or pkginfo(1) for a description
of these options.
-
pkginst [ pkginst... ]
- Zero or more packages to check or for which to have information returned. If you omit package names, luupgrade returns information on all of the packages on the BE.
Separate multiple package names with spaces.
|
Check an OS Installation Medium
|
With the -c option, luupgrade allows you to check that a local or remote medium, such as a CD, is a valid installation medium. The -c option returns useful information about the specified medium. The syntax for this use of luupgrade
is as follows:
|
luupgrade -c -s path_to_medium [ -l error_log ] [ -o outfile ]
|
The first option, -c, indicates the function to perform--to check on an installation medium. The -s option, shown above, is described as follows:
- -s path_to_medium
- Path name to an installation medium such as a CD-ROM.
|
|
| Example 1. Removing, then Adding Packages
|
The following example removes from then adds a set of packages to a boot environment.
|
# luupgrade -P -n second_disk SUNWabc SUNWdef SUNWghi
|
Now, to add the same packages:
|
# luupgrade -p -n second_disk -s /net/installmachine/export/packages \
SUNWabc SUNWdef SUNWghi
|
The following command adds the -O option to the preceding command. This option passes arguments directly to pkgadd.
|
|
# luupgrade -p -n second_disk -s /net/installmachine/export/packages \
-O "-r /net/testmachine/export/responses" SUNWabc SUNWdef SUNWghi
|
See pkgadd(1M) for a description of the options for that command. Example 2. Upgrading to a New OS from a Combined Image
|
The following example upgrades the operating environment on a boot environment. The source image is stored as a combined image on a remote disk or on a DVD.
|
# luupgrade -u -n second_disk \
-s /net/installmachine/export/solarisX/OS_image
|
Following the command above you could enter the command below to activate the upgraded BE.
Then, upon the next reboot, second_disk would become the current boot environment. See luactivate(1M).
|
Example 3. Upgrading to a New OS from Multiple CDs
|
The following example is a variation on the preceding. The OS upgrade resides on two CDs. To begin the upgrade on a SPARC machine, you enter:
|
# luupgrade -u -n second_disk -s /dev/cdrom/cdrom0/s0
|
On Intel Architecture (IA) machines, replace the s0 in the argument to -s with s2.
When the installer is finished with the contents of the first CD, insert the next CD in the drive and enter the following:
|
# luupgrade -i -n second_disk -s /dev/cdrom/cdrom0 \
-O "-nodisplay -noconsole"
|
Note the use of -i rather than -u in the preceding. Were there additional CDs, you would enter the same command as the one immediately above. The -O options, above, are passed to installer(1M). If you omit these options, a graphical interface is invoked following the insertion and reading of the second CD. See installer(1M) for
a description of the -O options.
Upon invocation of the first command (with -u) above, the installer command determines whether you have sufficient space on your target medium to hold the packages on all of the CDs in the set. This check takes into account packages that are being replaced by packages
of the same name.
Note that a multiple-CD upgrade is not complete until you have entered and completed luupgrade commands for all of the CDs in a set. Following installation of packages from a CD, you might receive a message such as:
|
WARNING: <num> packages must be installed on boot environment <disk_device>.
|
Such a message indicates the requirement that you install packages from one or more additional CDs, as in the example above. If you do not complete package installation, you will not be able to use luactivate to activate (designate for booting) the upgraded BE.
|
Example 4. Installing a New OS from a Flash Archive
|
The following example upgrades the operating environment on a boot environment, using a flash archive.
|
# luupgrade -f -n second_disk \
-s /net/installmachine/export/solarisX/OS_image \
-J "archive_location http://example.com/myflash.flar"
|
|
Example 5. Obtaining Information on Packages
|
The following example runs a pkgchk on the packages SUNWluu and SUNWlur, passing to pkgchk the -v option.
|
# luupgrade -C -n second_disk -O "-v" SUNWluu SUNWlur
|
The following command runs pkginfo on the same set of packages:
|
# luupgrade -I -n second_disk -O "-v" SUNWluu SUNWlur
|
For both commands, if the package names were omitted, luupgrade returns package information on all of the packages in the specified BE. See pkgchk(1M) and pkginfo(1) for a description of the options for those commands.
|
|
|
The following exit values are returned:
-
0
- Successful completion.
- >0
- An error occurred.
|
|
-
/etc/lutab
- list of BEs on the system
-
/usr/share/lib/xml/dtd/lu_cli.dtd.<num>
- Live Upgrade DTD (see -X option in "Options that Apply to All Uses," above)
|
|
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Availability | SUNWluu |
|
|
installer(1M), lu(1M), luactivate(1M), lucancel(1M), lucompare(1M), lucreate(1M), lucurr(1M), ludelete(1M), ludesc(1M), lufslist(1M), lumake(1M), lumount(1M), lurename(1M), lustatus(1M), lutab(4), attributes(5), live_upgrade(5)
|
|
For adding packages or patches (-p, -P, -t, or -T), luupgrade requires packages or patches that comply with the SVR4 Advanced Packaging Guidelines and the guidelines spelled out in Appendix C of the Solaris 9 Installation Guide. This means that the package or patch is compliant with the pkgadd(1M) or patchadd(1M) -R option, described in the man pages for those utilities. While nearly all Sun packages and patches conform to these guidelines, Sun cannot guarantee the conformance of packages and patches from third-party
vendors. Some older Sun packages and patches might not be -R compliant. If you encounter such a package or patch, please report it to Sun. A non-conformant package can cause the package- or patch-addition software in luupgrade to fail or, worse, alter the current BE.
|
| |