jail.8: Add creating a jail from distribution set

PR:			200803
MFC after:		3 days
Reviewed by:		jamie
Differential Revision:	https://reviews.freebsd.org/D53631
This commit is contained in:
Alexander Ziaee
2025-11-07 13:38:54 -05:00
parent 5d55553e16
commit d59903481d
+17 -3
View File
@@ -1,3 +1,6 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2000, 2003 Robert N. M. Watson
.\" Copyright (c) 2008-2012 James Gritton
.\" All rights reserved.
@@ -23,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd October 8, 2025
.Dd November 6, 2025
.Dt JAIL 8
.Os
.Sh NAME
@@ -1120,7 +1123,7 @@ process.
This manual page documents the configuration steps necessary to support
either of these steps, although the configuration steps may need to be
refined based on local requirements.
.Ss "Setting up a Jail Directory Tree"
.Ss Setting up a Jail Directory Tree From Source
To set up a jail directory tree containing an entire
.Fx
distribution, the following
@@ -1133,8 +1136,19 @@ mkdir -p $D
make world DESTDIR=$D
make distribution DESTDIR=$D
.Ed
.Ss Setting up a Jail Directory Tree from Distribution Files
To set up a jail directory tree containing an entire
.Fx
distribution, the following
.Xr sh 1
command script can be used:
.Bd -literal -offset indent
D=/here/is/the/jail
mkdir -p $D
tar -xf /usr/freebsd-dist/base.txz -C $D --unlink
.Ed
.Pp
In many cases this example would put far more in the jail than needed.
In many cases these examples would put far more in the jail than needed.
In the other extreme case a jail might contain only one file:
the executable to be run in the jail.
.Pp