Back online 08/04/2021 | website/CMS in HEAVY development | content revival from old DB in progress

OpenSolaris BootEnv

by Antoine - Categories : OS


Boot Environments (BE) are like a system snapshot containing root data, including the OS. In ZFS language, they are like a system pool clone. The goal of a BE is to create a system backup before the user makes any change on/update it. By the way, updating OpenSolaris with pkg image-update command actually creates a new BE containing the system latest version. The olds system BE is not altered in the process so the administrator is able to easily rollback if the update happens to break something.

BE are controlled through the beadm command. Here is a quick overview of the most basic ones.

List active BE

# beadm list
BE            Active  Mountpoint  Space  Policy  Created
--            ------  ----------  -----  ------  -------
opensolaris   N      /           2.58G  static  2009-05-01 11:35
opensolaris-1 R      -           61.0K  static  2009-05-01 13:25

In the Active column, N (NOW) flag refers to the currently used BE, and R (REBOOT) to the BE that will be used at next startup.

Activate and rename a BE

In order to rename a BE, some conditions must be met : not being N or R. If active, which is the case if the user just updated the system by pkg image-update, another BE needs to be activated, renamed, and activated for the next startup.

# beadm activate opensolaris
# beadm rename opensolaris-1 osol
# beadm activate osol
# beadm list
BE            Active  Mountpoint  Space  Policy  Created
--            ------  ----------  -----  ------  -------
opensolaris   N      /           2.58G  static  2009-05-01 11:35
osol          R      -           61.0K  static  2009-05-01 13:25

Create and delete a BE

Easy again with create and destroy.

# beadm create opensolaris
# beadm destroy opensolaris

For more commands and détails about above commands, see the SUN documentation.


Be the first to comment !

0