Managing Multiple Boot Environments on Your System
A boot environment is a bootable instance of an OpenSolaris operating system image
plus any other application software packages installed into that image. You can maintain
multiple boot environments on your system, and each boot environment could have different
software versions installed.
Upon the initial installation of OpenSolaris onto your system, a boot environment is
created. Use the beadm(1M) utility to administer additional boot environments on your
Why Use Multiple Boot Environments?
With multiple boot environments, the process of updating software becomes a low risk
operation because you can create backup boot environments before making any software updates
to your system. If needed, you have the option of booting a
backup boot environment.
Here are some specific examples where having more than one OpenSolaris boot environment,
and managing them with the beadm utility, is useful:
When you use either the Package Manager tool or the pkg image-update command to update all the packages in your active OpenSolaris boot environment, this process automatically creates a clone of that boot environment. The packages are updated in the clone rather than in the original boot environment. After successfully completing the updates, the new clone is activated. Then, the clone will become the new default boot environment on the next reboot. The original boot environment remains on the GRUB menu as an alternate selection.
For more information, see Upgrading to the Next OpenSolaris Release.
You can use the beadm list command to see a list of all the boot environments on the system, including the backup boot environment that still has its original, unchanged software. If you are not satisfied with the updates made to the environment, you can use the beadm activate command to specify that the backup will become the default boot environment on the next reboot.
If you are modifying a boot environment, you can take a snapshot of that environment at any stage during modifications by using the beadm create command. A snapshot is a read-only image of a dataset or boot environment at a given point in time.
You can create custom names for each snapshot that identify when or why the snapshot was created. For example, if you are doing monthly upgrades to your boot environment, you can capture snapshots for each monthly upgrade. You can use the beadm list -s command to view the available snapshots for a boot environment.
A snapshot is not bootable. But, you can create a boot environment, based on that snapshot, by using the -e option for the beadm create command. Then you can use the beadm activatecommand to specify that this boot environment will become the default boot environment on the next reboot.
You can maintain more than one boot environment on your system, and perform various upgrades on each of them as needed. For example, you can clone a boot environment by using the beadm create command. A clone is a bootable copy of a boot environment. Then, you can install, test, and update different software packages on the original boot environment and on its clone.
Although only one boot environment can be active at a time, you can mount an inactive boot environment by using the beadm mount command. Then you can use the pkg image-update command with the -R option to update all the packages in that inactive, mounted environment. Or, use the pkg install packagename with the -R option to update specific packages on that environment.
How to Manage Boot Environments
You can manage the boot environments on your system either by using the
beadm command or by using the Package Manager.
The Package Manager is a GUI that enables you to install, update,
and manage packages on your installed system. If you use the Package Manager
to update all the packages on your system, a clone of the active
boot environment is created. This clone enables you to, if necessary, boot into
the boot environment state that existed before the update process was started.
In addition, starting with the OpenSolaris 2009.06 release, you can use the Package Manager to manage your
boot environments as follows:
You can delete old and unused boot environments, in order to make the disk space available.
You can change the default boot environment on your system.
You can activate a boot environment.
For instructions, see the online help that is available in the Package Manager.
The Package Manager is available on the Main Menubar of the desktop, for
both the OpenSolaris Live CD and the installed OpenSolaris 2009.06 system. From the
Main Menubar, select System > Administration > Package Manager. Or, select the Get
Software icon on the desktop.
The Package Manager, however, does not provide the full range of options for
managing your boot environments that is available by using the beadm command
as described in the following sections.
For complete instructions about managing boot environments, see Managing Boot Environments.. Or, see the
Chapter 11, Appendix C: beadm Command Reference.