xref: /illumos-gate/usr/src/man/man7/gptzfsboot.7 (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
1.\" Copyright (c) 2014 Andriy Gapon <avg@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
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.
12.\"
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
23.\" SUCH DAMAGE.
24.\"
25.Dd July 17, 2019
26.Dt GPTZFSBOOT 7
27.Os
28.Sh NAME
29.Nm gptzfsboot
30.Nd disk bootcode for BIOS-based computers
31.Sh DESCRIPTION
32.Nm
33is used on BIOS-based computers to boot from a filesystem on disk device.
34Depending on disk partitioning and boot file system, the
35.Nm
36is installed in a
37.Cm zfs pool boot area
38or
39.Cm boot
40partition of a disk with
41.Xr installboot 8 .
42.Ss IMPLEMENTATION NOTES
43The GPT standard allows a variable number of partitions, but
44.Nm
45only boots from tables with 128 partitions or less.
46.Ss BOOTING
47.Nm
48tries to find all ZFS pools that are composed of BIOS-visible
49hard disks or partitions on them.
50.Nm
51looks for ZFS device labels on all visible disks and in discovered
52supported partitions for all supported partition scheme types.
53Disks are probed in BIOS defined order.
54After a disk is probed and
55.Nm
56determines that the whole disk is not a ZFS pool member, the
57individual partitions are probed in their partition table order.
58Currently GPT and MBR partition schemes are supported.
59.Pp
60The default boot partition is recorded into
61.Nm
62binary by
63.Xr installboot 8
64and the default boot file system is determined at run time.
65.Nm
66does support booting from the
67.Cm ZFS ,
68.Cm UFS
69and
70.Cm PCFS
71file systems.
72.Pp
73The filesystem specified by the
74.Cm bootfs
75property of the ZFS pool is used as a default boot filesystem.
76If the
77.Cm bootfs
78property is not set, then the root filesystem of the pool is used as
79the default.
80.Xr loader 7
81is loaded from the boot filesystem.
82If
83.Pa /boot/config
84is present in the boot filesystem, boot options are read from it.
85.Pp
86The ZFS GUIDs of the boot pool and boot file system are made available to
87.Xr loader 7 .
88.Ss USAGE
89Normally
90.Nm
91will boot in fully automatic mode.
92However, it is possible to interrupt the automatic boot process and
93interact with
94.Nm
95through a prompt.
96.Pp
97The filesystem specification and the path to
98.Xr loader 7
99is specified as
100.Pp
101.Sm off
102.Oo zfs:pool/filesystem: Oc Oo /path/to/loader Oc
103.Sm on
104.Pp
105Both the filesystem and the path can be specified.
106If only a path is specified, then the default filesystem is used.
107If only a pool and filesystem are specified, then
108.Pa /boot/loader
109is used as a path.
110.Pp
111Additionally, the
112.Nm
113does support two commands to get information about the system.
114.Ic ?directoryname
115can be used to list the content of named directory and
116.Ic status
117command can be used to query information about discovered devices.
118The output format for ZFS pools is similar to that of
119.Cm zpool status
120.Pq see Xr zpool 8 .
121.Pp
122The configured or automatically determined ZFS boot filesystem is
123stored in the
124.Xr loader 7
125.Cm loaddev
126variable, and also set as the initial value of the
127.Cm currdev
128variable.
129.Sh OPTIONS
130The following options are supported by
131.Nm
132and
133.Xr loader 7 :
134.Bl -tag -width indent
135.It Fl D
136Dual console.
137Use both text and serial console with
138.Nm
139and
140.Xr loader 7 .
141.It Fl P
142Probe for keyboard.
143If there is no keyboard, switch on the dual console and serial console.
144.It Fl S Ns Ar speed
145Set serial port speed.
146.It Fl h
147Set serial console.
148.It Fl q
149Keep the
150.Nm
151console quiet.
152.It Fl t
153Keep the VGA text mode for
154.Xr loader 7 .
155.El
156.Pp
157The following options will be passed to the kernel:
158.Bl -tag -width indent
159.It Fl s
160Single user
161.It Fl v
162Verbose boot
163.El
164.Sh FILES
165.Bl -tag -width /boot/gptzfsboot -compact
166.It Pa /boot/config
167parameters for the boot block
168.Pq optional
169.It Pa /boot/gptzfsboot
170boot code binary
171.El
172.Sh EXAMPLES
173.Nm
174is installed in combination with a
175.Dq protective MBR
176.Po
177see
178.Xr installboot 8
179.Pc .
180To install
181.Nm
182on the
183.Pa c0t0d0s0
184drive:
185.Bd -literal -offset indent
186installboot /boot/pmbr /boot/gptzfsboot /dev/rdsk/c0t0d0s0
187.Ed
188.Sh SEE ALSO
189.Xr loader 7 ,
190.Xr installboot 8 ,
191.Xr zpool 8
192