1 .\" Copyright (c) 2014 Andriy Gapon <avg@FreeBSD.org>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .Dd September 15, 2014
32 .Nd GPT bootcode for ZFS on BIOS-based computers
35 is used on BIOS-based computers to boot from a filesystem in
40 partition of a GPT-partitioned disk with
42 .Sh IMPLEMENTATION NOTES
43 The GPT standard allows a variable number of partitions, but
45 only boots from tables with 128 partitions or less.
48 tries to find all ZFS pools that are composed of BIOS-visible
49 hard disks or partitions on them.
51 looks for ZFS device labels on all visible disks and in discovered
52 supported partitions for all supported partition scheme types.
53 The search starts with the disk from which
56 Other disks are probed in BIOS defined order.
57 After a disk is probed and
59 determines that the whole disk is not a ZFS pool member, the
60 individual partitions are probed in their partition table order.
61 Currently GPT and MBR partition schemes are supported.
62 With the GPT scheme, only partitions of type
65 The first pool seen during probing is used as a default boot pool.
67 The filesystem specified by the
69 property of the pool is used as a default boot filesystem.
72 property is not set, then the root filesystem of the pool is used as
75 is loaded from the boot filesystem.
80 is present in the boot filesystem, boot options are read from it
84 The ZFS GUIDs of the first successfully probed device and the first
85 detected pool are made available to
88 .Cm vfs.zfs.boot.primary_vdev
90 .Cm vfs.zfs.boot.primary_pool
95 will boot in fully automatic mode.
98 it is possible to interrupt the automatic boot process and interact with
102 accepts all the options that
106 The filesystem specification and the path to
113 .Oo zfs:pool/filesystem: Oc Oo /path/to/loader Oc
116 Both the filesystem and the path can be specified.
117 If only a path is specified, then the default filesystem is used.
118 If only a pool and filesystem are specified, then
124 command can be used to query information about discovered pools.
125 The output format is similar to that of
129 The configured or automatically determined ZFS boot filesystem is
133 variable, and also set as the initial value of the
137 .Bl -tag -width /boot/gptzfsboot -compact
138 .It Pa /boot/gptzfsboot
141 parameters for the boot block
144 alternative parameters for the boot block
149 is typically installed in combination with a
160 .Bd -literal -offset indent
161 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
165 can also be installed without the PMBR:
166 .Bd -literal -offset indent
167 gpart bootcode -p /boot/gptzfsboot -i 1 ada0
177 appeared in FreeBSD 7.3.
179 This manual page was written by
180 .An Andriy Gapon Aq avg@FreeBSD.org .
183 looks for ZFS meta-data only in MBR partitions
184 .Pq known on FreeBSD as slices .
185 It does not look into BSD
187 partitions that are traditionally called partitions.
188 If a disklabel partition happens to be placed so that ZFS meta-data can be
189 found at the fixed offsets relative to a slice, then
191 will recognize the partition as a part of a ZFS pool,
192 but this is not guaranteed to happen.