man pages section 1M: System Administration Commands
  Sök endast i den här boken
Ladda ner denna bok i PDF (4505 KB)

luupgrade(1M)

NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | EXIT STATUS | FILES | ATTRIBUTES | SEE ALSO | WARNINGS

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, 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.

    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 ]

      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 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 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.

    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.

    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:


      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.

      -Opkgchk_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.

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

    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 following:


    # 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:


    # 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 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.


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 attributes:

     ATTRIBUTE TYPE ATTRIBUTE VALUE
     Availability SUNWluu

SEE ALSO

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 guarantee 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 Revised 22 Oct 2001

NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | EXIT STATUS | FILES | ATTRIBUTES | SEE ALSO | WARNINGS