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
25 .Dd September 15, 2014
30 .Nd GPT bootcode for ZFS on BIOS-based computers
33 is used on BIOS-based computers to boot from a filesystem in
38 partition of a GPT-partitioned disk with
40 .Sh IMPLEMENTATION NOTES
41 The GPT standard allows a variable number of partitions, but
43 only boots from tables with 128 partitions or less.
46 tries to find all ZFS pools that are composed of BIOS-visible
47 hard disks or partitions on them.
49 looks for ZFS device labels on all visible disks and in discovered
50 supported partitions for all supported partition scheme types.
51 The search starts with the disk from which
54 Other disks are probed in BIOS defined order.
55 After a disk is probed and
57 determines that the whole disk is not a ZFS pool member, the
58 individual partitions are probed in their partition table order.
59 Currently GPT and MBR partition schemes are supported.
60 With the GPT scheme, only partitions of type
63 The first pool seen during probing is used as a default boot pool.
65 The filesystem specified by the
67 property of the pool is used as a default boot filesystem.
70 property is not set, then the root filesystem of the pool is used as
73 is loaded from the boot filesystem.
78 is present in the boot filesystem, boot options are read from it
82 The ZFS GUIDs of the first successfully probed device and the first
83 detected pool are made available to
86 .Cm vfs.zfs.boot.primary_vdev
88 .Cm vfs.zfs.boot.primary_pool
93 will boot in fully automatic mode.
96 it is possible to interrupt the automatic boot process and interact with
100 accepts all the options that
104 The filesystem specification and the path to
111 .Oo zfs:pool/filesystem: Oc Oo /path/to/loader Oc
114 Both the filesystem and the path can be specified.
115 If only a path is specified, then the default filesystem is used.
116 If only a pool and filesystem are specified, then
122 command can be used to query information about discovered pools.
123 The output format is similar to that of
127 The configured or automatically determined ZFS boot filesystem is
131 variable, and also set as the initial value of the
135 .Bl -tag -width /boot/gptzfsboot -compact
136 .It Pa /boot/gptzfsboot
139 parameters for the boot block
142 alternative parameters for the boot block
147 is typically installed in combination with a
158 .Bd -literal -offset indent
159 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
163 can also be installed without the PMBR:
164 .Bd -literal -offset indent
165 gpart bootcode -p /boot/gptzfsboot -i 1 ada0
175 appeared in FreeBSD 7.3.
177 This manual page was written by
178 .An Andriy Gapon Aq avg@FreeBSD.org .
181 looks for ZFS meta-data only in MBR partitions
182 .Pq known on FreeBSD as slices .
183 It does not look into BSD
185 partitions that are traditionally called partitions.
186 If a disklabel partition happens to be placed so that ZFS meta-data can be
187 found at the fixed offsets relative to a slice, then
189 will recognize the partition as a part of a ZFS pool,
190 but this is not guaranteed to happen.