JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Creating and Administering Oracle Solaris 11 Boot Environments     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

1.  Introduction to Managing Boot Environments

2.  beadm Zones Support

3.  Creating Boot Environments and Snapshots

Creating a Boot Environment

beadm create Command Options

How to Create a Boot Environment

Examples of Creating Boot Environments

Creating and Copying Snapshots

Creating a Snapshot of a Boot Environment

Creating a Boot Environment From an Existing Snapshot

How to Create a Boot Environment From a Snapshot

4.  Administering Boot Environments

Creating a Boot Environment

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 listed as an alternate boot environment in the GRUB menu for x86 systems or in the boot menu for SPARC systems.

When you clone a boot environment by using the beadm create command, all supported zones in that boot environment are copied into the new boot environment.

beadm create Command Options

The beadm create command has the following options, where BeName specifies the name of the boot environment to be created.

Syntax: beadm create [-a] [-d description] [-e non-activeBeName | BeName@snapshot] [-o property=value]...[-p zpool] BeName

How to Create a Boot Environment

  1. Become the root role.
  2. Create the boot environment.
    # 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.


  3. (Optional) Use the beadm mount command to mount the new boot environment.
    # beadm mount BeName mount-point

    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.

  4. (Optional) Activate the boot environment.
    # 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.


Examples of Creating Boot Environments

The following examples illustrate how to create boot environments, and how the creation process varies depending on the zone and dataset structure.


Note - For zones and dataset information, see the following:


Example 3-1 Cloning a Boot Environment in a Global Zone That Contains Non-Global Zones

This example shows the zones impact of the beadm create command when cloning a boot environment that contains two non-global zones.

Become the root role, and perform the following command to clone the boot environment and name the new boot environment solaris-1:

# beadm create solaris-1

The root dataset for the new boot environment is at rpool/ROOT/solaris-1. The copy of zone z1 for the new boot environment has its root dataset at rpool/zones/z1/rpool/ROOT/solaris-1.

Example 3-2 Creating a New, Cloned Boot Environment with Datasets

This example illustrates how datasets are set up in a newly created boot environment.

Become the root role and 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, then those datasets are also cloned.

rpool/ROOT/BE1
rpool/ROOT/BE1/var
rpool/ROOT/BE2
rpool/ROOT/BE2/var

rpool in this example is the name of the storage pool. The pool was previously set up by the initial installation or upgrade and, therefore, already exists on the system. 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 3-3 Creating a New Boot Environment With Shared Datasets

This example illustrates a new boot environment that has shared datasets.

Become the root role and 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/<BeName> 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/var
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/var
rpool/export
rpool/export/home