xref: /titanic_52/usr/src/man/man5/zfsloader.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 AUTHOR 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 AUTHOR 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 20, 2017
26*ba11c5b5SToomas Soome.Dt ZFSLOADER 5
27*ba11c5b5SToomas Soome.Os
28*ba11c5b5SToomas Soome.Sh NAME
29*ba11c5b5SToomas Soome.Nm zfsloader
30*ba11c5b5SToomas Soome.Nd kernel bootstrapping final stage
31*ba11c5b5SToomas Soome.Sh DESCRIPTION
32*ba11c5b5SToomas Soome.Nm
33*ba11c5b5SToomas Soomeis an extended variant of
34*ba11c5b5SToomas Soome.Xr loader 5
35*ba11c5b5SToomas Soomewith added support for booting from ZFS.
36*ba11c5b5SToomas SoomeThis document describes only differences from
37*ba11c5b5SToomas Soome.Xr loader 5 .
38*ba11c5b5SToomas Soome.Ss ZFS Features
39*ba11c5b5SToomas Soome.Nm
40*ba11c5b5SToomas Soomesupports the following format for specifying ZFS filesystems which
41*ba11c5b5SToomas Soomecan be used wherever
42*ba11c5b5SToomas Soome.Xr loader 5
43*ba11c5b5SToomas Soomerefers to a device specification:
44*ba11c5b5SToomas Soome.Pp
45*ba11c5b5SToomas Soome.Ar zfs:pool/filesystem:
46*ba11c5b5SToomas Soome.Pp
47*ba11c5b5SToomas Soomewhere
48*ba11c5b5SToomas Soome.Pa pool/filesystem
49*ba11c5b5SToomas Soomeis a ZFS filesystem name as described in
50*ba11c5b5SToomas Soome.Xr zfs 1M .
51*ba11c5b5SToomas Soome.Pp
52*ba11c5b5SToomas SoomeIf the variable
53*ba11c5b5SToomas Soome.Va fstype
54*ba11c5b5SToomas Soomeis not set, but
55*ba11c5b5SToomas Soome.Va currdev
56*ba11c5b5SToomas Soomerefers to a ZFS filesystem, then
57*ba11c5b5SToomas Soome.Nm
58*ba11c5b5SToomas Soomewill instruct kernel to use that filesystem as the root filesystem.
59*ba11c5b5SToomas Soome.Ss ZFS Command Extensions
60*ba11c5b5SToomas Soome.Bl -tag -width Ds -compact
61*ba11c5b5SToomas Soome.It Ic lsdev Op Fl v
62*ba11c5b5SToomas SoomeLists ZFS pools in addition to disks and partitions.
63*ba11c5b5SToomas SoomeAdding
64*ba11c5b5SToomas Soome.Fl v
65*ba11c5b5SToomas Soomeshows more ZFS pool details in a format that resembles
66*ba11c5b5SToomas Soome.Nm zpool Cm status
67*ba11c5b5SToomas Soomeoutput.
68*ba11c5b5SToomas Soome.Pp
69*ba11c5b5SToomas Soome.It Ic lszfs Ar filesystem
70*ba11c5b5SToomas SoomeA ZFS extended command that can be used to explore the ZFS filesystem
71*ba11c5b5SToomas Soomehierarchy in a pool.
72*ba11c5b5SToomas SoomeLists the immediate children of the
73*ba11c5b5SToomas Soome.Ar filesystem .
74*ba11c5b5SToomas SoomeThe filesystem hierarchy is rooted at a filesystem with the same name
75*ba11c5b5SToomas Soomeas the pool.
76*ba11c5b5SToomas Soome.El
77*ba11c5b5SToomas Soome.Sh FILES
78*ba11c5b5SToomas Soome.Bl -tag -width /boot/zfsloader -compact
79*ba11c5b5SToomas Soome.It Pa /boot/zfsloader
80*ba11c5b5SToomas Soome.Nm
81*ba11c5b5SToomas Soomeitself.
82*ba11c5b5SToomas Soome.El
83*ba11c5b5SToomas Soome.Sh EXAMPLES
84*ba11c5b5SToomas SoomeSet the default device used for loading a kernel from a ZFS filesystem:
85*ba11c5b5SToomas Soome.Bd -literal -offset indent
86*ba11c5b5SToomas Soomeset currdev=zfs:rpool/ROOT/knowngood:
87*ba11c5b5SToomas Soome.Ed
88*ba11c5b5SToomas Soome.Sh SEE ALSO
89*ba11c5b5SToomas Soome.Xr zfs 1M ,
90*ba11c5b5SToomas Soome.Xr zpool 1M ,
91*ba11c5b5SToomas Soome.Xr gptzfsboot 5 ,
92*ba11c5b5SToomas Soome.Xr loader 5
93*ba11c5b5SToomas Soome.Sh NOTES
94*ba11c5b5SToomas SoomeAlthough setting the
95*ba11c5b5SToomas Soome.Va currdev
96*ba11c5b5SToomas Soomeas shown in the example above is supported, it is advisable to use loader
97*ba11c5b5SToomas Soomebeadm command or boot environment menu instead. The reason is, the beadm
98*ba11c5b5SToomas Soomeor menu selection will also instruct loader to clean up the currently set
99*ba11c5b5SToomas Soomeconfiguration and load configuration from the new boot environment.
100