|
| By Michal Pryc, with contributions from Marina Sum, March 2009 |
|
| |
Thanks to the
ZFS file system, you can efficiently create multiple system configurations, called boot environments (BEs), on the OpenSolaris Operating System (OS). In addition, you can use Package Manager, Update Manager, and the
pkg (1) command-line interface (CLI) to install, update, or delete software from the network-based repositories, also called publishers. In many cases, those tasks involve manipulation of BEs.
This article introduces an example BE set and describes how to manage BEs with Package Manager. For details on how to work with multiple BEs on the OpenSolaris OS, see the SDN article on that subject.
| |
Depending on your requirements, you can set up different sets of BEs in your OpenSolaris OS instance. Figure 1 shows an example set.
Figure 1:
Example Set of BEs
Click the image to enlarge it. |
| |
Each of the rectangles in Figure 1 can contain a different set of software. Clicking the Update All button in Package Manager or choosing Update All from Package Manager's Package menu updates all the software installed in the newly created (cloned) BE, but not the base BE, which stays the same.
Note: You can also perform the update-all task by clicking Update All in Update Manager or by executing the
pkg image-update command.
Furthermore, cloning a BE simply creates exactly the same system configuration as that of the cloned BE. You can then maintain many system configurations and boot to any of the BEs with GRand Unified Bootloader (GRUB). More importantly, this approach of updating or installing software is safe and secure.
To clone the BE that's running, type:
% pfexec beadm create
clone-BE-name
|
To clone a BE that's not currently running, type:
% pfexec beadm create -e
base-BE-name clone-BE-name
|
| |
You can start Package Manager and Update Manager in several ways:
gksu packagemanager & in a Terminal window.
Figure 2:
Five Ways to Start Package Manager
Click the image to enlarge it. |
gksu updatemanager & in a Terminal window.
if it's displayed in the notification area.
| |
| |
Figure 3:
" Not Enough Disk Space" Error Message
Click the image to enlarge it. |
Figure 4:
Manage Boot Environments Menu Item in Post-OpenSolaris 2008.11 Versions of Package Manager
Click the image to enlarge it. |
Figure 5:
Boot Environment Management Dialog Box
Click the image to enlarge it. |
Note the following:
Figure 6:
Prompt for Confirmation of BE Changes
Click the image to enlarge it. |
Figure 7:
Status Bar
Click the image to enlarge it. |
| |
Here's a nifty trick: To have the GRUB menu automatically select a BE and boot to it the next time you reboot the OpenSolaris OS, specify that BE as the default. You can always override the default BE by using the arrow keys to choose a different BE to reboot in the GRUB menu. See Figure 8.
Figure 8:
GRUB Menu
|
To change the default BE:
| |
You might encounter two typical types of problems while running Package Manager or Update Manager:
Figure 9:
BE Error Messages
|
BE_PRINT_ERR environment variable to
true. Browse the output for clues. See this example:
migi@opensolaris:~# BE_PRINT_ERR=true gksu /usr/bin/packagemanager be_get_uuid: failed to get uuid property from BE root dataset user properties. get_ver_from_capfile: failed to open file //rpool/boot/grub/capability with err Error 0 be_activate: failed to get grub versions from capability files. pkg: unable to activate opensolaris-2 |
pkg-discuss
or
install-discuss
discussion lists.
| |
| |
| |
