xref: /titanic_54/usr/src/man/man5/gptzfsboot.5 (revision ba11c5b535a8958668f939901bdcacb3ee8b7570)
1*ba11c5b5SToomas Soome.\" Copyright (c) 2014 Andriy Gapon <avg@FreeBSD.org>
2*ba11c5b5SToomas Soome.\" All rights reserved.
3*ba11c5b5SToomas Soome.\"
4*ba11c5b5SToomas Soome.\" Redistribution and use in source and binary forms, with or without
5*ba11c5b5SToomas Soome.\" modification, are permitted provided that the following conditions
6*ba11c5b5SToomas Soome.\" are met:
7*ba11c5b5SToomas Soome.\" 1. Redistributions of source code must retain the above copyright
8*ba11c5b5SToomas Soome.\"    notice, this list of conditions and the following disclaimer.
9*ba11c5b5SToomas Soome.\" 2. Redistributions in binary form must reproduce the above copyright
10*ba11c5b5SToomas Soome.\"    notice, this list of conditions and the following disclaimer in the
11*ba11c5b5SToomas Soome.\"    documentation and/or other materials provided with the distribution.
12*ba11c5b5SToomas Soome.\"
13*ba11c5b5SToomas Soome.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14*ba11c5b5SToomas Soome.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*ba11c5b5SToomas Soome.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*ba11c5b5SToomas Soome.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17*ba11c5b5SToomas Soome.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*ba11c5b5SToomas Soome.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*ba11c5b5SToomas Soome.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*ba11c5b5SToomas Soome.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*ba11c5b5SToomas Soome.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*ba11c5b5SToomas Soome.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*ba11c5b5SToomas Soome.\" SUCH DAMAGE.
24*ba11c5b5SToomas Soome.\"
25*ba11c5b5SToomas Soome.Dd Apr 21, 2017
26*ba11c5b5SToomas Soome.Dt GPTZFSBOOT 5
27*ba11c5b5SToomas Soome.Os
28*ba11c5b5SToomas Soome.Sh NAME
29*ba11c5b5SToomas Soome.Nm gptzfsboot
30*ba11c5b5SToomas Soome.Nd disk bootcode for BIOS-based computers
31*ba11c5b5SToomas Soome.Sh DESCRIPTION
32*ba11c5b5SToomas Soome.Nm
33*ba11c5b5SToomas Soomeis used on BIOS-based computers to boot from a filesystem on disk device.
34*ba11c5b5SToomas SoomeDepending on disk partitioning and boot file system, the
35*ba11c5b5SToomas Soome.Nm
36*ba11c5b5SToomas Soomeis installed in a
37*ba11c5b5SToomas Soome.Cm zfs pool boot area
38*ba11c5b5SToomas Soomeor
39*ba11c5b5SToomas Soome.Cm boot
40*ba11c5b5SToomas Soomepartition of a disk with
41*ba11c5b5SToomas Soome.Xr installboot 1M .
42*ba11c5b5SToomas Soome.Ss IMPLEMENTATION NOTES
43*ba11c5b5SToomas SoomeThe GPT standard allows a variable number of partitions, but
44*ba11c5b5SToomas Soome.Nm
45*ba11c5b5SToomas Soomeonly boots from tables with 128 partitions or less.
46*ba11c5b5SToomas Soome.Ss BOOTING
47*ba11c5b5SToomas Soome.Nm
48*ba11c5b5SToomas Soometries to find all ZFS pools that are composed of BIOS-visible
49*ba11c5b5SToomas Soomehard disks or partitions on them.
50*ba11c5b5SToomas Soome.Nm
51*ba11c5b5SToomas Soomelooks for ZFS device labels on all visible disks and in discovered
52*ba11c5b5SToomas Soomesupported partitions for all supported partition scheme types.
53*ba11c5b5SToomas SoomeDisks are probed in BIOS defined order.
54*ba11c5b5SToomas SoomeAfter a disk is probed and
55*ba11c5b5SToomas Soome.Nm
56*ba11c5b5SToomas Soomedetermines that the whole disk is not a ZFS pool member, the
57*ba11c5b5SToomas Soomeindividual partitions are probed in their partition table order.
58*ba11c5b5SToomas SoomeCurrently GPT and MBR partition schemes are supported.
59*ba11c5b5SToomas Soome.Pp
60*ba11c5b5SToomas SoomeThe default boot partition is recorded into
61*ba11c5b5SToomas Soome.Nm
62*ba11c5b5SToomas Soomebinary by
63*ba11c5b5SToomas Soome.Xr installboot 1M
64*ba11c5b5SToomas Soomeand the default boot file system is determined at run time.
65*ba11c5b5SToomas Soome.Nm
66*ba11c5b5SToomas Soomedoes support booting from the
67*ba11c5b5SToomas Soome.Cm ZFS ,
68*ba11c5b5SToomas Soome.Cm UFS
69*ba11c5b5SToomas Soomeand
70*ba11c5b5SToomas Soome.Cm PCFS
71*ba11c5b5SToomas Soomefile systems.
72*ba11c5b5SToomas Soome.Pp
73*ba11c5b5SToomas SoomeThe filesystem specified by the
74*ba11c5b5SToomas Soome.Cm bootfs
75*ba11c5b5SToomas Soomeproperty of the ZFS pool is used as a default boot filesystem.
76*ba11c5b5SToomas SoomeIf the
77*ba11c5b5SToomas Soome.Cm bootfs
78*ba11c5b5SToomas Soomeproperty is not set, then the root filesystem of the pool is used as
79*ba11c5b5SToomas Soomethe default.
80*ba11c5b5SToomas Soome.Xr zfsloader 5
81*ba11c5b5SToomas Soomeis loaded from the boot filesystem.
82*ba11c5b5SToomas SoomeIf
83*ba11c5b5SToomas Soome.Pa /boot/config
84*ba11c5b5SToomas Soomeis present in the boot filesystem, boot options are read from it.
85*ba11c5b5SToomas Soome.Pp
86*ba11c5b5SToomas SoomeThe ZFS GUIDs of the boot pool and boot file system are made available to
87*ba11c5b5SToomas Soome.Xr zfsloader 8 .
88*ba11c5b5SToomas Soome.Ss USAGE
89*ba11c5b5SToomas SoomeNormally
90*ba11c5b5SToomas Soome.Nm
91*ba11c5b5SToomas Soomewill boot in fully automatic mode.
92*ba11c5b5SToomas SoomeHowever, it is possible to interrupt the automatic boot process and
93*ba11c5b5SToomas Soomeinteract with
94*ba11c5b5SToomas Soome.Nm
95*ba11c5b5SToomas Soomethrough a prompt.
96*ba11c5b5SToomas Soome.Pp
97*ba11c5b5SToomas SoomeThe filesystem specification and the path to
98*ba11c5b5SToomas Soome.Xr zfsloader 5
99*ba11c5b5SToomas Soomeis specified as
100*ba11c5b5SToomas Soome.Pp
101*ba11c5b5SToomas Soome.Sm off
102*ba11c5b5SToomas Soome.Oo zfs:pool/filesystem: Oc Oo /path/to/loader Oc
103*ba11c5b5SToomas Soome.Sm on
104*ba11c5b5SToomas Soome.Pp
105*ba11c5b5SToomas SoomeBoth the filesystem and the path can be specified.
106*ba11c5b5SToomas SoomeIf only a path is specified, then the default filesystem is used.
107*ba11c5b5SToomas SoomeIf only a pool and filesystem are specified, then
108*ba11c5b5SToomas Soome.Pa /boot/zfsloader
109*ba11c5b5SToomas Soomeis used as a path.
110*ba11c5b5SToomas Soome.Pp
111*ba11c5b5SToomas SoomeAdditionally, the
112*ba11c5b5SToomas Soome.Nm
113*ba11c5b5SToomas Soomedoes support two commands to get information about the system.
114*ba11c5b5SToomas Soome.Ic ?directoryname
115*ba11c5b5SToomas Soomecan be used to list the content of named directory and
116*ba11c5b5SToomas Soome.Ic status
117*ba11c5b5SToomas Soomecommand can be used to query information about discovered devices.
118*ba11c5b5SToomas SoomeThe output format for ZFS pools is similar to that of
119*ba11c5b5SToomas Soome.Cm zpool status
120*ba11c5b5SToomas Soome.Pq see Xr zpool 1M .
121*ba11c5b5SToomas Soome.Pp
122*ba11c5b5SToomas SoomeThe configured or automatically determined ZFS boot filesystem is
123*ba11c5b5SToomas Soomestored in the
124*ba11c5b5SToomas Soome.Xr zfsloader 5
125*ba11c5b5SToomas Soome.Cm loaddev
126*ba11c5b5SToomas Soomevariable, and also set as the initial value of the
127*ba11c5b5SToomas Soome.Cm currdev
128*ba11c5b5SToomas Soomevariable.
129*ba11c5b5SToomas Soome.Sh FILES
130*ba11c5b5SToomas Soome.Bl -tag -width /boot/gptzfsboot -compact
131*ba11c5b5SToomas Soome.It Pa /boot/config
132*ba11c5b5SToomas Soomeparameters for the boot block
133*ba11c5b5SToomas Soome.Pq optional
134*ba11c5b5SToomas Soome.It Pa /boot/gptzfsboot
135*ba11c5b5SToomas Soomeboot code binary
136*ba11c5b5SToomas Soome.El
137*ba11c5b5SToomas Soome.Sh EXAMPLES
138*ba11c5b5SToomas Soome.Nm
139*ba11c5b5SToomas Soomeis installed in combination with a
140*ba11c5b5SToomas Soome.Dq protective MBR
141*ba11c5b5SToomas Soome.Po
142*ba11c5b5SToomas Soomesee
143*ba11c5b5SToomas Soome.Xr installboot 1M
144*ba11c5b5SToomas Soome.Pc .
145*ba11c5b5SToomas SoomeTo install
146*ba11c5b5SToomas Soome.Nm
147*ba11c5b5SToomas Soomeon the
148*ba11c5b5SToomas Soome.Pa c0t0d0s0
149*ba11c5b5SToomas Soomedrive:
150*ba11c5b5SToomas Soome.Bd -literal -offset indent
151*ba11c5b5SToomas Soomeinstallboot /boot/pmbr /boot/gptzfsboot /dev/rdsk/c0t0d0s0
152*ba11c5b5SToomas Soome.Ed
153*ba11c5b5SToomas Soome.Sh SEE ALSO
154*ba11c5b5SToomas Soome.Xr installboot 1M ,
155*ba11c5b5SToomas Soome.Xr zpool 1M ,
156*ba11c5b5SToomas Soome.Xr loader 5 ,
157*ba11c5b5SToomas Soome.Xr zfsloader 5
158