This chapter explains how to use Solaris Live Upgrade to upgrade and activate an inactive boot environment. It also explains how to recover from an activation failure. This chapter contains the following sections:
You can use Solaris Live Upgrade with menus or by using the command-line interface (CLI). Procedures are documented for both interfaces. These procedures do not exhaust the possibilities for using Solaris Live Upgrade. For more information about commands, see Chapter 36, Solaris Live Upgrade (Command Reference) for commands and the appropriate man pages, which more fully document the CLI.
Task |
Description |
For Instructions |
---|---|---|
Either upgrade a boot environment or install a Web Start Flash archive |
| |
Activate an inactive boot environment |
Makes changes effective and switches the inactive boot environment to active | |
(optional) Switch back if a failure occurs when activating |
Reactivates to the original boot environment if a failure occurs |
"Failure Recovery: Falling Back to the Original Boot Environment (Command-Line Interface)" |
Use the Upgrade menu or luupgrade command to upgrade a boot environment. This section provides the procedure for upgrading an inactive boot environment from files that are located on the following:
NFS server
Local file
Local tape
Local device, including DVD or CD
If the installation requires more than one CD, you must use the command-line interface procedure for upgrading. See "To Upgrade an Operating System Image From Multiple CDs (Command-Line Interface)".
When you upgrade a boot environment with the latest operating environment, you do not affect the active boot environment. The new files merge with the inactive boot environment critical file systems, but shareable file systems are not changed.
Rather than upgrading, if you have created a Web Start Flash archive, you could install the archive on an inactive boot environment. The new files overwrite the inactive boot environment critical file systems, but shareable file systems are not changed. See "Installing Web Start Flash Archives on a Boot Environment".
To upgrade or install a flash archive on a new boot environment, the device must be a physical slice. If you have a boot environment that has a file system that is mounted either on a Solaris Volume Manager metadevice or a Veritas file system (VxFS) volume, the upgrade or installation of a flash archive fails. To upgrade or install a flash archive on such a boot environment, you must manually change the boot environment so that all slices are physical disk slices. You could use the lucreate command to create another boot environment or you could break the metadevices or volumes.
To use the lucreate command to make a copy of the boot environment, you would place the boot environment copy on physical disk slices. For example, suppose your current boot environment's disk configuration contains the following volumes and slices.
root (/) |
Mounted on /dev/md/dsk/d10 |
/usr |
Mounted on /dev/md/dsk/d20 |
/var |
Mounted on /dev/dsk/c0t3d0s0 |
Free slice |
c0t4d0s0 |
Free slice |
c0t4d0s3 |
Free slice |
c0t4d0s4 |
You could then use the following lucreate command to copy the boot environment on physical disk slices. The boot environment could then be upgraded or be installed with a flash archive. In this example, the current boot environment is named, currentBE, and the new boot environment is named, nextBE.
# lucreate -s currentBE -n nextBE -m /:/dev/dsk/c0t4d0s0:ufs \ -m /usr:/dev/dsk/c0t4d0s3:ufs -m /var:/dev/dsk/c0t4d0s4:ufs |
You would then be able to upgrade or install a flash archive on the new boot environment, activate it, and then re-mirror or encapsulate it manually.
If you choose to manually break the metadevice or volume, you would need to do the following:
Manually mount the boot environment
Edit the /etc/vfstab file to change all metadevices or volumes to physical disk slices
Use the Solaris Volume Manager or Veritas software to tear down the metadevices or volumes
Unmount the boot environment
You can use Solaris Live Upgrade to add patches and packages to a system. As with upgrading a machine, by using Live Upgrade to add patches to a machine, the only downtime the system incurs is that of a reboot. You can add patches and packages directly to a boot environment with the luupgrade command. Or, you can apply patches and packages to a master system and apply a Web Start Flash archive of that system to a boot environment by using Live Upgrade.
To add patches to a boot environment directly, create a new boot environment and use the luupgrade command with the -t option. To add packages to a boot environment, use the luupgrade command with the -p option. For more information, see the man page, luupgrade(1M).
Or, you can use Solaris Live Upgrade to install a Web Start Flash archive that contains a complete copy of a boot environment with new packages and patches already included. This complete boot environment or single reference system is called a master system. The process of creating a Web Start Flash archive begins with creating a master system. After you have created a master system, add any patches and packages that you want to install. Then, create a Web Start Flash archive of the master system. Use Solaris Live Upgrade to install the archive on the new boot environment. You can copy the boot environment, change it, and distribute it as many times as necessary. For details about how to create a Web Start Flash archive, see Chapter 18, Creating Web Start Flash Archives (Tasks). For information on using Solaris Live Upgrade to install a Web Start Flash archive, see "Installing Web Start Flash Archives on a Boot Environment".
When upgrading and adding and removing packages or patches, Solaris Live Upgrade requires packages or patches that comply with the SVR4 advanced packaging guidelines. 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 during an upgrade to fail or worse, to alter the active boot environment.
For more information on adding and removing packages with Solaris Live Upgrade, see the man page, luupgrade(1M). For more information on packaging requirements, see Appendix C, Additional SvR4 Packaging Requirements (Reference).
To upgrade by using this procedure, you must use only one CD, a DVD, or a combined installation image. For an installation that requires more than one CD, you must use the procedure: "To Upgrade an Operating System Image From Multiple CDs (Command-Line Interface)".
From the Solaris Live Upgrade main menu, select Upgrade.
The Upgrade menu screen is displayed.
Type the new boot environment's name.
Type the path to where the Solaris installation image is located.
Installation Media Type |
Description |
---|---|
Network File System |
Specify the path to the network file system where the installation image is located. |
Local file |
Specify the path to the local file system where the installation image is located. |
Local tape |
Specify the local tape device and the position on the tape where the installation image is located. |
Local device, DVD, or CD |
Specify the local device and the path to the installation image. |
If you are using DVD or one CD, type the path to that disc, as in this example:
Package Media: /cdrom/solaris9/s0 |
If you have a combined image on the network, type the path to the network file system as in this example:
Package Media: /net/installmachine/export/solaris9/os_image |
To upgrade, press F3.
When the upgrade is completed, the main menu is displayed.
To upgrade by using this procedure, you must use only one CD, a DVD, or a combined installation image. If the installation requires more than one CD, you must use the procedure: "To Upgrade an Operating System Image From Multiple CDs (Command-Line Interface)".
Log in as superuser.
Indicate the boot environment to upgrade and the path to the installation software by typing:
# luupgrade -u -n BE_name -s os_image_path |
-u |
Upgrades an operating system image on a boot environment |
-n BE_name |
Specifies the name of the boot environment that is to be upgraded |
-s os_image_path |
Specifies the path name of a directory that contains an operating system image |
In this example, the second_disk boot environment is upgraded.
# luupgrade -u -n second_disk \ -s /net/installmachine/export/solaris9/OS_image |
If the operating system image resides on two or more CDs, use this upgrade procedure.
Log in as superuser.
Indicate the boot environment to upgrade and the path to the installation software by typing:
# luupgrade -u -n BE_name -s os_image_path |
-u |
Upgrades an operating system image on a boot environment |
-n BE_name |
Specifies the name of the boot environment that is to be upgraded |
-s os_image_path |
Specifies the path name of a directory that contains an operating system image |
When the installer is finished with the contents of the first CD, insert the second CD.
This step is identical to the previous step, but the -u option is replaced by the -i option. Also, choose to run the installer on the second CD with menus or with text.
This command runs the installer on the second CD with menus.
# luupgrade -i -n BE_name -s os_image_path |
This command runs the installer on the second CD with text and requires no user interaction.
# luupgrade -i -n BE_name -s os_image_path -O '-nodisplay -noconsole' |
-i |
Looks for an installation program on the specified medium and runs that program. The installer program is specified with -s. |
-n BE_name |
Specifies the name of the boot environment that is to be upgraded. |
-s os_image_path |
Specifies the path name of a directory that contains an operating system image. |
-O '-nodisplay -noconsole' |
(Optional) Runs the installer on the second CD in text mode and requires no user interaction. |
The boot environment is ready to be activated. See "Activating a Boot Environment".
In this example, the second_disk boot environment is upgraded and the installation image is on two CDs: the Solaris 9 Software 1 of 2 and the Solaris 9 Software 2 of 2 CDs. The -u option determines if sufficient space for all the packages is on the CD set. The -O option with the -nodisplay and -noconsole options prevents the character user interface from displaying after the reading of the second CD. If you use these options, you are not prompted to input information. Omit these options to display the interface.
Insert the Solaris 9 Software 1 of 2 CD and type:
# luupgrade -u -n second_disk -s /dev/cdrom/cdrom0/s0 |
Insert the Solaris 9 Software 2 of 2 CD and type:
# luupgrade -i -n second_disk -s /dev/cdrom/cdrom0 -O '-nodisplay \ -noconsole' |
Use the luupgrade command with the -i option to install any additional CDs.
This section provides the procedure for using Solaris Live Upgrade to install Web Start Flash archives that are stored on the following:
HTTP server
FTP server - Use this path from the command line only
NFS server
Local file
Local tape
Local device, including DVD or CD
For examples of the correct syntax for paths that are associated with archive storage, see "archive_location Keyword".
Installing a Web Start Flash archive overwrites all files on the new boot environment except for shared files.
To use the Web Start Flash installation feature, you need to have installed the master system and to have created the Web Start Flash archive. For more information about Web Start Flash, see Chapter 16, Web Start Flash Installation Feature (Topics).
To upgrade or install a flash archive on a new boot environment, the device must be a physical slice. If you have a boot environment that has a file system that is mounted either on a Solaris Volume Manager metadevice or a Veritas file system (VxFS) volume, the upgrade or installation of a flash archive fails. To upgrade or install a flash archive on such a boot environment, you must manually change the boot environment so that all slices are physical disk slices. You could use the lucreate command to create another boot environment or you could tear down the metadevices or volumes.
To use the lucreate command to make a copy of the boot environment, you would place the boot environment copy on physical disk slices. For example, suppose your current boot environment's disk configuration is the following:
root (/) |
Mounted on /dev/md/dsk/d10 |
/usr |
Mounted on /dev/md/dsk/d20 |
/var |
Mounted on /dev/dsk/c0t3d0s0 |
Free slice |
c0t4d0s0 |
Free slice |
c0t4d0s3 |
Free slice |
c0t4d0s4 |
You could then use the following lucreate command to copy the boot environment on physical disk slices. The boot environment could then be upgraded or be installed with a flash archive. In this example, the current boot environment is named currentBE and the new boot environment is named nextBE.
# lucreate -s currentBE -n nextBE -m /:/dev/dsk/c0t4d0s0:ufs \ -m /usr:/dev/dsk/c0t4d0s3:ufs -m /var:/dev/dsk/c0t4d0s4:ufs |
You would then be able to upgrade or install a flash archive on the new boot environment, activate it, and then re-mirror or encapsulate it manually.
If you choose to manually tear down the metadevice or volume, you would need to do the following:
Manually mount the boot environment
Edit the /etc/vfstab file to change all metadevices or volumes to physical disk slices
Use the Solaris Volume Manager or Veritas software to tear down the metadevices or volumes
Unmount the boot environment
From the Solaris Live Upgrade main menu, select Flash.
The Flash an Inactive Boot Environment menu is displayed.
Type the name of the boot environment where you want to install the Web Start Flash archive and the location of the installation media:
Name of Boot Environment: solaris_9 Package media: /net/install-svr/export/s9/latest |
Press F1 to add an archive.
An Archive Selection submenu displays an empty list, the name of a single archive, or a list of a number of archives. If more than one archive is listed, you have layered archives. For an explanation of layered archives, see "Installing Layered Web Start Flash Archives".
You can add and remove archives from the list. The following example shows an empty list.
Location - Retrieval Method <No Archives added> - Select ADD to add archives |
To install the list with no changes, proceed to Step 4.
If the Web Start Flash archives list is empty or contains an archive that you do not want to install, proceed to Step a.
You can add or remove archives.
Press F1 to add an archive to the list. Proceed to Step b.
If you have a list of more than one archive, you have layered archives. For more information, see "Installing Layered Web Start Flash Archives".
A Select Retrieval Method submenu is displayed.
HTTP NFS Local File Local Tape Local Device |
Press F2 to remove an archive from the list. Proceed to Step e.
On the Select Retrieval Method menu, select the location of the Web Start Flash archive.
Media Selected |
Prompt |
---|---|
HTTP |
Specify the URL and proxy information that is needed to access the Web Start Flash archive. |
NFS |
Specify the path to the network file system where the Web Start Flash archive is located. You can also specify the archive file name. |
Local file |
Specify the path to the local file system where the Web Start Flash archive is located. |
Local tape |
Specify the local tape device and the position on the tape where the Web Start Flash archive is located. |
Local device |
Specify the local device, the path to the Web Start Flash archive, and the type of file system on which the Web Start Flash archive is located. |
A Retrieval submenu is displayed, similar to the following example, which depends on the media you selected.
NFS Location: |
Type the path to the archive, as in the following example.
NFS Location: host:/path/to archive.flar |
Press F3 to add the archive to the list.
When the list contains the archives that you want to install, press F6 to exit.
Press F3 to install the archive or layered archives.
The Web Start Flash archive or layered archives are installed on the boot environment. All files on the boot environment are overwritten, except for shareable files.
The boot environment is ready for activation. See "To Activate a Boot Environment (Character Interface)".
Log in as superuser.
Type:
# luupgrade -f -n BE_name -s os_image_path -J 'profile' |
You must specify one of these options: -a, -j, or -J.
-f |
Indicates to upgrade an operating system from a flash archive. |
-n BE_name |
Specifies the name of the boot environment that is to be upgraded. |
-s os_image_path |
Specifies the path name of a directory that contains an operating system image. This directory can be on an installation medium, such as a DVD-ROM, CD-ROM, or it can be an NFS or UFS directory. |
-J 'profile' |
Entry from a JumpStart profile that is configured for a flash installation. See pfinstall(1M) and Chapter 21, Custom JumpStart Installation (Topics) for information on the JumpStart software. 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 Chapter 21, Custom JumpStart Installation (Topics) for information on the JumpStart software. You must specify one of -a, -j, or -J. |
-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. |
In this example, a flash archive is installed on the second_disk boot environment. The -J option is used to retrieve the archives. All files are overwritten on second_disk except shareable files.
# luupgrade -f -n second_disk \ -s /net/installmachine/export/solarisX/OS_image \ -J 'archive_location http://example.com/myflash.flar' |
Activating a boot environment makes it bootable on the next reboot of the system. You can also switch back quickly to the original boot environment if a failure occurs on booting the newly active boot environment. See "Failure Recovery: Falling Back to the Original Boot Environment (Command-Line Interface)".
To successfully activate a boot environment, that boot environment must meet the following conditions:
The boot environment must have a status of "complete." To check status, see "Displaying the Status of All Boot Environments".
If the boot environment is not the current boot environment, you cannot have mounted the partitions of that boot environment by using lumount(1M) or mount(1M).
The boot environment that you want to activate cannot be involved in a comparison operation. See "Comparing Boot Environments".
If you want to reconfigure swap, make this change prior to booting the inactive boot environment. By default, all boot environments share the same swap devices. To reconfigure swap, see "To Create a New Boot Environment," Step 9 or "To Create a Boot Environment and Reconfigure Swap (Command-Line Interface)".
The first time you boot from a newly created boot environment, Solaris Live Upgrade software synchronizes the new boot environment with the boot environment that was last active. The active boot environment is not necessarily the boot environment that was the source for the newly created boot environment. "Synchronize" here means that certain system files and directories are copied from the last-active boot environment to the boot environment being booted. Solaris Live Upgrade does not perform this synchronization after this initial boot, unless you type yes when asked the question "Do you want to force a Live Upgrade sync operations?"
If you force a synchronization, Solaris Live Upgrade checks for conflicts between files that are subject to synchronization. When the new boot environment is booted and a conflict is detected, a warning is issued and the files are not synchronized. Activation can be completed successfully, in spite of such a conflict. A conflict can occur if you, for example, do one of the following:
Upgrade the current boot environment to a new operating system
Upgrade an inactive boot environment to a new operating system and modify files on the original boot environment
Modify system files such as /etc/passwd on both the boot environments
Use this option with great care, because you might not be aware or in control of changes that might have occurred in the last-active boot environment. For example, if you were running Solaris 9 software on your current boot environment and booted back to a Solaris 2.6 release with a forced synchronization, files could be changed on the 2.6 release. Because files are dependent on the release of the operating environment, the boot to the Solaris 2.6 release could fail because the Solaris 9 files might not be compatible with the Solaris 2.6 files.
From the Solaris Live Upgrade main menu, select Activate.
Type the name of the boot environment to make active:
Name of Boot Environment: solaris_9 Do you want to force a Live Upgrade sync operations: no |
You can either continue or force a synchronization of files.
Press Return to continue.
The first time that the boot environment is booted, files are automatically synchronized.
You can force a synchronizaton of files, but use this feature with caution. Operating systems on each boot environment must be compatible with files that are being synchronized. To force a synchronization of files, type:
Do you want to force a Live Upgrade sync operations: yes |
Press F3 to begin the activation process.
Press Return to continue.
The new boot environment is activated at the next reboot.
To activate the inactive boot environment, reboot:
# init 6 |
Log in as superuser.
To activate the boot environment, type:
# /usr/sbin/luactivate BE_name |
BE_name |
Specifies the name of the boot environment that is to be activated |
Reboot.
# init 6 |
Use only the init or shutdown commands to reboot. If you use the reboot, halt, or uadmin commands, the system does not switch boot environments. The last active boot environment is booted again.
In this example, the second_disk boot environment is activated at the next reboot.
# /usr/sbin/luactivate second_disk # init 6 |
The first time you boot from a newly created boot environment, Solaris Live Upgrade software synchronizes the new boot environment with the boot environment that was last active. The active boot environment is not necessarily the boot environment that was the source for the newly created boot environment. "Synchronize" here means that certain system files and directories are copied from the last-active boot environment to the boot environment being booted. Solaris Live Upgrade does not perform this synchronization after this initial boot, unless you use the luactivate with the -s option.
If you force a synchronization with the -s option, luactivate checks for conflicts between files that are subject to synchronization. When the new boot environment is booted and a conflict is detected, a warning is issued and the files are not synchronized. Activation can be completed successfully, despite such a conflict. A conflict can occur if you, for example, do the following:
Upgrade the current boot environment to a new operating system
Upgrade an inactive boot environment to a new operating system and modify files on the original boot environment
Modify system files such as /etc/passwd on both the boot environments
Use this option with great care, because you might not be aware or in control of changes that might have occurred in the last-active boot environment. For example, if you were running Solaris 9 software on your current boot environment and booted back to a Solaris 2.6 release with a forced synchronization, files could be changed on the 2.6 release. Because files are dependent on the release of the operating environment, the boot to the Solaris 2.6 release could fail because the Solaris 9 files might not be compatible with the Solaris 2.6 files.
Log in as superuser.
To activate the boot environment, type:
# /usr/sbin/luactivate -s BE_name |
BE_name |
Specifies the name of the boot environment that is to be activated. |
-s |
Causes synchronization of files between the last-active boot environment and the new boot environment. The -s option is used to synchronize files after the first activation of a boot environment. The first time that a boot environment is activated, the files between the boot environment are synchronized, but with subsequent activations, the files are not synchronized. Use this option with great caution, because you might not be aware or in control of changes that might have occurred in the last-active boot environment. |
Reboot.
# init 6 |
In this example, the second_disk boot environment is activated at the next reboot and the files are synchronized.
# /usr/sbin/luactivate -s second_disk # init 6 |
If a failure is detected after upgrading or if the application is not compatible with an upgraded component, fall back to the original boot environment by using one of the following procedures, depending on your platform. The first procedure runs luactivate to switch back to the original boot environment. If the first procedure fails, use the second procedure to boot from a DVD-ROM, CD-ROM, or net image.
Use this procedure when you have successfully activated your new boot environment, but are unhappy with the results.
Log in as superuser.
Type:
# /usr/sbin/luactivate BE_name |
BE_name |
Specifies the name of the boot environment to be activated |
Reboot.
# init 6 |
The previous working boot environment becomes the active boot environment.
If you experience a failure while booting the new boot environment and can boot the original boot environment in single-user mode, use this procedure to fall back to the original boot environment.
If you need to boot from media or a net installation image, see "To Fall Back to the Original Boot Environment by Using a DVD, CD, or Net Installation Image".
At the OK prompt, boot the machine to single-user state from the Solaris 9 DVD, Solaris 9 Installation CD, the network, or a local disk:
OK boot cdrom -s |
or
OK boot net -s |
or
OK boot device_name -s |
device_name |
Specifies the name of devices from where the system can boot, for example /dev/dsk/c0t0d0s0 |
Type:
# /sbin/luactivate BE_name |
BE_name |
Specifies the name of the boot environment to be activated |
If this command fails to display a prompt, proceed to "To Fall Back to the Original Boot Environment by Using a DVD, CD, or Net Installation Image".
If the prompt is displayed, continue.
At the prompt, type:
Do you want to fallback to activate boot environment <disk name> (yes or no)? yes |
A message displays that the fallback activation is successful.
Reboot.
# init 6 |
The previous working boot environment becomes the active boot environment.
Use this procedure to boot from a DVD, CD, or a net installation image. You need to mount the root (/) slice from the last active boot environment. Then run the luactivate command, which makes the switch. When you reboot, the last active boot environment is up and running again.
At the OK prompt, boot the machine to single-user state from the Solaris 9 DVD, Solaris 9 Installation CD, the network, or a local disk:
OK boot cdrom -s |
or
OK boot net -s |
or
OK boot device_name -s |
device_name |
Specifies the name of the disk and the slice where a copy of the operating system resides, for example /dev/dsk/c0t0d0s0 |
If necessary, check the integrity of the file system for the fallback boot environment root (/).
# fsck device_name |
device_name |
Specifies the location of the root (/) file system on the disk device of the boot environment you want to fall back to. The device name is entered in the form of /dev/dsk/cnumtnumdnumsnum. |
Mount the active boot environment root (/) slice to some directory, such as /mnt:
# mount device_name /mnt |
device_name |
Specifies the location of the root (/) file system on the disk device of the boot environment you want to fall back to. The device name is entered in the form of /dev/dsk/cnumtnumdnumsnum. |
From the active boot environment root (/) slice, type:
# /mnt/sbin/luactivate |
luactivate activates the previous working boot environment and indicates the result.
Unmount /mnt
# umount /mnt |
Reboot.
# init 6 |
The previous working boot environment becomes the active boot environment.