Date: Fri, 18 Apr 2025 10:47:01 GMT From: Benedict Reuschling <bcr@FreeBSD.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org Subject: git: e4fc6b8657 - main - Update jails chapter for FreeBSD version 14.2 in examples Message-ID: <202504181047.53IAl10J059978@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/doc/commit/?id=e4fc6b8657422d02cb1eddb166b928cf851be5ac commit e4fc6b8657422d02cb1eddb166b928cf851be5ac Author: Benedict Reuschling <bcr@FreeBSD.org> AuthorDate: 2025-04-18 10:41:43 +0000 Commit: Benedict Reuschling <bcr@FreeBSD.org> CommitDate: 2025-04-18 10:46:01 +0000 Update jails chapter for FreeBSD version 14.2 in examples This reflects the latest version of FreeBSD at this time and provides paths with that version to create the jail. PR: 275685 Event: Easterhegg 2025 --- .../content/en/books/handbook/jails/_index.adoc | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/documentation/content/en/books/handbook/jails/_index.adoc b/documentation/content/en/books/handbook/jails/_index.adoc index 94647932f2..8c8ffd6f0d 100644 --- a/documentation/content/en/books/handbook/jails/_index.adoc +++ b/documentation/content/en/books/handbook/jails/_index.adoc @@ -343,7 +343,7 @@ Execute the following command to download the userland: [source,shell] .... -# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/13.2-RELEASE/base.txz -o /usr/local/jails/media/13.2-RELEASE-base.txz +# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/14.2-RELEASE/base.txz -o /usr/local/jails/media/14.2-RELEASE-base.txz .... Once the download is complete, it will be necessary to extract the contents into the jail directory. @@ -353,7 +353,7 @@ Execute the following commands to extract the userland into the jail's directory [source,shell] .... # mkdir -p /usr/local/jails/containers/classic -# tar -xf /usr/local/jails/media/13.2-RELEASE-base.txz -C /usr/local/jails/containers/classic --unlink +# tar -xf /usr/local/jails/media/14.2-RELEASE-base.txz -C /usr/local/jails/containers/classic --unlink .... With the userland extracted in the jail directory, it will be necessary to copy the timezone and DNS server files: @@ -431,36 +431,36 @@ To create the dataset for the template, execute the following command: [source,shell] .... -# zfs create -p zroot/jails/templates/13.2-RELEASE +# zfs create -p zroot/jails/templates/14.2-RELEASE .... Then execute the following command to download the userland: [source,shell] .... -# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/13.2-RELEASE/base.txz -o /usr/local/jails/media/13.2-RELEASE-base.txz +# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/14.2-RELEASE/base.txz -o /usr/local/jails/media/14.2-RELEASE-base.txz .... Once the download is complete, it will be necessary to extract the contents in the template directory by executing the following command: [source,shell] .... -# tar -xf /usr/local/jails/media/13.2-RELEASE-base.txz -C /usr/local/jails/templates/13.2-RELEASE --unlink +# tar -xf /usr/local/jails/media/14.2-RELEASE-base.txz -C /usr/local/jails/templates/14.2-RELEASE --unlink .... With the userland extracted in the templates directory, it will be necessary to copy the timezone and DNS server files to the template directory by executing the following command: [source,shell] .... -# cp /etc/resolv.conf /usr/local/jails/templates/13.2-RELEASE/etc/resolv.conf -# cp /etc/localtime /usr/local/jails/templates/13.2-RELEASE/etc/localtime +# cp /etc/resolv.conf /usr/local/jails/templates/14.2-RELEASE/etc/resolv.conf +# cp /etc/localtime /usr/local/jails/templates/14.2-RELEASE/etc/localtime .... The next thing to do is update to the latest patch level by executing the following command: [source,shell] .... -# freebsd-update -b /usr/local/jails/templates/13.2-RELEASE/ fetch install +# freebsd-update -b /usr/local/jails/templates/14.2-RELEASE/ fetch install .... Once the update is finished, the template is ready. @@ -469,7 +469,7 @@ To create an OpenZFS Snapshot from the template, execute the following command: [source,shell] .... -# zfs snapshot zroot/jails/templates/13.2-RELEASE@base +# zfs snapshot zroot/jails/templates/14.2-RELEASE@base .... Once the OpenZFS Snapshot has been created, infinite jails can be created using the OpenZFS clone function. @@ -478,7 +478,7 @@ To create a Thin Jail named `thinjail`, execute the following command: [source,shell] .... -# zfs clone zroot/jails/templates/13.2-RELEASE@base zroot/jails/containers/thinjail +# zfs clone zroot/jails/templates/14.2-RELEASE@base zroot/jails/containers/thinjail .... The last step is to configure the jail. @@ -528,43 +528,43 @@ The first step is to create the dataset to save the template, execute the follow [source,shell] .... -# zfs create -p zroot/jails/templates/13.2-RELEASE-base +# zfs create -p zroot/jails/templates/14.2-RELEASE-base .... Or this one if using UFS: [source,shell] .... -# mkdir /usr/local/jails/templates/13.2-RELEASE-base +# mkdir /usr/local/jails/templates/14.2-RELEASE-base .... Then execute the following command to download the userland: [source,shell] .... -# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/13.2-RELEASE/base.txz -o /usr/local/jails/media/13.2-RELEASE-base.txz +# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/14.2-RELEASE/base.txz -o /usr/local/jails/media/14.2-RELEASE-base.txz .... Once the download is complete, it will be necessary to extract the contents in the template directory by executing the following command: [source,shell] .... -# tar -xf /usr/local/jails/media/13.2-RELEASE-base.txz -C /usr/local/jails/templates/13.2-RELEASE-base --unlink +# tar -xf /usr/local/jails/media/14.2-RELEASE-base.txz -C /usr/local/jails/templates/14.2-RELEASE-base --unlink .... Once the userland is extracted in the templates directory, it will be necessary to copy the timezone and DNS server files to the template directory by executing the following command: [source,shell] .... -# cp /etc/resolv.conf /usr/local/jails/templates/13.2-RELEASE-base/etc/resolv.conf -# cp /etc/localtime /usr/local/jails/templates/13.2-RELEASE-base/etc/localtime +# cp /etc/resolv.conf /usr/local/jails/templates/14.2-RELEASE-base/etc/resolv.conf +# cp /etc/localtime /usr/local/jails/templates/14.2-RELEASE-base/etc/localtime .... With the files moved to the template, the next thing to do is update to the latest patch level by executing the following command: [source,shell] .... -# freebsd-update -b /usr/local/jails/templates/13.2-RELEASE-base/ fetch install +# freebsd-update -b /usr/local/jails/templates/14.2-RELEASE-base/ fetch install .... In addition to the base template, it is also necessary to create a directory where the `skeleton` will be located. @@ -574,14 +574,14 @@ Execute the following command to create the dataset for the `skeleton` in case o [source,shell] .... -# zfs create -p zroot/jails/templates/13.2-RELEASE-skeleton +# zfs create -p zroot/jails/templates/14.2-RELEASE-skeleton .... Or this one in case of using UFS: [source,shell] .... -# mkdir /usr/local/jails/templates/13.2-RELEASE-skeleton +# mkdir /usr/local/jails/templates/14.2-RELEASE-skeleton .... Then create the `skeleton` directories. @@ -591,20 +591,20 @@ Execute the following commands to create the directories: [source,shell] .... -# mkdir -p /usr/local/jails/templates/13.2-RELEASE-skeleton/home -# mkdir -p /usr/local/jails/templates/13.2-RELEASE-skeleton/usr -# mv /usr/local/jails/templates/13.2-RELEASE-base/etc /usr/local/jails/templates/13.2-RELEASE-skeleton/etc -# mv /usr/local/jails/templates/13.2-RELEASE-base/usr/local /usr/local/jails/templates/13.2-RELEASE-skeleton/usr/local -# mv /usr/local/jails/templates/13.2-RELEASE-base/tmp /usr/local/jails/templates/13.2-RELEASE-skeleton/tmp -# mv /usr/local/jails/templates/13.2-RELEASE-base/var /usr/local/jails/templates/13.2-RELEASE-skeleton/var -# mv /usr/local/jails/templates/13.2-RELEASE-base/root /usr/local/jails/templates/13.2-RELEASE-skeleton/root +# mkdir -p /usr/local/jails/templates/14.2-RELEASE-skeleton/home +# mkdir -p /usr/local/jails/templates/14.2-RELEASE-skeleton/usr +# mv /usr/local/jails/templates/14.2-RELEASE-base/etc /usr/local/jails/templates/14.2-RELEASE-skeleton/etc +# mv /usr/local/jails/templates/14.2-RELEASE-base/usr/local /usr/local/jails/templates/14.2-RELEASE-skeleton/usr/local +# mv /usr/local/jails/templates/14.2-RELEASE-base/tmp /usr/local/jails/templates/14.2-RELEASE-skeleton/tmp +# mv /usr/local/jails/templates/14.2-RELEASE-base/var /usr/local/jails/templates/14.2-RELEASE-skeleton/var +# mv /usr/local/jails/templates/14.2-RELEASE-base/root /usr/local/jails/templates/14.2-RELEASE-skeleton/root .... The next step is to create the symlinks to the `skeleton` by executing the following commands: [source,shell] .... -# cd /usr/local/jails/templates/13.2-RELEASE-base/ +# cd /usr/local/jails/templates/14.2-RELEASE-base/ # mkdir skeleton # ln -s skeleton/etc etc # ln -s skeleton/home home @@ -620,15 +620,15 @@ In case of using OpenZFS, OpenZFS snapshots can be used to easily create as many [source,shell] .... -# zfs snapshot zroot/jails/templates/13.2-RELEASE-skeleton@base -# zfs clone zroot/jails/templates/13.2-RELEASE-skeleton@base zroot/jails/containers/thinjail +# zfs snapshot zroot/jails/templates/14.2-RELEASE-skeleton@base +# zfs clone zroot/jails/templates/14.2-RELEASE-skeleton@base zroot/jails/containers/thinjail .... In case of using UFS the man:cp[1] program can be used by executing the following command: [source,shell] .... -# cp -R /usr/local/jails/templates/13.2-RELEASE-skeleton /usr/local/jails/containers/thinjail +# cp -R /usr/local/jails/templates/14.2-RELEASE-skeleton /usr/local/jails/containers/thinjail .... Then create the directory in which the base template and the skeleton will be mounted: @@ -670,7 +670,7 @@ Then the create the [.filename]#/usr/local/jails/thinjail-nullfs-base.fstab# fil [.programlisting] .... -/usr/local/jails/templates/13.2-RELEASE-base /usr/local/jails/thinjail-nullfs-base/ nullfs ro 0 0 +/usr/local/jails/templates/14.2-RELEASE-base /usr/local/jails/thinjail-nullfs-base/ nullfs ro 0 0 /usr/local/jails/containers/thinjail /usr/local/jails/thinjail-nullfs-base/skeleton nullfs rw 0 0 ....
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504181047.53IAl10J059978>