Difference between revisions of "Multiple Boot Environments"

From PC-BSD Wiki
Jump to: navigation, search
Line 3: Line 3:
 
Beginning with version 9.1, PC-BSD supports multiple boot environments ''' ''on systems that were formatted with ZFS during installation.'' ''' In 9.1, this feature is configured from the command line. Version 9.2 will provide a graphical interface for managing boot environments (BEs).
 
Beginning with version 9.1, PC-BSD supports multiple boot environments ''' ''on systems that were formatted with ZFS during installation.'' ''' In 9.1, this feature is configured from the command line. Version 9.2 will provide a graphical interface for managing boot environments (BEs).
  
Multiple boot environments is a feature originally created by Solaris. It allows you to create a BE, which is a bootable, point-in-time snapshot of the ZFS filesystem. By booting into a snapshot, you return to that point in time in the filesystem. For example, you could create a BE before upgrading, allowing you to boot either into the newly upgraded system or into the snapshot of the system before it was upgraded. Alternately, you could create a snapshot before installing and configuring some software that you wish to test. Once your test is finished, you could boot into what the system looked like before the test.
+
Multiple boot environments is a feature originally created by Solaris. By default, a ZFS system is considered to be a BE, as you can boot into it. Multiple boot environments allow you to create additional BEs, or bootable, point-in-time snapshots of the ZFS filesystem. By booting into an alternate BE, you return to that point in time in the filesystem. For example, if you create a BE before upgrading, you could choose to boot into that BE should the upgrade fail and you wish to return to what the filesystem looked like before the upgrade. Alternately, you could create a snapshot BE to install and configure some software that you wish to test. Simply boot into that BE and perform your test installations. When you are finished your tests, set the system to boot back into the original BE.
  
BE's are managed withe the '''beadm''' command which must be run as the superuser. The following example creates a BE of the ZFS pool named ''beforeupgrade''.
+
BE's are managed withe the '''beadm''' command which must be run as the superuser. The following example creates a BE named ''beforeupgrade''. This BE is a clone of the current BE (i.e. the ZFS environment you booted into).
  
 
  '''beadm create beforeupgrade'''  
 
  '''beadm create beforeupgrade'''  
 
  Created successfully
 
  Created successfully
  
To view the BEs, use the '''list''' command
+
To view all BEs, use the '''list''' command
  
 
  '''beadm list'''
 
  '''beadm list'''
Line 27: Line 27:
 
* '''-:''' inactive
 
* '''-:''' inactive
  
In this example, the ZFS pool is the ''default'' BE, is active now and at next reboot, and is mounted. The newly created ''beforeupgrade'' BE exists, but is inactive. To activate the new BE:
+
In this example, the current BE is called ''default'', it is active now and at next reboot, and is mounted. The newly created ''beforeupgrade'' BE exists, but is inactive. To activate the new BE:
  
 
  '''beadm activate beforeupgrade'''
 
  '''beadm activate beforeupgrade'''

Revision as of 09:29, 10 July 2012

(Sorry for the inconvenience)

Beginning with version 9.1, PC-BSD supports multiple boot environments on systems that were formatted with ZFS during installation. In 9.1, this feature is configured from the command line. Version 9.2 will provide a graphical interface for managing boot environments (BEs).

Multiple boot environments is a feature originally created by Solaris. By default, a ZFS system is considered to be a BE, as you can boot into it. Multiple boot environments allow you to create additional BEs, or bootable, point-in-time snapshots of the ZFS filesystem. By booting into an alternate BE, you return to that point in time in the filesystem. For example, if you create a BE before upgrading, you could choose to boot into that BE should the upgrade fail and you wish to return to what the filesystem looked like before the upgrade. Alternately, you could create a snapshot BE to install and configure some software that you wish to test. Simply boot into that BE and perform your test installations. When you are finished your tests, set the system to boot back into the original BE.

BE's are managed withe the beadm command which must be run as the superuser. The following example creates a BE named beforeupgrade. This BE is a clone of the current BE (i.e. the ZFS environment you booted into).

beadm create beforeupgrade 
Created successfully

To view all BEs, use the list command

beadm list
BE            Active Mountpoint Space Policy Created
default       NR     /          6.05G static 2012-07-09 05:06
beforeupgrade -      -             1K static 2012-07-10 12:25

The possible flags in the Active field are as follows:

  • R: active on reboot
  • N: active now
  • NR: active now and active on reboot
  • -: inactive

In this example, the current BE is called default, it is active now and at next reboot, and is mounted. The newly created beforeupgrade BE exists, but is inactive. To activate the new BE:

beadm activate beforeupgrade
Activated successfully
beadm list
BE            Active Mountpoint Space Policy Created
default       N      /          64.5K static 2012-07-09 05:06
beforeupgrade R      -          6.05G static 2012-07-10 12:25


References


Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox