Skip Navigation Links | |
Exit Print View | |
Managing Boot Environments With Oracle Solaris 11 Express Oracle Solaris 11 Express 11/10 |
1. Introduction to Boot Environments
2. Using beadm Utility (Tasks)
Listing Existing Boot Environments and Snapshots
How to Display Information About Your Boot Environments, Snapshots, and Datasets
Taking a Snapshot of a Boot Environment
How to Create a Snapshot of a Boot Environment
How to Create a Boot Environment From an Existing Snapshot
Changing the Default Boot Environment
How to Activate an Existing Boot Environment
Mounting and Updating an Inactive Boot Environment
How to Mount a Boot Environment
How to Unmount an Existing Boot Environment
How to Destroy an Existing Boot Environment
Creating Custom Names for Boot Environments
If you want to create a backup of an existing boot environment, for example, prior to modifying the original boot environment, you can use the beadm command to create and mount a new boot environment that is a clone of your active boot environment. This clone is inactive and displays as an alternate in the GRUB menu for x86 systems or the boot menu for SPARC systems on reboot. The SPARC boot menu is located at /rpool/boot/menu.lst.
Note - When you create a new boot environment, the process first automatically takes a snapshot of the original boot environment, then the process makes a new clone that is derived from this snapshot. Both the new snapshot and the new clone are retained by the system.
$ beadm create beName
beName is a variable for the name of the new boot environment. This new boot environment is inactive.
Note - beadm create does not create a partial boot environment. The command either successfully creates a full boot environment, or the command fails.
$ beadm mount beName mountpoint
Note - If the directory for the mount point does not exist, the beadm utility creates the directory, then mounts the boot environment on that directory.
If the boot environment is already mounted, the beadm mount command fails and does not remount the boot environment at the newly specified location.
The boot environment is mounted, but remains inactive. You can upgrade a mounted, inactive boot environment.
Note - Unmount the boot environment before rebooting.
$ beadm activate beName
beName is a variable for the name of the boot environment to be activated.
On reboot, the newly active boot environment is displayed as the default selection in the x86 GRUB menu or the SPARC boot menu.
Note - The GRUB menu or boot menu always displays the most recently activated boot environment as the default.
Example 2-3 Creating a New, Cloned Boot Environment with Datasets (BE2)
The following example illustrates the datasets in a newly created boot environment.
Type the following command.
$ beadm create BE2
The original boot environment in this example is BE1. The new boot environment, BE2, contains separate datasets cloned from BE1. If BE1 contains separate datasets for traditional file systems, such as /var or /opt, then those datasets are also cloned.
rpool/ROOT/BE1 rpool/ROOT/BE1/usr rpool/ROOT/BE1/var rpool/ROOT/BE1/opt
rpool/ROOT/BE2 rpool/ROOT/BE2/usr rpool/ROOT/BE2/var rpool/ROOT/BE2/opt
rpool in this example is the name of the storage pool. The pool already exists on the system, previously set up by the initial installation or upgrade. ROOT is a special dataset that was also created previously by the initial installation or upgrade. ROOT is reserved exclusively for use by boot environment roots.
Example 2-4 Creating a New Boot Environment With Shared Datasets
The following example illustrates a newly-created boot environment that has shared datasets.
Shared datasets are user-defined directories, such as /export, that contain the same mount point in both the active and inactive boot environments. Shared datasets are located outside the root dataset area of each boot environment.
Type the following command.
$ beadm create BE2
The shared datasets, rpool/export and rpool/export/home, are not cloned when the boot environment is cloned. The shared datasets are located outside the rpool/ROOT/<BE> datasets and are referenced at their original locations by the cloned boot environment.
The original boot environment, BE1 and datasets are as follows:
rpool/ROOT/BE1 rpool/ROOT/BE1/usr rpool/ROOT/BE1/var rpool/ROOT/BE1/opt rpool/export rpool/export/home
The cloned boot environment, BE2, has new root datasets, but the original shared datasets, rpool/export and rpool/export/home, are unchanged.
rpool/ROOT/BE2 rpool/ROOT/BE2/usr rpool/ROOT/BE2/var rpool/ROOT/BE2/opt rpool/export rpool/export/home
By default, a new boot environment is created from the active boot environment. However, you can use the beadm create command to create a new boot environment that is based on an existing, inactive boot environment.
$ beadm create -e non-activeBeName beName
non-activeBeName is a variable for the existing inactive BE that is cloned by this command.
beName is the variable for the new BE name.
By default, the new boot environment is inactive.