(Sorry for the inconvenience)
THIS PAGE NEEDS UPDATING
PC-BSD® supports a feature of ZFS known as multiple boot environments (BEs). With multiple boot environments, the process of updating software becomes a low-risk operation as you can backup your current boot environment before upgrading or making software updates to your system. If needed, you also have the option of booting into a backup boot environment. For example:
- if you are making software changes to a boot environment, you can take a snapshot of that environment at any stage during the modifications.
- you can save multiple boot environments on your system and perform various updates on each of them as needed. You can install, test, and update different software packages on each.
- although only one boot environment can be active at a time, you can mount an inactive boot environment using the beadm mount command. You could then chroot into the mount point in order to update specific packages on the mounted environment.
- you can move a boot environment to another machine, physical or virtual, in order to check hardware support.
Managing Boot Environments Using Boot Manager
To create and manager boot environments using a graphical interface, go to Control Panel ➜ Boot Manager or type pc-su pc-bootconfig. You will be prompted to enter your password.
During installation, PC-BSD® creates a boot environment named default. As seen in Figure 8.4a, an entry for this boot environment will be displayed in the Boot Manager screen.
Figure 8.4a: Managing Boot Environments
From top to bottom, the icons on the far left are used to:
Create: a new boot environment. You should do this before making any changes to the system that may impact on your current boot environment. You will be prompted for a name. Once you click OK, the system will create the environment, then add it to the list of boot environments. Its Running status will show as No, until you activate it. Regardless of the number of boot environments, only one will have a Running status of Yes.
Remove: will delete the highlighted boot environment. You can not delete the boot environment which has a Running status of Yes.
Copy: makes a mountable copy? of the
Figure 8.4b: Managing GRUB Configuration
Managing Boot Environments From the Command Line
Boot environments are managed with the beadm command which must be run as the superuser. The following example creates a BE named beforeupgrade. The new BE is a clone of the current BE, the ZFS environment that you booted into.
To view all BEs, use the list command
BE Active Mountpoint Space Policy Created default NR / 6.05G static 2012-07-09 05:06beforeupgrade - - 1K static 2012-07-10 12:25
- R: active on reboot
- N: active now
- -: inactive
In this example, the current BE is called default, it is active now, and at next reboot; and it is mounted. The newly created beforeupgrade BE exists, but is inactive and unmounted. To activate the new BE:
Activated successfully beadm list BE Active Mountpoint Space Policy Created default N / 64.5K static 2012-07-09 05:06beforeupgrade R - 6.05G static 2012-07-10 12:25
The flags now indicate that the system is currently booted into default, but at next boot the system will boot into beforeupgrade. Only one boot environment can be active at a time.