xref: /freebsd/sbin/bectl/bectl.8 (revision 20b5e47c9383974cdef648beaecbf05bf2242154)
15952343eSKyle Evans.\"
24d846d26SWarner Losh.\" SPDX-License-Identifier: BSD-2-Clause
3b179da01SKyle Evans.\"
4b179da01SKyle Evans.\" Copyright (c) 2017 Kyle J. Kneitinger <kyle@kneit.in>
55952343eSKyle Evans.\"
65952343eSKyle Evans.\" Redistribution and use in source and binary forms, with or without
75952343eSKyle Evans.\" modification, are permitted provided that the following conditions
85952343eSKyle Evans.\" are met:
95952343eSKyle Evans.\" 1. Redistributions of source code must retain the above copyright
105952343eSKyle Evans.\"    notice, this list of conditions and the following disclaimer.
115952343eSKyle Evans.\" 2. Redistributions in binary form must reproduce the above copyright
125952343eSKyle Evans.\"    notice, this list of conditions and the following disclaimer in the
135952343eSKyle Evans.\"    documentation and/or other materials provided with the distribution.
145952343eSKyle Evans.\"
155952343eSKyle Evans.\"
16a27e19a2SGraham Perrin.Dd April 9, 2024
17edbfe3bcSKyle Evans.Dt BECTL 8
1884e61219SKyle Evans.Os
195952343eSKyle Evans.Sh NAME
20edbfe3bcSKyle Evans.Nm bectl
2177688bffSMateusz Piotrowski.Nd Utility to manage boot environments on ZFS
225952343eSKyle Evans.Sh SYNOPSIS
235952343eSKyle Evans.Nm
24e819534fSDag-Erling Smørgrav.Op Fl h
2569271761SGraham Perrin.Nm
264163bae0SKyle Evans.Op Fl r Ar beroot
27d81df689SKyle Evans.Cm activate
28e307eb94SToomas Soome.Op Fl t | Fl T
29d81df689SKyle Evans.Ar beName
305952343eSKyle Evans.Nm
314163bae0SKyle Evans.Op Fl r Ar beroot
32490e13c1SKyle Evans.Cm check
33490e13c1SKyle Evans.Nm
344163bae0SKyle Evans.Op Fl r Ar beroot
35d81df689SKyle Evans.Cm create
365952343eSKyle Evans.Op Fl r
3777688bffSMateusz Piotrowski.Op Fl e Brq Ar nonActiveBe | Ar beName Ns Cm @ Ns Ar snapshot
3877688bffSMateusz Piotrowski.Ar newBeName
395952343eSKyle Evans.Nm
404163bae0SKyle Evans.Op Fl r Ar beroot
4155ece394SKyle Evans.Cm create
4255ece394SKyle Evans.Op Fl r
4355ece394SKyle Evans.Ar beName@snapshot
4455ece394SKyle Evans.Nm
454163bae0SKyle Evans.Op Fl r Ar beroot
46d81df689SKyle Evans.Cm destroy
4777b4126cSKyle Evans.Op Fl \&Fo
4877688bffSMateusz Piotrowski.Ar beName Ns Op Cm @ Ns Ar snapshot
495952343eSKyle Evans.Nm
504163bae0SKyle Evans.Op Fl r Ar beroot
51d81df689SKyle Evans.Cm export
52d81df689SKyle Evans.Ar sourceBe
5334761e84SKyle Evans.Nm
544163bae0SKyle Evans.Op Fl r Ar beroot
55d81df689SKyle Evans.Cm import
56d81df689SKyle Evans.Ar targetBe
5734761e84SKyle Evans.Nm
584163bae0SKyle Evans.Op Fl r Ar beroot
59d81df689SKyle Evans.Cm jail
6077688bffSMateusz Piotrowski.Op Fl bU
6177688bffSMateusz Piotrowski.Oo Bro Fl o Ar key Ns Cm = Ns Ar value | Fl u Ar key Brc Oc Ns ...
6277688bffSMateusz Piotrowski.Ar beName
63cd816834SKyle Evans.Op Ar utility Op Ar argument ...
645952343eSKyle Evans.Nm
654163bae0SKyle Evans.Op Fl r Ar beroot
66d81df689SKyle Evans.Cm list
6777688bffSMateusz Piotrowski.Op Fl aDHs
68f0298be0SKyle Evans.Op Fl c Ar property
69f0298be0SKyle Evans.Op Fl C Ar property
70f0298be0SKyle Evans.Oo Bro Fl c Ar property | Fl C Ar property Brc Oc
715952343eSKyle Evans.Nm
724163bae0SKyle Evans.Op Fl r Ar beroot
73d81df689SKyle Evans.Cm mount
74d81df689SKyle Evans.Ar beName
7577688bffSMateusz Piotrowski.Op Ar mountpoint
765952343eSKyle Evans.Nm
774163bae0SKyle Evans.Op Fl r Ar beroot
78d81df689SKyle Evans.Cm rename
79d81df689SKyle Evans.Ar origBeName
80d81df689SKyle Evans.Ar newBeName
815952343eSKyle Evans.Nm
824163bae0SKyle Evans.Op Fl r Ar beroot
83d81df689SKyle Evans.Brq Cm ujail | unjail
84b1ea63e2SRobert Wing.Brq Ar jailId | jailName | beName
855952343eSKyle Evans.Nm
864163bae0SKyle Evans.Op Fl r Ar beroot
87d81df689SKyle Evans.Brq Cm umount | unmount
885952343eSKyle Evans.Op Fl f
89d81df689SKyle Evans.Ar beName
905952343eSKyle Evans.Sh DESCRIPTION
915952343eSKyle EvansThe
925952343eSKyle Evans.Nm
93d81df689SKyle Evanscommand is used to setup and interact with ZFS boot environments, which are
94d81df689SKyle Evansbootable clones of datasets.
955952343eSKyle Evans.Pp
9669271761SGraham PerrinA boot environment allows the system to be upgraded, while preserving the
9769271761SGraham Perrinpre-upgrade system environment.
9877688bffSMateusz Piotrowski.Pp
994163bae0SKyle Evans.Nm
1004163bae0SKyle Evansitself accepts an
1014163bae0SKyle Evans.Fl r
1024163bae0SKyle Evansflag specified before the command to indicate the
1034163bae0SKyle Evans.Ar beroot
1044163bae0SKyle Evansthat should be used as the boot environment root, or the dataset whose children
1054163bae0SKyle Evansare all boot environments.
1064163bae0SKyle EvansNormally this information is derived from the bootfs property of the pool that
1074163bae0SKyle Evansis mounted at
1084163bae0SKyle Evans.Pa / ,
1094163bae0SKyle Evansbut it is useful when the system has not been booted into a ZFS root or a
1104163bae0SKyle Evansdifferent pool should be operated on.
1114163bae0SKyle EvansFor instance, booting into the recovery media and manually importing a pool from
1124163bae0SKyle Evansone of the system's resident disks will require the
1134163bae0SKyle Evans.Fl r
1144163bae0SKyle Evansflag to work.
11569271761SGraham Perrin.Ss Supported Subcommands and Flags
1165952343eSKyle Evans.Bl -tag -width activate
117d81df689SKyle Evans.It Xo
118e819534fSDag-Erling Smørgrav.Fl h
1199b03a5deSKyle Evans.Xc
120e819534fSDag-Erling SmørgravPrint usage information and exit.
12169271761SGraham Perrin.It Xo
122d81df689SKyle Evans.Cm activate
123e307eb94SToomas Soome.Op Fl t | Fl T
124d81df689SKyle Evans.Ar beName
125d81df689SKyle Evans.Xc
1265952343eSKyle EvansActivate the given
1275952343eSKyle Evans.Ar beName
12884e61219SKyle Evansas the default boot filesystem.
12984e61219SKyle EvansIf the
13055b954c6SMateusz Piotrowski.Fl t
1315952343eSKyle Evansflag is given, this takes effect only for the next boot.
132e307eb94SToomas SoomeFlag
133e307eb94SToomas Soome.Fl T
134e307eb94SToomas Soomeremoves temporary boot once configuration.
135e307eb94SToomas SoomeWithout temporary configuration, the next boot will use zfs dataset specified
136e307eb94SToomas Soomein boot pool
137e307eb94SToomas Soome.Ar bootfs
138e307eb94SToomas Soomeproperty.
139d81df689SKyle Evans.It Xo
140490e13c1SKyle Evans.Cm check
141490e13c1SKyle Evans.Xc
142490e13c1SKyle EvansPerforms a silent sanity check on the current system.
143490e13c1SKyle EvansIf boot environments are supported and used,
144490e13c1SKyle Evans.Nm
145490e13c1SKyle Evanswill exit with a status code of 0.
146490e13c1SKyle EvansAny other status code is not currently defined and may, in the future, grow
147490e13c1SKyle Evansspecial meaning for different degrees of sanity check failures.
148490e13c1SKyle Evans.It Xo
149d81df689SKyle Evans.Cm create
1505952343eSKyle Evans.Op Fl r
15177688bffSMateusz Piotrowski.Op Fl e Brq Ar nonActiveBe | Ar beName Ns Cm @ Ns Ar snapshot
15277688bffSMateusz Piotrowski.Ar newBeName
153d81df689SKyle Evans.Xc
15477688bffSMateusz PiotrowskiCreate a new boot environment named
15577688bffSMateusz Piotrowski.Ar newBeName .
15677688bffSMateusz Piotrowski.Pp
15777688bffSMateusz PiotrowskiIf the
15877688bffSMateusz Piotrowski.Fl r
15977688bffSMateusz Piotrowskiflag is given, a recursive boot environment will be made.
160c0f846ffSKyle EvansSee
161c0f846ffSKyle Evans.Sx Boot Environment Structures
162c0f846ffSKyle Evansfor a discussion on different layouts.
16377688bffSMateusz Piotrowski.Pp
1645952343eSKyle EvansIf the
165d81df689SKyle Evans.Fl e
16677688bffSMateusz Piotrowskiflag is specified, the new environment will be cloned from the given
16777688bffSMateusz Piotrowski.Ar nonActiveBe
16877688bffSMateusz Piotrowskior
16977688bffSMateusz Piotrowski.Ar beName Ns Cm @ Ns Ar snapshot .
1704163bae0SKyle EvansOtherwise, the new environment will be created from the currently booted
1714163bae0SKyle Evansenvironment.
17277688bffSMateusz Piotrowski.Pp
17377688bffSMateusz PiotrowskiIf
17477688bffSMateusz Piotrowski.Nm
1754163bae0SKyle Evansis creating from another boot environment, a snapshot of that boot environment
1764163bae0SKyle Evanswill be created to clone from.
177d81df689SKyle Evans.It Xo
17855ece394SKyle Evans.Cm create
17955ece394SKyle Evans.Op Fl r
18055ece394SKyle Evans.Ar beName@snapshot
18155ece394SKyle Evans.Xc
18255ece394SKyle EvansCreate a snapshot of the boot environment named
18355ece394SKyle Evans.Ar beName .
18455ece394SKyle Evans.Pp
18555ece394SKyle EvansIf the
18655ece394SKyle Evans.Fl r
18755ece394SKyle Evansflag is given, a recursive snapshot of the boot environment will be created.
18855ece394SKyle EvansA snapshot is created for each descendant dataset of the boot environment.
189c0f846ffSKyle EvansSee
190c0f846ffSKyle Evans.Sx Boot Environment Structures
191c0f846ffSKyle Evansfor a discussion on different layouts.
19255ece394SKyle Evans.Pp
19369271761SGraham PerrinNo new boot environment is created with this subcommand.
19455ece394SKyle Evans.It Xo
195d81df689SKyle Evans.Cm destroy
19677b4126cSKyle Evans.Op Fl \&Fo
19777688bffSMateusz Piotrowski.Ar beName Ns Op Cm @ Ns Ar snapshot
198d81df689SKyle Evans.Xc
19977688bffSMateusz PiotrowskiDestroy the given
2005952343eSKyle Evans.Ar beName
2015952343eSKyle Evansboot environment or
20277688bffSMateusz Piotrowski.Ar beName Ns Cm @ Ns Ar snapshot
2038369ba42SKyle Evanssnapshot without confirmation, unlike in
204a27e19a2SGraham Perrin.Xr beadm 8 .
2055952343eSKyle EvansSpecifying
2065952343eSKyle Evans.Fl F
2075952343eSKyle Evanswill automatically unmount without confirmation.
20877b4126cSKyle Evans.Pp
20977b4126cSKyle EvansBy default,
21077b4126cSKyle Evans.Nm
21177b4126cSKyle Evanswill warn that it is not destroying the origin of
21277b4126cSKyle Evans.Ar beName .
21377b4126cSKyle EvansThe
21477b4126cSKyle Evans.Fl o
21577b4126cSKyle Evansflag may be specified to destroy the origin as well.
216d81df689SKyle Evans.It Cm export Ar sourceBe
21734761e84SKyle EvansExport
21834761e84SKyle Evans.Ar sourceBe
21934761e84SKyle Evansto
22077688bffSMateusz Piotrowski.Xr stdout 4 .
22177688bffSMateusz Piotrowski.Xr stdout 4
22234761e84SKyle Evansmust be piped or redirected to a file.
223d81df689SKyle Evans.It Cm import Ar targetBe
22434761e84SKyle EvansImport
22534761e84SKyle Evans.Ar targetBe
22634761e84SKyle Evansfrom
22777688bffSMateusz Piotrowski.Xr stdin 4 .
228d81df689SKyle Evans.It Xo
229d81df689SKyle Evans.Cm jail
23077688bffSMateusz Piotrowski.Op Fl bU
23177688bffSMateusz Piotrowski.Oo Bro Fl o Ar key Ns Cm = Ns Ar value | Fl u Ar key Brc Oc Ns ...
23277688bffSMateusz Piotrowski.Ar beName
233cd816834SKyle Evans.Op Ar utility Op Ar argument ...
234d81df689SKyle Evans.Xc
23577688bffSMateusz PiotrowskiCreate a jail of the given boot environment.
236d694059fSKyle EvansMultiple
237d694059fSKyle Evans.Fl o
2382a0b8dc2SKyle Evansand
2392a0b8dc2SKyle Evans.Fl u
240d694059fSKyle Evansarguments may be specified.
2412a0b8dc2SKyle Evans.Fl o
2422a0b8dc2SKyle Evanswill set a jail parameter, and
2432a0b8dc2SKyle Evans.Fl u
2442a0b8dc2SKyle Evanswill unset a jail parameter.
245cd816834SKyle Evans.Pp
246cd816834SKyle EvansBy default, jails are created in interactive mode and
247cd816834SKyle Evans.Pa /bin/sh
248cd816834SKyle Evansis
249b509cad4SKyle Evansexecuted within the jail.
250cd816834SKyle EvansIf
251cd816834SKyle Evans.Ar utility
252cd816834SKyle Evansis specified, it will be executed instead of
253cd816834SKyle Evans.Pa /bin/sh .
254db9db0e7SKyle EvansThe jail will be destroyed and the boot environment unmounted when the command
255db9db0e7SKyle Evansfinishes executing, unless the
256db9db0e7SKyle Evans.Fl U
257db9db0e7SKyle Evansargument is specified.
258cd816834SKyle Evans.Pp
259b509cad4SKyle EvansThe
260b509cad4SKyle Evans.Fl b
261b509cad4SKyle Evansargument enables batch mode, thereby disabling interactive mode.
262db9db0e7SKyle EvansThe
263db9db0e7SKyle Evans.Fl U
264db9db0e7SKyle Evansargument will be ignored in batch mode.
2652a0b8dc2SKyle Evans.Pp
2662a0b8dc2SKyle EvansThe
2672a0b8dc2SKyle Evans.Va name ,
2682a0b8dc2SKyle Evans.Va host.hostname ,
2692a0b8dc2SKyle Evansand
2702a0b8dc2SKyle Evans.Va path
2717ce09314SKyle Evansmust be set, the default values are specified below.
2722a0b8dc2SKyle Evans.Pp
2732a0b8dc2SKyle EvansAll
27477688bffSMateusz Piotrowski.Ar key Ns Cm = Ns Ar value
275d694059fSKyle Evanspairs are interpreted as jail parameters as described in
276d694059fSKyle Evans.Xr jail 8 .
277d694059fSKyle EvansThe following default parameters are provided:
278d81df689SKyle Evans.Bl -column "allow.mount.devfs" ""
279d81df689SKyle Evans.It Va allow.mount Ta Cm true
280d81df689SKyle Evans.It Va allow.mount.devfs Ta Cm true
281d81df689SKyle Evans.It Va enforce_statfs Ta Cm 1
28277688bffSMateusz Piotrowski.It Va name Ta Set to jail ID.
283d81df689SKyle Evans.It Va host.hostname Ta Va bootenv
28477688bffSMateusz Piotrowski.It Va path Ta Set to a path in Pa /tmp
28577688bffSMateusz Piotrowskigenerated by
28684e61219SKyle Evans.Xr libbe 3 .
287d694059fSKyle Evans.El
2885952343eSKyle Evans.Pp
2892a0b8dc2SKyle EvansAll default parameters may be overwritten.
290f0298be0SKyle Evans.It Xo
291f0298be0SKyle Evans.Cm list
292b1ea63e2SRobert Wing.Op Fl aDHs
293f0298be0SKyle Evans.Oo Bro Fl c Ar property | Fl C Ar property Brc Oc
294f0298be0SKyle Evans.Xc
295f0298be0SKyle Evans.Pp
29677688bffSMateusz PiotrowskiDisplay all boot environments.
29777688bffSMateusz PiotrowskiThe
29877688bffSMateusz Piotrowski.Em Active
29977688bffSMateusz Piotrowskifield indicates whether the boot environment is active now
30077688bffSMateusz Piotrowski.Pq Em \&N ;
30177688bffSMateusz Piotrowskiactive on reboot
30277688bffSMateusz Piotrowski.Pq Em \&R ;
303e307eb94SToomas Soomeis used on next boot once
304e307eb94SToomas Soome.Pq Em \&T ;
305e307eb94SToomas Soomeor combination of
306e307eb94SToomas Soome.Pq Em \&NRT .
307f0298be0SKyle Evans.Bl -tag -width indent
308f0298be0SKyle Evans.It Fl a
309f0298be0SKyle EvansDisplay all datasets.
310f0298be0SKyle Evans.It Fl D
311f0298be0SKyle EvansDisplay the full space usage for each boot environment, assuming all
312d81df689SKyle Evansother boot environments were destroyed.
313f0298be0SKyle Evans.It Fl H
314f0298be0SKyle EvansUsed for scripting.
315f0298be0SKyle EvansDo not print headers and separate fields by a single tab instead of
316d81df689SKyle Evansarbitrary white space.
317f0298be0SKyle Evans.It Fl s
318f0298be0SKyle EvansDisplay all snapshots as well.
319f0298be0SKyle Evans.It Fl c Ar property
32069271761SGraham PerrinSort boot environments by the given ZFS dataset property.
321f0298be0SKyle EvansThe following properties are supported:
322f0298be0SKyle Evans.Pp
323f0298be0SKyle Evans.Bl -tag -width 4n -offset indent -compact
32469271761SGraham Perrin.It name (the default)
325f0298be0SKyle Evans.It creation
326f0298be0SKyle Evans.It origin
327f0298be0SKyle Evans.It used
32869271761SGraham Perrin.It usedbydataset
32969271761SGraham Perrin.It usedbyrefreservation
33069271761SGraham Perrin.It usedbysnapshots
331f0298be0SKyle Evans.El
33269271761SGraham Perrin.Pp
33369271761SGraham PerrinShort forms usedds, usedrefreserv and usedsnap are also supported.
334f0298be0SKyle Evans.It Fl C Ar property
335f0298be0SKyle EvansSame as the
336f0298be0SKyle Evans.Fl c
337f0298be0SKyle Evansoption, but displays in descending order.
338f0298be0SKyle Evans.El
339f0298be0SKyle Evans.Pp
340f0298be0SKyle EvansThe
341f0298be0SKyle Evans.Fl D
342f0298be0SKyle Evansoption is ignored when either the
3435952343eSKyle Evans.Fl s
344f0298be0SKyle Evansor
345f0298be0SKyle Evans.Fl a
346f0298be0SKyle Evansoption is used.
347d81df689SKyle Evans.It Cm mount Ar beName Op Ar mountpoint
34869271761SGraham PerrinMount the given boot environment.
34969271761SGraham Perrin.Pp
35069271761SGraham PerrinIf a nonexistent
3515952343eSKyle Evans.Ar mountpoint
35269271761SGraham Perrinis given:
35369271761SGraham Perrin.Nm
35469271761SGraham Perrinwill make the directory, including intermediate directories as required.
35569271761SGraham Perrin.Pp
35669271761SGraham PerrinIf no
35769271761SGraham Perrin.Ar mountpoint
35869271761SGraham Perrinis given:
35969271761SGraham Perrin.Nm
36069271761SGraham Perrinwill make a directory such as
36169271761SGraham Perrin.Pa be_mount.c6Sf
36269271761SGraham Perrinin
36369271761SGraham Perrin.Pa /tmp .
36469271761SGraham PerrinRandomness in the last four characters of the directory name will prevent
36569271761SGraham Perrinmount point conflicts.
36669271761SGraham PerrinUnmount of an environment, followed by mount of the same environment
36769271761SGraham Perrinwithout giving a
36869271761SGraham Perrin.Ar mountpoint ,
36969271761SGraham Perrinwill result in a different randomly-named mountpoint.
370d81df689SKyle Evans.It Cm rename Ar origBeName newBeName
37177688bffSMateusz PiotrowskiRename the given
3725952343eSKyle Evans.Ar origBeName
3735952343eSKyle Evansto the given
374d81df689SKyle Evans.Ar newBeName .
3758369ba42SKyle EvansThe boot environment will not be unmounted in order for this rename to occur.
376b1ea63e2SRobert Wing.It Cm ujail Brq Ar jailId | jailName | beName
377b1ea63e2SRobert Wing.It Cm unjail Brq Ar jailId | jailName | beName
37877688bffSMateusz PiotrowskiDestroy the jail created from the given boot environment.
37977688bffSMateusz Piotrowski.It Xo
38077688bffSMateusz Piotrowski.Cm umount
38177688bffSMateusz Piotrowski.Op Fl f
38277688bffSMateusz Piotrowski.Ar beName
38377688bffSMateusz Piotrowski.Xc
384d81df689SKyle Evans.It Xo
385d81df689SKyle Evans.Cm unmount
3865952343eSKyle Evans.Op Fl f
387d81df689SKyle Evans.Ar beName
388d81df689SKyle Evans.Xc
3895952343eSKyle EvansUnmount the given boot environment, if it is mounted.
3905952343eSKyle EvansSpecifying
3915952343eSKyle Evans.Fl f
3925952343eSKyle Evanswill force the unmount if busy.
39369271761SGraham Perrin.Pp
39469271761SGraham PerrinUnmount will not remove the mount point.
3955952343eSKyle Evans.El
396c0f846ffSKyle Evans.Ss Boot Environment Structures
397c0f846ffSKyle EvansThe traditional
398c0f846ffSKyle Evans.Fx
399c0f846ffSKyle Evansboot environment layout, as created by the Auto ZFS option to
400c0f846ffSKyle Evans.Xr bsdinstall 8 ,
401c0f846ffSKyle Evansis a
402c0f846ffSKyle Evans.Dq shallow
403c0f846ffSKyle Evansboot environment structure, where boot environment datasets do not have any
404c0f846ffSKyle Evansdirectly subordinate datasets.
405c0f846ffSKyle EvansInstead, they're organized off in
406c0f846ffSKyle Evans.Pa zroot/ROOT ,
407c0f846ffSKyle Evansand they rely on datasets elsewhere in the pool having
408c0f846ffSKyle Evans.Dv canmount
409c0f846ffSKyle Evansset to
410c0f846ffSKyle Evans.Dv off .
411c0f846ffSKyle EvansFor instance, a simplified pool may be laid out as such:
412c0f846ffSKyle Evans.Bd -literal -offset indent
413c0f846ffSKyle Evans% zfs list -o name,canmount,mountpoint
414c0f846ffSKyle EvansNAME			CANMOUNT	MOUNTPOINT
415c0f846ffSKyle Evanszroot
416c0f846ffSKyle Evanszroot/ROOT		noauto		none
417c0f846ffSKyle Evanszroot/ROOT/default	noauto		none
4188955236aSMike Karelszroot/home		on		/home
419c0f846ffSKyle Evanszroot/usr		off		/usr
4208955236aSMike Karelszroot/usr/src		on		/usr/src
4218955236aSMike Karelszroot/var		off		/var
422c0f846ffSKyle Evans.Ed
423c0f846ffSKyle Evans.Pp
424c0f846ffSKyle EvansIn that example,
425c0f846ffSKyle Evans.Pa zroot/usr
426c0f846ffSKyle Evanshas
427c0f846ffSKyle Evans.Dv canmount
428c0f846ffSKyle Evansset to
429c0f846ffSKyle Evans.Dv off ,
430c0f846ffSKyle Evansthus files in
431c0f846ffSKyle Evans.Pa /usr
432c0f846ffSKyle Evanstypically fall into the boot environment because this dataset is not mounted.
4338955236aSMike Karels.Pa zroot/usr/src
434c0f846ffSKyle Evansis mounted, thus files in
4358955236aSMike Karels.Pa /usr/src
436c0f846ffSKyle Evansare not in the boot environment.
437c0f846ffSKyle Evans.Pp
438c0f846ffSKyle EvansThe other style of boot environments in use, frequently called
439c0f846ffSKyle Evans.Dq deep boot environments ,
440c0f846ffSKyle Evansorganizes some or all of the boot environment as subordinate to the boot
441c0f846ffSKyle Evansenvironment dataset.
442c0f846ffSKyle EvansFor example:
443c0f846ffSKyle Evans.Bd -literal -offset indent
444c0f846ffSKyle Evans% zfs list -o name,canmount,mountpoint
445c0f846ffSKyle EvansNAME				CANMOUNT	MOUNTPOINT
446c0f846ffSKyle Evanszroot
447c0f846ffSKyle Evanszroot/ROOT			noauto		none
448c0f846ffSKyle Evanszroot/ROOT/default		noauto		none
449c0f846ffSKyle Evanszroot/ROOT/default/usr		noauto		/usr
450c0f846ffSKyle Evanszroot/ROOT/default/usr/local	noauto		/usr/local
451c0f846ffSKyle Evanszroot/var			on		/var
452c0f846ffSKyle Evans.Ed
453c0f846ffSKyle Evans.Pp
454c0f846ffSKyle EvansNote that the subordinate datasets now have
455c0f846ffSKyle Evans.Dv canmount
456c0f846ffSKyle Evansset to
457c0f846ffSKyle Evans.Dv noauto .
458c0f846ffSKyle EvansThese are more obviously a part of the boot environment, as indicated by their
459c0f846ffSKyle Evanspositioning in the layout.
460c0f846ffSKyle EvansThese subordinate datasets will be mounted by the
461c0f846ffSKyle Evans.Dv zfsbe
462c0f846ffSKyle Evans.Xr rc 8
463c0f846ffSKyle Evansscript at boot time.
464c0f846ffSKyle EvansIn this example,
465c0f846ffSKyle Evans.Pa /var
466c0f846ffSKyle Evansis excluded from the boot environment.
467c0f846ffSKyle Evans.Pp
468c0f846ffSKyle Evans.Nm
46969271761SGraham Perrinsubcommands that have their own
470c0f846ffSKyle Evans.Fl r
471c0f846ffSKyle Evansoperate on this second,
472c0f846ffSKyle Evans.Dq deep
473c0f846ffSKyle Evansstyle of boot environment, when the
474c0f846ffSKyle Evans.Fl r
475c0f846ffSKyle Evansflag is set.
476c0f846ffSKyle EvansA future version of
477c0f846ffSKyle Evans.Nm
478c0f846ffSKyle Evansmay default to handling both styles and deprecate the various
479c0f846ffSKyle Evans.Fl r
480c0f846ffSKyle Evansflags.
4819b03a5deSKyle Evans.\" .Sh EXAMPLES
4829b03a5deSKyle Evans.\" .Bl -bullet
4839b03a5deSKyle Evans.\" .It
4849b03a5deSKyle Evans.\" To fill in with jail upgrade example when behavior is firm.
4859b03a5deSKyle Evans.\" .El
4865952343eSKyle Evans.Sh SEE ALSO
487f5c8cb4cSMateusz Piotrowski.Xr libbe 3 ,
48869271761SGraham Perrin.Xr zfsprops 7 ,
489cb67aaf2SAlan Somers.Xr beinstall.sh 8 ,
4905952343eSKyle Evans.Xr jail 8 ,
4915952343eSKyle Evans.Xr zfs 8 ,
4925952343eSKyle Evans.Xr zpool 8
4935952343eSKyle Evans.Sh HISTORY
4945952343eSKyle Evans.Nm
495a27e19a2SGraham Perrinand
496a27e19a2SGraham Perrin.Xr libbe 3
497a27e19a2SGraham Perrinwere written by
498a27e19a2SGraham Perrin.An Kyle Kneitinger (kneitinger) Aq Mt kyle@kneit.in
499a27e19a2SGraham Perrinas a 2017 Google Summer of Code project, with
500a27e19a2SGraham Perrin.An Allan Jude (allanjude) Aq Mt allanjude@freebsd.org
501a27e19a2SGraham Perrinas mentor.
502a27e19a2SGraham Perrin.Pp
503d81df689SKyle Evans.Nm
5046e3e24d1SGraham Perrinand this manual page were derived from
505a27e19a2SGraham Perrin.Xr beadm 8 .
506a27e19a2SGraham Perrin.Sh AUTHORS
507a27e19a2SGraham Perrin.An Slawomir Wojciech Wojtczak (vermaden) Aq Mt vermaden@interia.pl
508a27e19a2SGraham Perrinis the creator and maintainer of
509984f5037SGraham Perrin.Xr beadm 8 .
51034761e84SKyle Evans.An Bryan Drewery (bdrewery) Aq Mt bryan@shatow.net
511984f5037SGraham Perrincontributed child dataset fixes, and wrote the
512984f5037SGraham Perrin.Xr beadm 8
513984f5037SGraham Perrinmanual page.
514a27e19a2SGraham Perrin.Pp
515*20b5e47cSGraham PerrinMost later changes to
516*20b5e47cSGraham Perrin.Nm ,
517*20b5e47cSGraham Perrinand to this page, were written by
518a27e19a2SGraham Perrin.An Kyle Evans (kevans) Aq Mt kevans@freebsd.org .
519