JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Booting and Shutting Down Oracle Solaris on x86 Platforms     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

About This Book

1.  Booting and Shutting Down an x86 Based System (Overview)

2.  Booting an x86 Based System to a Specified State (Tasks)

3.  Shutting Down a System (Tasks)

4.  Rebooting an x86 Based System (Tasks)

5.  Booting an x86 Based System From the Network (Tasks)

6.  Modifying Boot Parameters on an x86 Based System (Tasks)

7.  Creating, Administering, and Booting From ZFS Boot Environments on x86 Platforms (Tasks)

Creating, Administering, and Booting From ZFS Boot Environments (Task Map)

Creating and Administering Boot Environments

How to Create a New Boot Environment

How to Create a Snapshot of a Boot Environment

How to Create a Boot Environment From an Existing Snapshot

How to Activate a Newly Created Boot Environment

How to Display a List of Available Boot Environments, Snapshots, and Datasets

How to Destroy a Boot Environment

Booting From a ZFS Boot Environment or Root File System on x86 Platforms

8.  Keeping an x86 Based System Bootable (Tasks)

9.  Troubleshooting Booting an x86 Based System (Tasks)

Index

Creating and Administering Boot Environments

The following tasks describe how to create and administer boot environments, snapshots, and datasets by using the beadm utility.

For more information about the beadm utility, see the beadm(1M) man page. For more information about managing boot environments, see Creating and Administering Oracle Solaris 11 Boot Environments. For specific information about using the beadm utility in a global or non-global zones environment, see Chapter 2, beadm Zones Support, in Creating and Administering Oracle Solaris 11 Boot Environments.

How to Create a New Boot Environment

  1. Become the root role.
  2. Create a boot environment by using the beadm create command.
    # beadm create beName

    where beName is a variable for the name of the new boot environment. This new boot environment is inactive.


    Note - The beadm create command does not create a partial boot environment. Either a new, full boot environment is successfully created, or the command fails.


  3. (Optional) Mount the new boot environment.
    # beadm mount beName mountpoint

    If the directory for the mount point does not exist, the beadm command 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 new location.

    The boot environment is mounted, but remains inactive. Note that you can upgrade a mounted, inactive boot environment. Also, remember to unmount the boot environment before rebooting your system.

  4. (Optional) To boot from the new boot environment, first activate the boot environment.
    # beadm activate beName

    where beName is a variable for the name of the boot environment to be activated. Upon reboot, the newly active boot environment becomes the default boot entry that is listed in the GRUB menu.

Example 7-1 Creating a Cloned Boot Environment With Shared Datasets

The following example shows the datasets in a newly created boot environment named BE2. The original boot environment in this example is BE1. The new boot environment, BE2, contains separate datasets that were cloned from BE1. If BE1 contains separate datasets for traditional file systems, such as /opt, then those datasets are also cloned.

# beadm create BE2
# beadm list -a BE2
BE/Dataset/Snapshot Active Mountpoint Space Policy Created
------------------- ------ ---------- ----- ------ -------
BE2
   rpool/ROOT/BE2   -      -          42.0K static 2011-04-07 10:56

As shown in the previous output, the name of the storage pool is rpool. The pool already exists on the system, as it was previously set up by the initial installation or an 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.

How to Create a Snapshot of a Boot Environment

  1. Become the root role.
  2. Create the snapshot of the boot environment.
    # beadm create beName@snapshot

    Example snapshot names include the following:

    • BE@0312200.12:15pm

    • BE2@backup

    • BE1@march132008

How to Create a Boot Environment From an Existing Snapshot

  1. Become the root role.
  2. Create a new boot environment from a snapshot by typing the following command:
    # beadm create -e BEname@snapshotdescription beName

    Replace BEname@snapshotdescription with the name of an existing snapshot and beName with a custom name for the new boot environment.

    For example:

    # beadm create -e BE1@now BE2

    This command creates a new boot environment named BE2 from the existing snapshot named BE1@now. You can then active the boot environment. For instructions, see How to Activate a Newly Created Boot Environment.

How to Activate a Newly Created Boot Environment

You can activate a newly created boot environment so that upon reboot it is the default boot environment that is booted. Note that only one boot environment can be active at any given time.

  1. Become the root role.
  2. Activate an existing, inactive boot environment by using the following command:
    # beadm activate beName

    where beName is a variable for the boot environment to be activated.

    Note the following:

    • The beadm activate beName command activates the boot environment by setting the bootfs bootable pool property to the value of the ROOT dataset of the boot environment that is being activated.

    • The beadm activate command sets the newly activated boot environment as the default in the menu.lst file.

  3. Reboot the system.

    The newly activated boot environment is now the default entry in the x86 GRUB menu.


    Note - If the boot environment fails to boot, reboot and select the previous boot environment from the GRUB menu or the boot menu.


How to Display a List of Available Boot Environments, Snapshots, and Datasets

To display available boot environments, snapshots, and datasets that were created by using the beadm command, use the beadm list command.

  1. Become the root role.
  2. To list all of the available datasets on the system, type the following command:
    # beadm list option
    -a

    Lists all available information about the boot environment. This option includes subordinate snapshots and datasets.

    -d

    Lists information about a boot environment's datasets.

    -s

    Lists information about a boot environment's snapshots. This option is used in conjunction with the -d option.

    -H

    Omits the header information from the display. Choosing this option results in a display that can be more easily parsed for scripts or other programs.

  3. To list the available datasets for a specific boot environment, include the boot environment name in the beadm list command syntax.

    For example, to list all of the available datasets in the oracle-solaris boot environment, you would type the following command:

    # beadm list -a oracle-solaris
     BE/Dataset/Snapshot   Active Mountpoint Space  Policy Created
    -------------------   ------ ---------- -----  ------ -------
    oracle-solaris
       rpool/ROOT/solaris -      -          14.33M static 2011-01-20 07:45

Example 7-2 Viewing Snapshot Specifications

The following beadm list example includes the -s option, which displays information for any snapshots that exist on the current image.

In the following sample results, each snapshot title includes a time stamp, indicating when that snapshot was taken.

# beadm list -s test-2

The sample results are displayed.

BE/Snapshot     Space Policy Created
----------- ----- ------ ------- 
test-2
test-2@2010-04-12-22:29:27 264.02M static 2010-04-12 16:29
test-2@2010-06-02-20:28:51 32.50M static 2010-06-02 14:28
test-2@2010-06-03-16:51:01 16.66M static 2010-06-03 10:51
test-2@2010-07-13-22:01:56 25.93M static 2010-07-13 16:01
test-2@2010-07-21-17:15:15 26.00M static 2010-07-21 11:15
test-2@2010-07-25-19:07:03 13.75M static 2010-07-25 13:07
test-2@2010-07-25-20:33:41 12.32M static 2010-07-25 14:33
test-2@2010-07-25-20:41:23 30.60M static 2010-07-25 14:41
test-2@2010-08-06-15:53:15 8.92M static 2010-08-06 09:53
test-2@2010-08-06-16:00:37 8.92M static 2010-08-06 10:00
test-2@2010-08-09-16:06:11 193.72M static 2010-08-09 10:06
test-2@2010-08-09-20:28:59 102.69M static 2010-08-09 14:28
test-2@install 205.10M static 2010-03-16 19:04

How to Destroy a Boot Environment

If you want to make more disk space available on your system, you can use the beadm command to destroy (remove) an existing boot environment.

Note the following:

  1. Become the root role.
  2. To destroy a boot environment, type the following command:
    # beadm destroy beName

    You are prompted for confirmation before destroying the boot environment.

    beadm destroy beName

    Destroys the boot environment that is specified by beName.

    -F

    Forces the destruction of the boot environment without a confirmation request.

    -f

    Forces the destruction of the boot environment, even if it is mounted.