luupgrade

 


 
 
 
 Maintenance Commands                                luupgrade(1M)
 
 
 


NAME

luupgrade - installs, upgrades, and performs other functions on software on a boot environment

SYNOPSIS

luupgrade [ -iIufpPtTcC ] [ options ]

DESCRIPTION

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, 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 opera- tion, 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. SunOS 5.8 Last change: 22 Oct 2001 1 Maintenance Commands luupgrade(1M) Options that Apply to All Uses The following options are available for all uses of luup- grade: -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. Upgrading an Operating System Image The syntax for this use of luupgrade 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 syntax for this use of luupgrade is as follows: luupgrade -i -n BE_name -s installation_medium [ -N ] [ -O "installer_options" ] [ -l error_log ] [ -o outfile ] SunOS 5.8 Last change: 22 Oct 2001 2 Maintenance Commands luupgrade(1M) 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 pro- gram. 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 pro- gram 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 syntax for this use of luupgrade 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 avail- able 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 SunOS 5.8 Last change: 22 Oct 2001 3 Maintenance Commands luupgrade(1M) -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. 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 pack- ages, 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 descrip- tions 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 SunOS 5.8 Last change: 22 Oct 2001 4 Maintenance Commands luupgrade(1M) specified with the -s option, above. Separate multiple package names with spaces. 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. 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: SunOS 5.8 Last change: 22 Oct 2001 5 Maintenance Commands luupgrade(1M) 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, indi- cates 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. " .nr )I pkgchk_options"n -O Options passed directly to pkgchk (for -C) or pkginfo (for -I). See pkgchk(1M) or pkginfo(1) for a descrip- tion of these options. pkginst [ pkginst... ] Zero or more packages to check or for which to have information returned. If you omit package names, luup- grade 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 installa- tion 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. EXAMPLES Example 1: Removing, then Adding Packages The following example removes 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 SunOS 5.8 Last change: 22 Oct 2001 6 Maintenance Commands luupgrade(1M) 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 The following example upgrades the operating environment on a boot environment. # 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. # luactivate second_disk 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, you enter: For SPARC machines: # luupgrade -u -n second_disk -s /dev/cdrom/cdrom0/s0 For 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 fol- lowing: # luupgrade -i -n second_disk -s /dev/cdrom/cdrom0 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. If you are connected to the machine you are upgrading by a tip(1) line, you must use the -O "-nodisplay" option, as shown below: SunOS 5.8 Last change: 22 Oct 2001 7 Maintenance Commands luupgrade(1M) # luupgrade -u -n second_disk -O "-nodisplay" -s /dev/cdrom/cdrom0/s0 or s2 for IA machines Insert next CD, then... # luupgrade -i -n second_disk -O "-nodisplay" -s /dev/cdrom/cdrom0 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 pack- ages: # luupgrade -I -n second_disk -O "-v" SUNWluu SUNWlur For both commands, if the package names were omitted, luup- grade 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. EXIT STATUS The following exit values are returned: 0 Successful completion. >0 An error occurred.

FILES

/etc/lutab list of BEs on the system

ATTRIBUTES

See attributes(5) for descriptions of the following attri- butes: SunOS 5.8 Last change: 22 Oct 2001 8 Maintenance Commands luupgrade(1M) ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWluu | |_____________________________|_____________________________|

SEE ALSO

lu(1M), luactivate(1M), lucancel(1M), lucompare(1M), lucreate(1M), lucurr(1M), ludelete(1M), lufslist(1M), lumake(1M), lumount(1M), lurename(1M), lustatus(1M), lutab(4), attributes(5), live_upgrade(5) WARNINGS For adding packages (-p), luupgrade requires packages that comply with the SVR4 Advanced Packaging Guidlelines. While Sun packages conform to these guidelines, Sun cannot guaran- tee the conformance of packages from third-party vendors. A non-conformant package can cause the package-addition software in luupgrade to fail or, worse, alter the current BE. SunOS 5.8 Last change: 22 Oct 2001 9