Go to main content

Managing ZFS File Systems in Oracle® Solaris 11.4

Exit Print View

Updated: August 2019
 
 

Booting From a ZFS Root File System on a SPARC Based System

On a system with multiple ZFS BEs, you can boot from any BE by using the beadm activate command. Both the installation process and the beadm activation process automatically set the bootfs property.

By default, the bootfs property identifies the bootable file system entry in the /pool-name/boot/menu.lst file. However, a menu.lst entry can contain a bootfs command that specifies an alternate file system in the pool. Thus, the menu.lst file can contain entries for multiple root file systems within the pool.

When a ZFS root file system is installed, an entry similar to the following example is added to the menu.lst file:

title release-version SPARC
bootfs rpool/ROOT/solaris

When a new BE is created, the menu.lst file is updated automatically.

title release-version SPARC
bootfs rpool/ROOT/solaris
title solaris
bootfs rpool/ROOT/solaris2

SPARC: How to Select the Boot Environment for Booting

  1. After a ZFS BE is activated, display a list of bootable file systems within a ZFS pool.
    $ boot -L
  2. Select one of the bootable file systems in the list.

    Detailed instructions for booting that file system are displayed.

  3. Boot the selected file system by following the instructions.
  4. Use the boot –Z file system command to boot a specific ZFS file system.
  5. (Optional) To make the selected BE persistent across reboots, activate the BE.
Example 27  Booting From a Specific ZFS Boot Environment

If you have multiple ZFS BEs in a ZFS storage pool on your system's boot device, use the beadm activate command to specify a default BE.

In this example, the beadm lists following available ZFS BEs:

$ beadm list
BE        Active Mountpoint Space Policy Created
--        ------ ---------- ----- ------ -------
solaris   NR     /          3.80G static 2012-07-20 10:25
solaris-2 -      -          7.68M static 2012-07-19 13:44 

To select a specific BE, you would use the boot –L command. For example:

ok boot -L
Boot device: /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0,0:a  File and args: -L
1 release-version SPARC
2 solaris
Select environment to boot: [ 1 - 2 ]: 1

To boot the selected entry, invoke:
boot [<root-device>] -Z rpool/ROOT/solaris-2

Program terminated
ok boot -Z rpool/ROOT/solaris-2

To boot automatically from the selected BE, activate that BE.