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.\" 165952343eSKyle Evans.\" @(#)be.1 17b6e7c421SKyle Evans.\" 185952343eSKyle Evans.\" $FreeBSD$ 195952343eSKyle Evans.\" 20*69271761SGraham Perrin.Dd June 28, 2023 21edbfe3bcSKyle Evans.Dt BECTL 8 2284e61219SKyle Evans.Os 235952343eSKyle Evans.Sh NAME 24edbfe3bcSKyle Evans.Nm bectl 2577688bffSMateusz Piotrowski.Nd Utility to manage boot environments on ZFS 265952343eSKyle Evans.Sh SYNOPSIS 275952343eSKyle Evans.Nm 28*69271761SGraham Perrin.Op Fl h\&? 29*69271761SGraham Perrin.Nm 304163bae0SKyle Evans.Op Fl r Ar beroot 31d81df689SKyle Evans.Cm activate 32e307eb94SToomas Soome.Op Fl t | Fl T 33d81df689SKyle Evans.Ar beName 345952343eSKyle Evans.Nm 354163bae0SKyle Evans.Op Fl r Ar beroot 36490e13c1SKyle Evans.Cm check 37490e13c1SKyle Evans.Nm 384163bae0SKyle Evans.Op Fl r Ar beroot 39d81df689SKyle Evans.Cm create 405952343eSKyle Evans.Op Fl r 4177688bffSMateusz Piotrowski.Op Fl e Brq Ar nonActiveBe | Ar beName Ns Cm @ Ns Ar snapshot 4277688bffSMateusz Piotrowski.Ar newBeName 435952343eSKyle Evans.Nm 444163bae0SKyle Evans.Op Fl r Ar beroot 4555ece394SKyle Evans.Cm create 4655ece394SKyle Evans.Op Fl r 4755ece394SKyle Evans.Ar beName@snapshot 4855ece394SKyle Evans.Nm 494163bae0SKyle Evans.Op Fl r Ar beroot 50d81df689SKyle Evans.Cm destroy 5177b4126cSKyle Evans.Op Fl \&Fo 5277688bffSMateusz Piotrowski.Ar beName Ns Op Cm @ Ns Ar snapshot 535952343eSKyle Evans.Nm 544163bae0SKyle Evans.Op Fl r Ar beroot 55d81df689SKyle Evans.Cm export 56d81df689SKyle Evans.Ar sourceBe 5734761e84SKyle Evans.Nm 584163bae0SKyle Evans.Op Fl r Ar beroot 59d81df689SKyle Evans.Cm import 60d81df689SKyle Evans.Ar targetBe 6134761e84SKyle Evans.Nm 624163bae0SKyle Evans.Op Fl r Ar beroot 63d81df689SKyle Evans.Cm jail 6477688bffSMateusz Piotrowski.Op Fl bU 6577688bffSMateusz Piotrowski.Oo Bro Fl o Ar key Ns Cm = Ns Ar value | Fl u Ar key Brc Oc Ns ... 6677688bffSMateusz Piotrowski.Ar beName 67cd816834SKyle Evans.Op Ar utility Op Ar argument ... 685952343eSKyle Evans.Nm 694163bae0SKyle Evans.Op Fl r Ar beroot 70d81df689SKyle Evans.Cm list 7177688bffSMateusz Piotrowski.Op Fl aDHs 72f0298be0SKyle Evans.Op Fl c Ar property 73f0298be0SKyle Evans.Op Fl C Ar property 74f0298be0SKyle Evans.Oo Bro Fl c Ar property | Fl C Ar property Brc Oc 755952343eSKyle Evans.Nm 764163bae0SKyle Evans.Op Fl r Ar beroot 77d81df689SKyle Evans.Cm mount 78d81df689SKyle Evans.Ar beName 7977688bffSMateusz Piotrowski.Op Ar mountpoint 805952343eSKyle Evans.Nm 814163bae0SKyle Evans.Op Fl r Ar beroot 82d81df689SKyle Evans.Cm rename 83d81df689SKyle Evans.Ar origBeName 84d81df689SKyle Evans.Ar newBeName 855952343eSKyle Evans.Nm 864163bae0SKyle Evans.Op Fl r Ar beroot 87d81df689SKyle Evans.Brq Cm ujail | unjail 88b1ea63e2SRobert Wing.Brq Ar jailId | jailName | beName 895952343eSKyle Evans.Nm 904163bae0SKyle Evans.Op Fl r Ar beroot 91d81df689SKyle Evans.Brq Cm umount | unmount 925952343eSKyle Evans.Op Fl f 93d81df689SKyle Evans.Ar beName 945952343eSKyle Evans.Sh DESCRIPTION 955952343eSKyle EvansThe 965952343eSKyle Evans.Nm 97d81df689SKyle Evanscommand is used to setup and interact with ZFS boot environments, which are 98d81df689SKyle Evansbootable clones of datasets. 995952343eSKyle Evans.Pp 100*69271761SGraham PerrinA boot environment allows the system to be upgraded, while preserving the 101*69271761SGraham Perrinpre-upgrade system environment. 10277688bffSMateusz Piotrowski.Pp 1034163bae0SKyle Evans.Nm 1044163bae0SKyle Evansitself accepts an 1054163bae0SKyle Evans.Fl r 1064163bae0SKyle Evansflag specified before the command to indicate the 1074163bae0SKyle Evans.Ar beroot 1084163bae0SKyle Evansthat should be used as the boot environment root, or the dataset whose children 1094163bae0SKyle Evansare all boot environments. 1104163bae0SKyle EvansNormally this information is derived from the bootfs property of the pool that 1114163bae0SKyle Evansis mounted at 1124163bae0SKyle Evans.Pa / , 1134163bae0SKyle Evansbut it is useful when the system has not been booted into a ZFS root or a 1144163bae0SKyle Evansdifferent pool should be operated on. 1154163bae0SKyle EvansFor instance, booting into the recovery media and manually importing a pool from 1164163bae0SKyle Evansone of the system's resident disks will require the 1174163bae0SKyle Evans.Fl r 1184163bae0SKyle Evansflag to work. 1194163bae0SKyle Evans.Pp 120*69271761SGraham Perrin.Ss Supported Subcommands and Flags 1215952343eSKyle Evans.Bl -tag -width activate 122d81df689SKyle Evans.It Xo 123*69271761SGraham Perrin.Fl h | 124*69271761SGraham Perrin.Fl \&? 125*69271761SGraham PerrinPrint usage information. 126*69271761SGraham Perrin.It Xo 127d81df689SKyle Evans.Cm activate 128e307eb94SToomas Soome.Op Fl t | Fl T 129d81df689SKyle Evans.Ar beName 130d81df689SKyle Evans.Xc 1315952343eSKyle EvansActivate the given 1325952343eSKyle Evans.Ar beName 13384e61219SKyle Evansas the default boot filesystem. 13484e61219SKyle EvansIf the 13555b954c6SMateusz Piotrowski.Fl t 1365952343eSKyle Evansflag is given, this takes effect only for the next boot. 137e307eb94SToomas SoomeFlag 138e307eb94SToomas Soome.Fl T 139e307eb94SToomas Soomeremoves temporary boot once configuration. 140e307eb94SToomas SoomeWithout temporary configuration, the next boot will use zfs dataset specified 141e307eb94SToomas Soomein boot pool 142e307eb94SToomas Soome.Ar bootfs 143e307eb94SToomas Soomeproperty. 144d81df689SKyle Evans.It Xo 145490e13c1SKyle Evans.Cm check 146490e13c1SKyle Evans.Xc 147490e13c1SKyle EvansPerforms a silent sanity check on the current system. 148490e13c1SKyle EvansIf boot environments are supported and used, 149490e13c1SKyle Evans.Nm 150490e13c1SKyle Evanswill exit with a status code of 0. 151490e13c1SKyle EvansAny other status code is not currently defined and may, in the future, grow 152490e13c1SKyle Evansspecial meaning for different degrees of sanity check failures. 153490e13c1SKyle Evans.It Xo 154d81df689SKyle Evans.Cm create 1555952343eSKyle Evans.Op Fl r 15677688bffSMateusz Piotrowski.Op Fl e Brq Ar nonActiveBe | Ar beName Ns Cm @ Ns Ar snapshot 15777688bffSMateusz Piotrowski.Ar newBeName 158d81df689SKyle Evans.Xc 15977688bffSMateusz PiotrowskiCreate a new boot environment named 16077688bffSMateusz Piotrowski.Ar newBeName . 16177688bffSMateusz Piotrowski.Pp 16277688bffSMateusz PiotrowskiIf the 16377688bffSMateusz Piotrowski.Fl r 16477688bffSMateusz Piotrowskiflag is given, a recursive boot environment will be made. 165c0f846ffSKyle EvansSee 166c0f846ffSKyle Evans.Sx Boot Environment Structures 167c0f846ffSKyle Evansfor a discussion on different layouts. 16877688bffSMateusz Piotrowski.Pp 1695952343eSKyle EvansIf the 170d81df689SKyle Evans.Fl e 17177688bffSMateusz Piotrowskiflag is specified, the new environment will be cloned from the given 17277688bffSMateusz Piotrowski.Ar nonActiveBe 17377688bffSMateusz Piotrowskior 17477688bffSMateusz Piotrowski.Ar beName Ns Cm @ Ns Ar snapshot . 1754163bae0SKyle EvansOtherwise, the new environment will be created from the currently booted 1764163bae0SKyle Evansenvironment. 17777688bffSMateusz Piotrowski.Pp 17877688bffSMateusz PiotrowskiIf 17977688bffSMateusz Piotrowski.Nm 1804163bae0SKyle Evansis creating from another boot environment, a snapshot of that boot environment 1814163bae0SKyle Evanswill be created to clone from. 182d81df689SKyle Evans.It Xo 18355ece394SKyle Evans.Cm create 18455ece394SKyle Evans.Op Fl r 18555ece394SKyle Evans.Ar beName@snapshot 18655ece394SKyle Evans.Xc 18755ece394SKyle EvansCreate a snapshot of the boot environment named 18855ece394SKyle Evans.Ar beName . 18955ece394SKyle Evans.Pp 19055ece394SKyle EvansIf the 19155ece394SKyle Evans.Fl r 19255ece394SKyle Evansflag is given, a recursive snapshot of the boot environment will be created. 19355ece394SKyle EvansA snapshot is created for each descendant dataset of the boot environment. 194c0f846ffSKyle EvansSee 195c0f846ffSKyle Evans.Sx Boot Environment Structures 196c0f846ffSKyle Evansfor a discussion on different layouts. 19755ece394SKyle Evans.Pp 198*69271761SGraham PerrinNo new boot environment is created with this subcommand. 19955ece394SKyle Evans.It Xo 200d81df689SKyle Evans.Cm destroy 20177b4126cSKyle Evans.Op Fl \&Fo 20277688bffSMateusz Piotrowski.Ar beName Ns Op Cm @ Ns Ar snapshot 203d81df689SKyle Evans.Xc 20477688bffSMateusz PiotrowskiDestroy the given 2055952343eSKyle Evans.Ar beName 2065952343eSKyle Evansboot environment or 20777688bffSMateusz Piotrowski.Ar beName Ns Cm @ Ns Ar snapshot 2088369ba42SKyle Evanssnapshot without confirmation, unlike in 20977688bffSMateusz Piotrowski.Xr beadm 1 . 2105952343eSKyle EvansSpecifying 2115952343eSKyle Evans.Fl F 2125952343eSKyle Evanswill automatically unmount without confirmation. 21377b4126cSKyle Evans.Pp 21477b4126cSKyle EvansBy default, 21577b4126cSKyle Evans.Nm 21677b4126cSKyle Evanswill warn that it is not destroying the origin of 21777b4126cSKyle Evans.Ar beName . 21877b4126cSKyle EvansThe 21977b4126cSKyle Evans.Fl o 22077b4126cSKyle Evansflag may be specified to destroy the origin as well. 221d81df689SKyle Evans.It Cm export Ar sourceBe 22234761e84SKyle EvansExport 22334761e84SKyle Evans.Ar sourceBe 22434761e84SKyle Evansto 22577688bffSMateusz Piotrowski.Xr stdout 4 . 22677688bffSMateusz Piotrowski.Xr stdout 4 22734761e84SKyle Evansmust be piped or redirected to a file. 228d81df689SKyle Evans.It Cm import Ar targetBe 22934761e84SKyle EvansImport 23034761e84SKyle Evans.Ar targetBe 23134761e84SKyle Evansfrom 23277688bffSMateusz Piotrowski.Xr stdin 4 . 233d81df689SKyle Evans.It Xo 234d81df689SKyle Evans.Cm jail 23577688bffSMateusz Piotrowski.Op Fl bU 23677688bffSMateusz Piotrowski.Oo Bro Fl o Ar key Ns Cm = Ns Ar value | Fl u Ar key Brc Oc Ns ... 23777688bffSMateusz Piotrowski.Ar beName 238cd816834SKyle Evans.Op Ar utility Op Ar argument ... 239d81df689SKyle Evans.Xc 24077688bffSMateusz PiotrowskiCreate a jail of the given boot environment. 241d694059fSKyle EvansMultiple 242d694059fSKyle Evans.Fl o 2432a0b8dc2SKyle Evansand 2442a0b8dc2SKyle Evans.Fl u 245d694059fSKyle Evansarguments may be specified. 2462a0b8dc2SKyle Evans.Fl o 2472a0b8dc2SKyle Evanswill set a jail parameter, and 2482a0b8dc2SKyle Evans.Fl u 2492a0b8dc2SKyle Evanswill unset a jail parameter. 250cd816834SKyle Evans.Pp 251cd816834SKyle EvansBy default, jails are created in interactive mode and 252cd816834SKyle Evans.Pa /bin/sh 253cd816834SKyle Evansis 254b509cad4SKyle Evansexecuted within the jail. 255cd816834SKyle EvansIf 256cd816834SKyle Evans.Ar utility 257cd816834SKyle Evansis specified, it will be executed instead of 258cd816834SKyle Evans.Pa /bin/sh . 259db9db0e7SKyle EvansThe jail will be destroyed and the boot environment unmounted when the command 260db9db0e7SKyle Evansfinishes executing, unless the 261db9db0e7SKyle Evans.Fl U 262db9db0e7SKyle Evansargument is specified. 263cd816834SKyle Evans.Pp 264b509cad4SKyle EvansThe 265b509cad4SKyle Evans.Fl b 266b509cad4SKyle Evansargument enables batch mode, thereby disabling interactive mode. 267db9db0e7SKyle EvansThe 268db9db0e7SKyle Evans.Fl U 269db9db0e7SKyle Evansargument will be ignored in batch mode. 2702a0b8dc2SKyle Evans.Pp 2712a0b8dc2SKyle EvansThe 2722a0b8dc2SKyle Evans.Va name , 2732a0b8dc2SKyle Evans.Va host.hostname , 2742a0b8dc2SKyle Evansand 2752a0b8dc2SKyle Evans.Va path 2767ce09314SKyle Evansmust be set, the default values are specified below. 2772a0b8dc2SKyle Evans.Pp 2782a0b8dc2SKyle EvansAll 27977688bffSMateusz Piotrowski.Ar key Ns Cm = Ns Ar value 280d694059fSKyle Evanspairs are interpreted as jail parameters as described in 281d694059fSKyle Evans.Xr jail 8 . 282d694059fSKyle EvansThe following default parameters are provided: 283d81df689SKyle Evans.Bl -column "allow.mount.devfs" "" 284d81df689SKyle Evans.It Va allow.mount Ta Cm true 285d81df689SKyle Evans.It Va allow.mount.devfs Ta Cm true 286d81df689SKyle Evans.It Va enforce_statfs Ta Cm 1 28777688bffSMateusz Piotrowski.It Va name Ta Set to jail ID. 288d81df689SKyle Evans.It Va host.hostname Ta Va bootenv 28977688bffSMateusz Piotrowski.It Va path Ta Set to a path in Pa /tmp 29077688bffSMateusz Piotrowskigenerated by 29184e61219SKyle Evans.Xr libbe 3 . 292d694059fSKyle Evans.El 2935952343eSKyle Evans.Pp 2942a0b8dc2SKyle EvansAll default parameters may be overwritten. 295f0298be0SKyle Evans.It Xo 296f0298be0SKyle Evans.Cm list 297b1ea63e2SRobert Wing.Op Fl aDHs 298f0298be0SKyle Evans.Oo Bro Fl c Ar property | Fl C Ar property Brc Oc 299f0298be0SKyle Evans.Xc 300f0298be0SKyle Evans.Pp 30177688bffSMateusz PiotrowskiDisplay all boot environments. 30277688bffSMateusz PiotrowskiThe 30377688bffSMateusz Piotrowski.Em Active 30477688bffSMateusz Piotrowskifield indicates whether the boot environment is active now 30577688bffSMateusz Piotrowski.Pq Em \&N ; 30677688bffSMateusz Piotrowskiactive on reboot 30777688bffSMateusz Piotrowski.Pq Em \&R ; 308e307eb94SToomas Soomeis used on next boot once 309e307eb94SToomas Soome.Pq Em \&T ; 310e307eb94SToomas Soomeor combination of 311e307eb94SToomas Soome.Pq Em \&NRT . 312f0298be0SKyle Evans.Bl -tag -width indent 313f0298be0SKyle Evans.It Fl a 314f0298be0SKyle EvansDisplay all datasets. 315f0298be0SKyle Evans.It Fl D 316f0298be0SKyle EvansDisplay the full space usage for each boot environment, assuming all 317d81df689SKyle Evansother boot environments were destroyed. 318f0298be0SKyle Evans.It Fl H 319f0298be0SKyle EvansUsed for scripting. 320f0298be0SKyle EvansDo not print headers and separate fields by a single tab instead of 321d81df689SKyle Evansarbitrary white space. 322f0298be0SKyle Evans.It Fl s 323f0298be0SKyle EvansDisplay all snapshots as well. 324f0298be0SKyle Evans.It Fl c Ar property 325*69271761SGraham PerrinSort boot environments by the given ZFS dataset property. 326f0298be0SKyle EvansThe following properties are supported: 327f0298be0SKyle Evans.Pp 328f0298be0SKyle Evans.Bl -tag -width 4n -offset indent -compact 329*69271761SGraham Perrin.It name (the default) 330f0298be0SKyle Evans.It creation 331f0298be0SKyle Evans.It origin 332f0298be0SKyle Evans.It used 333*69271761SGraham Perrin.It usedbydataset 334*69271761SGraham Perrin.It usedbyrefreservation 335*69271761SGraham Perrin.It usedbysnapshots 336f0298be0SKyle Evans.El 337*69271761SGraham Perrin.Pp 338*69271761SGraham PerrinShort forms usedds, usedrefreserv and usedsnap are also supported. 339f0298be0SKyle Evans.It Fl C Ar property 340f0298be0SKyle EvansSame as the 341f0298be0SKyle Evans.Fl c 342f0298be0SKyle Evansoption, but displays in descending order. 343f0298be0SKyle Evans.El 344f0298be0SKyle Evans.Pp 345f0298be0SKyle EvansThe 346f0298be0SKyle Evans.Fl D 347f0298be0SKyle Evansoption is ignored when either the 3485952343eSKyle Evans.Fl s 349f0298be0SKyle Evansor 350f0298be0SKyle Evans.Fl a 351f0298be0SKyle Evansoption is used. 352d81df689SKyle Evans.It Cm mount Ar beName Op Ar mountpoint 353*69271761SGraham PerrinMount the given boot environment. 354*69271761SGraham Perrin.Pp 355*69271761SGraham PerrinIf a nonexistent 3565952343eSKyle Evans.Ar mountpoint 357*69271761SGraham Perrinis given: 358*69271761SGraham Perrin.Nm 359*69271761SGraham Perrinwill make the directory, including intermediate directories as required. 360*69271761SGraham Perrin.Pp 361*69271761SGraham PerrinIf no 362*69271761SGraham Perrin.Ar mountpoint 363*69271761SGraham Perrinis given: 364*69271761SGraham Perrin.Nm 365*69271761SGraham Perrinwill make a directory such as 366*69271761SGraham Perrin.Pa be_mount.c6Sf 367*69271761SGraham Perrinin 368*69271761SGraham Perrin.Pa /tmp . 369*69271761SGraham PerrinRandomness in the last four characters of the directory name will prevent 370*69271761SGraham Perrinmount point conflicts. 371*69271761SGraham PerrinUnmount of an environment, followed by mount of the same environment 372*69271761SGraham Perrinwithout giving a 373*69271761SGraham Perrin.Ar mountpoint , 374*69271761SGraham Perrinwill result in a different randomly-named mountpoint. 375d81df689SKyle Evans.It Cm rename Ar origBeName newBeName 37677688bffSMateusz PiotrowskiRename the given 3775952343eSKyle Evans.Ar origBeName 3785952343eSKyle Evansto the given 379d81df689SKyle Evans.Ar newBeName . 3808369ba42SKyle EvansThe boot environment will not be unmounted in order for this rename to occur. 381b1ea63e2SRobert Wing.It Cm ujail Brq Ar jailId | jailName | beName 382b1ea63e2SRobert Wing.It Cm unjail Brq Ar jailId | jailName | beName 38377688bffSMateusz PiotrowskiDestroy the jail created from the given boot environment. 38477688bffSMateusz Piotrowski.It Xo 38577688bffSMateusz Piotrowski.Cm umount 38677688bffSMateusz Piotrowski.Op Fl f 38777688bffSMateusz Piotrowski.Ar beName 38877688bffSMateusz Piotrowski.Xc 389d81df689SKyle Evans.It Xo 390d81df689SKyle Evans.Cm unmount 3915952343eSKyle Evans.Op Fl f 392d81df689SKyle Evans.Ar beName 393d81df689SKyle Evans.Xc 3945952343eSKyle EvansUnmount the given boot environment, if it is mounted. 3955952343eSKyle EvansSpecifying 3965952343eSKyle Evans.Fl f 3975952343eSKyle Evanswill force the unmount if busy. 398*69271761SGraham Perrin.Pp 399*69271761SGraham PerrinUnmount will not remove the mount point. 4005952343eSKyle Evans.El 40177688bffSMateusz Piotrowski.Pp 402c0f846ffSKyle Evans.Ss Boot Environment Structures 403c0f846ffSKyle EvansThe traditional 404c0f846ffSKyle Evans.Fx 405c0f846ffSKyle Evansboot environment layout, as created by the Auto ZFS option to 406c0f846ffSKyle Evans.Xr bsdinstall 8 , 407c0f846ffSKyle Evansis a 408c0f846ffSKyle Evans.Dq shallow 409c0f846ffSKyle Evansboot environment structure, where boot environment datasets do not have any 410c0f846ffSKyle Evansdirectly subordinate datasets. 411c0f846ffSKyle EvansInstead, they're organized off in 412c0f846ffSKyle Evans.Pa zroot/ROOT , 413c0f846ffSKyle Evansand they rely on datasets elsewhere in the pool having 414c0f846ffSKyle Evans.Dv canmount 415c0f846ffSKyle Evansset to 416c0f846ffSKyle Evans.Dv off . 417c0f846ffSKyle EvansFor instance, a simplified pool may be laid out as such: 418c0f846ffSKyle Evans.Bd -literal -offset indent 419c0f846ffSKyle Evans% zfs list -o name,canmount,mountpoint 420c0f846ffSKyle EvansNAME CANMOUNT MOUNTPOINT 421c0f846ffSKyle Evanszroot 422c0f846ffSKyle Evanszroot/ROOT noauto none 423c0f846ffSKyle Evanszroot/ROOT/default noauto none 4248955236aSMike Karelszroot/home on /home 425c0f846ffSKyle Evanszroot/usr off /usr 4268955236aSMike Karelszroot/usr/src on /usr/src 4278955236aSMike Karelszroot/var off /var 428c0f846ffSKyle Evans.Ed 429c0f846ffSKyle Evans.Pp 430c0f846ffSKyle EvansIn that example, 431c0f846ffSKyle Evans.Pa zroot/usr 432c0f846ffSKyle Evanshas 433c0f846ffSKyle Evans.Dv canmount 434c0f846ffSKyle Evansset to 435c0f846ffSKyle Evans.Dv off , 436c0f846ffSKyle Evansthus files in 437c0f846ffSKyle Evans.Pa /usr 438c0f846ffSKyle Evanstypically fall into the boot environment because this dataset is not mounted. 4398955236aSMike Karels.Pa zroot/usr/src 440c0f846ffSKyle Evansis mounted, thus files in 4418955236aSMike Karels.Pa /usr/src 442c0f846ffSKyle Evansare not in the boot environment. 443c0f846ffSKyle Evans.Pp 444c0f846ffSKyle EvansThe other style of boot environments in use, frequently called 445c0f846ffSKyle Evans.Dq deep boot environments , 446c0f846ffSKyle Evansorganizes some or all of the boot environment as subordinate to the boot 447c0f846ffSKyle Evansenvironment dataset. 448c0f846ffSKyle EvansFor example: 449c0f846ffSKyle Evans.Bd -literal -offset indent 450c0f846ffSKyle Evans% zfs list -o name,canmount,mountpoint 451c0f846ffSKyle EvansNAME CANMOUNT MOUNTPOINT 452c0f846ffSKyle Evanszroot 453c0f846ffSKyle Evanszroot/ROOT noauto none 454c0f846ffSKyle Evanszroot/ROOT/default noauto none 455c0f846ffSKyle Evanszroot/ROOT/default/usr noauto /usr 456c0f846ffSKyle Evanszroot/ROOT/default/usr/local noauto /usr/local 457c0f846ffSKyle Evanszroot/var on /var 458c0f846ffSKyle Evans.Ed 459c0f846ffSKyle Evans.Pp 460c0f846ffSKyle EvansNote that the subordinate datasets now have 461c0f846ffSKyle Evans.Dv canmount 462c0f846ffSKyle Evansset to 463c0f846ffSKyle Evans.Dv noauto . 464c0f846ffSKyle EvansThese are more obviously a part of the boot environment, as indicated by their 465c0f846ffSKyle Evanspositioning in the layout. 466c0f846ffSKyle EvansThese subordinate datasets will be mounted by the 467c0f846ffSKyle Evans.Dv zfsbe 468c0f846ffSKyle Evans.Xr rc 8 469c0f846ffSKyle Evansscript at boot time. 470c0f846ffSKyle EvansIn this example, 471c0f846ffSKyle Evans.Pa /var 472c0f846ffSKyle Evansis excluded from the boot environment. 473c0f846ffSKyle Evans.Pp 474c0f846ffSKyle Evans.Nm 475*69271761SGraham Perrinsubcommands that have their own 476c0f846ffSKyle Evans.Fl r 477c0f846ffSKyle Evansoperate on this second, 478c0f846ffSKyle Evans.Dq deep 479c0f846ffSKyle Evansstyle of boot environment, when the 480c0f846ffSKyle Evans.Fl r 481c0f846ffSKyle Evansflag is set. 482c0f846ffSKyle EvansA future version of 483c0f846ffSKyle Evans.Nm 484c0f846ffSKyle Evansmay default to handling both styles and deprecate the various 485c0f846ffSKyle Evans.Fl r 486c0f846ffSKyle Evansflags. 487d6105756SMateusz Piotrowski\" .Sh EXAMPLES 488d6105756SMateusz Piotrowski\" .Bl -bullet 489d6105756SMateusz Piotrowski\" .It 490d6105756SMateusz Piotrowski\" To fill in with jail upgrade example when behavior is firm. 491d6105756SMateusz Piotrowski\" .El 4925952343eSKyle Evans.Sh SEE ALSO 493f5c8cb4cSMateusz Piotrowski.Xr libbe 3 , 494*69271761SGraham Perrin.Xr zfsprops 7 , 495cb67aaf2SAlan Somers.Xr beinstall.sh 8 , 4965952343eSKyle Evans.Xr jail 8 , 4975952343eSKyle Evans.Xr zfs 8 , 4985952343eSKyle Evans.Xr zpool 8 4995952343eSKyle Evans.Sh HISTORY 5005952343eSKyle Evans.Nm 5015952343eSKyle Evansis based on 50277688bffSMateusz Piotrowski.Xr beadm 1 5035952343eSKyle Evansand was implemented as a project for the 2017 Summer of Code, along with 5045952343eSKyle Evans.Xr libbe 3 . 5055952343eSKyle Evans.Sh AUTHORS 506d81df689SKyle Evans.Nm 507d81df689SKyle Evanswas written by 508d81df689SKyle Evans.An Kyle Kneitinger (kneitinger) Aq Mt kyle@kneit.in . 5095952343eSKyle Evans.Pp 51077688bffSMateusz Piotrowski.Xr beadm 1 511d81df689SKyle Evanswas written and is maintained by 512d81df689SKyle Evans.An Slawomir Wojciech Wojtczak (vermaden) Aq Mt vermaden@interia.pl . 5135952343eSKyle Evans.Pp 51434761e84SKyle Evans.An Bryan Drewery (bdrewery) Aq Mt bryan@shatow.net 515d81df689SKyle Evanswrote the original 51677688bffSMateusz Piotrowski.Xr beadm 1 5175952343eSKyle Evansmanual page that this one is derived from. 518