System Administration Guide: Basic Administration
Previous Next

Booting From a ZFS Root File System

Support for booting a system from a ZFS root file system has been added to the Solaris OS. The Solaris installation software also includes support for system upgrades and patching of systems with ZFS roots. Booting, system operations, and installation procedures have been modified to support this change. Changes to booting include the implementation of boot loaders the SPARC boot architecture to increase commonality with the Solaris x86 boot architecture. This implementation is described in the following sections.

For more information about ZFS, including a complete list of terms, see ZFS Terminology in Solaris ZFS Administration Guide.

Solaris Installation Requirements for ZFS

Before performing a new installation of the Solaris software or using Solaris Live Upgrade to migrate a UFS root file system to a ZFS root file system, make sure the following requirements are met:

  • Solaris release information:

    The ability to install and boot from a ZFS root file system is available in the Solaris 10 11/06 release. To perform a Solaris Live Upgrade operation to migrate to a ZFS root file system, you must have installed or upgraded to the Solaris 10 11/06 release.

  • ZFS storage pool space requirements:

    The minimum amount of available pool space that is required for a bootable ZFS root file system is larger than for a bootable UFS root file system because swap and dump devices are not shared in a ZFS root environment.

    If you select a ZFS root file system during an initial software installation, or if you use Solaris Live Upgrade to migrate from a UFS root file system to a ZFS root file system, a swap area is created on a ZFS volume in the ZFS root pool. The default swap area is sized at 1/2 the size of physical memory, but no more than 2 Gbytes. A ZFS volume is also created for the dump device. The dump device is sized at 1/2 the size of physical memory, but no more than 2 Gbytes. Currently, the swap area and the dump device must reside on separate ZFS volumes.

    For more information, see ZFS Support for Swap and Dump Devices in Solaris ZFS Administration Guide.

How Booting From a ZFS Root File System Works

Booting from a ZFS root file system works differently than booting from a UFS file system. Because ZFS applies several new concepts for installation and booting, some basic administrative practices for booting a system have changed. The most significant difference between booting from a ZFS root file system and booting from a UFS root file system is that with ZFS a device identifier does not uniquely identify a root file system, and thus a BE. With ZFS, a device identifier uniquely identifies a storage pool. A storage pool can contain multiple bootable datasets (root file systems). Therefore, in addition to specifying a boot device, a root file system within the pool that was identified by the boot device must also be specified.

On an x86 based system, if the boot device that is identified by GRUB contains a ZFS storage pool, the menu.lst file that is used to create the GRUB menu is located in the dataset at the root of that pool's dataset hierachy. This dataset has the same name as the pool. There is one such dataset in each pool.

A default bootable dataset is the bootable dataset for the pool that is mounted at boot time and is defined by the root pool's bootfs property. When a device in a root pool is booted, the dataset that is specified by this property is then mounted as the root file system.

The new bootfs pool property is a mechanism that is used by the system to specify the default bootable dataset for a given pool. When a device in a root pool is booted, the dataset that is mounted by default as the root file system is the one that is identified by the bootfs pool property.

On a SPARC based system, the default bootfs pool property is overridden by using the new -Z dataset option of the boot command.

On an x86 based system, the default bootfs pool property is overridden by selecting an alternate boot environment in the GRUB menu at boot time.

SPARC: Boot Options That Support Booting From a ZFS Root File System

On the SPARC platform, the following two boot options are new:

  • The -L option, which is used to print a list of all the available BEs on a system.

    ok boot -L

    Note - The -L option is run from the ok prompt. This option only presents the list of available BEs on the system. To boot the system, use the- Z boot option.


  • The -Z option of the boot command enables you to specify a bootable dataset other than the default dataset that is specified by the bootfs pool property.

    ok boot -Z dataset

The list of BEs that are displayed when you use the -L option on a device that has a ZFS boot loader reflect the menu.lst entries that are available on that particular system. Along with the list of available BEs, instructions for selecting a BE and using the -Z option to boot the system are also provided. The dataset specified by the bootfs value for the menu item is used for all subsequent files that are read by the booter, for example, the boot archive and various configuration files that are located in the /etc directory. This dataset is then mounted as the root file system.

For step-by-step instructions, see Booting From a ZFS Root File System on a SPARC Based System.

x86: Boot Options That Support Booting From a ZFS Root File System

On the x86 platform, a new GRUB keyword, $ZFS-BOOTFS has been introduced. When booting an x86 based system, if the root file system that corresponds with the GRUB menu entry is a ZFS dataset, the GRUB menu entry contains the -B option with the $ZFS-BOOTFS token by default. If you install or upgrade your system with a Solaris release that supports a ZFS boot loader, the GRUB menu.lst file is updated with this information automatically. The default bootable dataset is identified by the bootfs property.

On x86 based systems that are running a Solaris release that supports a ZFS boot loader, this information is included in the GRUB menu.

The following is an example of a default menu.lst file for a GRUB implementation that supports a ZFS boot loader:

title Solaris 11 s10x_90 X86
findroot (pool_rpool,0,a)
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

title Solaris 11 failsafe
findroot (pool_rpool,0,a)
kernel /boot/platform/i86pc/kernel/unix -s -B console=ttyb
module /boot/x86.miniroot-safe

This example shows a menu.lst file that has been manually edited to include an alternate bootable dataset entry:

title Solaris-alternate-dataset
bootfs myrootpool/bootenv-alt
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

For step-by-step instructions on booting a system from ZFS, see Booting From a ZFS Root File System on an x86 Based System.

Previous Next