To Activate a Boot Environment (Command-Line Interface)
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
Caution - Use only the init or shutdown commands to reboot. Do not use the reboot, halt, or uadmin commands or the system does not switch boot environments. The last active boot environment is booted again.
Example 33-4 Activating a Boot Environment (Command-Line Interface)
In this example, the second_disk boot environment is activated at the next reboot.
# /usr/sbin/luactivate second_disk # init 6 |
To Activate a Boot Environment and Synchronize Files (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 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 complete successfully, in spite of 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 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
Example 33-5 Activating a Boot Environment (Command-Line Interface)
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 |
Failure Recovery: Falling Back to the Original Boot Environment (Command-Line Interface)
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.
To Fall Back Despite Successful New Boot Environment Creation
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.
To Fall Back From a Failed Boot Environment Activation
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.
To Fall Back to the Original Boot Environment by Using a DVD, CD, or Net Installation Image
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.