Date: Sun, 21 Dec 2025 19:24:54 +0000 From: Alexander Ziaee <ziaee@FreeBSD.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org Subject: git: 6c85dc012a - main - handbook/jails: Use latest release macro Message-ID: <69484986.34acc.1a58752b@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/doc/commit/?id=6c85dc012a980a1b525d026142c867aae2ecbb2a commit 6c85dc012a980a1b525d026142c867aae2ecbb2a Author: Alexander Ziaee <ziaee@FreeBSD.org> AuthorDate: 2025-12-21 19:00:14 +0000 Commit: Alexander Ziaee <ziaee@FreeBSD.org> CommitDate: 2025-12-21 19:23:41 +0000 handbook/jails: Use latest release macro Fixes: dbac0b5f5208 (Use betarel-current variable in commands) Reported by: George Timms <polarian@polarian.dev> --- .../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 35813488ef..302791d767 100644 --- a/documentation/content/en/books/handbook/jails/_index.adoc +++ b/documentation/content/en/books/handbook/jails/_index.adoc @@ -363,7 +363,7 @@ Execute the following command to download the userland: [source,shell,subs=attributes] .... -# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/{betarel-current}-RELEASE/base.txz -o /usr/local/jails/media/{betarel-current}-RELEASE-base.txz +# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/{rel-latest}-RELEASE/base.txz -o /usr/local/jails/media/{rel-latest}-RELEASE-base.txz .... Once the download is complete, it will be necessary to extract the contents into the jail directory. @@ -373,7 +373,7 @@ Execute the following commands to extract the userland into the jail's directory [source,shell,subs=attributes] .... # mkdir -p /usr/local/jails/containers/classic -# tar -xf /usr/local/jails/media/{betarel-current}-RELEASE-base.txz -C /usr/local/jails/containers/classic --unlink +# tar -xf /usr/local/jails/media/{rel-latest}-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: @@ -451,36 +451,36 @@ To create the dataset for the template, execute the following command: [source,shell,subs=attributes] .... -# zfs create -p zroot/jails/templates/{betarel-current}-RELEASE +# zfs create -p zroot/jails/templates/{rel-latest}-RELEASE .... Then execute the following command to download the userland: [source,shell,subs=attributes] .... -# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/{betarel-current}-RELEASE/base.txz -o /usr/local/jails/media/{betarel-current}-RELEASE-base.txz +# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/{rel-latest}-RELEASE/base.txz -o /usr/local/jails/media/{rel-latest}-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,subs=attributes] .... -# tar -xf /usr/local/jails/media/{betarel-current}-RELEASE-base.txz -C /usr/local/jails/templates/{betarel-current}-RELEASE --unlink +# tar -xf /usr/local/jails/media/{rel-latest}-RELEASE-base.txz -C /usr/local/jails/templates/{rel-latest}-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,subs=attributes] .... -# cp /etc/resolv.conf /usr/local/jails/templates/{betarel-current}-RELEASE/etc/resolv.conf -# cp /etc/localtime /usr/local/jails/templates/{betarel-current}-RELEASE/etc/localtime +# cp /etc/resolv.conf /usr/local/jails/templates/{rel-latest}-RELEASE/etc/resolv.conf +# cp /etc/localtime /usr/local/jails/templates/{rel-latest}-RELEASE/etc/localtime .... The next thing to do is update to the latest patch level by executing the following command: [source,shell,subs=attributes] .... -# freebsd-update -b /usr/local/jails/templates/{betarel-current}-RELEASE/ fetch install +# freebsd-update -b /usr/local/jails/templates/{rel-latest}-RELEASE/ fetch install .... Once the update is finished, the template is ready. @@ -489,7 +489,7 @@ To create an OpenZFS Snapshot from the template, execute the following command: [source,shell,subs=attributes] .... -# zfs snapshot zroot/jails/templates/{betarel-current}-RELEASE@base +# zfs snapshot zroot/jails/templates/{rel-latest}-RELEASE@base .... Once the OpenZFS Snapshot has been created, infinite jails can be created using the OpenZFS clone function. @@ -498,7 +498,7 @@ To create a Thin Jail named `thinjail`, execute the following command: [source,shell,subs=attributes] .... -# zfs clone zroot/jails/templates/{betarel-current}-RELEASE@base zroot/jails/containers/thinjail +# zfs clone zroot/jails/templates/{rel-latest}-RELEASE@base zroot/jails/containers/thinjail .... The last step is to configure the jail. @@ -548,43 +548,43 @@ The first step is to create the dataset to save the template, execute the follow [source,shell,subs=attributes] .... -# zfs create -p zroot/jails/templates/{betarel-current}-RELEASE-base +# zfs create -p zroot/jails/templates/{rel-latest}-RELEASE-base .... Or this one if using UFS: [source,shell,subs=attributes] .... -# mkdir /usr/local/jails/templates/{betarel-current}-RELEASE-base +# mkdir /usr/local/jails/templates/{rel-latest}-RELEASE-base .... Then execute the following command to download the userland: [source,shell,subs=attributes] .... -# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/{betarel-current}-RELEASE/base.txz -o /usr/local/jails/media/{betarel-current}-RELEASE-base.txz +# fetch https://download.freebsd.org/ftp/releases/amd64/amd64/{rel-latest}-RELEASE/base.txz -o /usr/local/jails/media/{rel-latest}-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,subs=attributes] .... -# tar -xf /usr/local/jails/media/{betarel-current}-RELEASE-base.txz -C /usr/local/jails/templates/{betarel-current}-RELEASE-base --unlink +# tar -xf /usr/local/jails/media/{rel-latest}-RELEASE-base.txz -C /usr/local/jails/templates/{rel-latest}-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,subs=attributes] .... -# cp /etc/resolv.conf /usr/local/jails/templates/{betarel-current}-RELEASE-base/etc/resolv.conf -# cp /etc/localtime /usr/local/jails/templates/{betarel-current}-RELEASE-base/etc/localtime +# cp /etc/resolv.conf /usr/local/jails/templates/{rel-latest}-RELEASE-base/etc/resolv.conf +# cp /etc/localtime /usr/local/jails/templates/{rel-latest}-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,subs=attributes] .... -# freebsd-update -b /usr/local/jails/templates/{betarel-current}-RELEASE-base/ fetch install +# freebsd-update -b /usr/local/jails/templates/{rel-latest}-RELEASE-base/ fetch install .... In addition to the base template, it is also necessary to create a directory where the `skeleton` will be located. @@ -594,14 +594,14 @@ Execute the following command to create the dataset for the `skeleton` in case o [source,shell,subs=attributes] .... -# zfs create -p zroot/jails/templates/{betarel-current}-RELEASE-skeleton +# zfs create -p zroot/jails/templates/{rel-latest}-RELEASE-skeleton .... Or this one in case of using UFS: [source,shell,subs=attributes] .... -# mkdir /usr/local/jails/templates/{betarel-current}-RELEASE-skeleton +# mkdir /usr/local/jails/templates/{rel-latest}-RELEASE-skeleton .... Then create the `skeleton` directories. @@ -611,20 +611,20 @@ Execute the following commands to create the directories: [source,shell,subs=attributes] .... -# mkdir -p /usr/local/jails/templates/{betarel-current}-RELEASE-skeleton/home -# mkdir -p /usr/local/jails/templates/{betarel-current}-RELEASE-skeleton/usr -# mv /usr/local/jails/templates/{betarel-current}-RELEASE-base/etc /usr/local/jails/templates/{betarel-current}-RELEASE-skeleton/etc -# mv /usr/local/jails/templates/{betarel-current}-RELEASE-base/usr/local /usr/local/jails/templates/{betarel-current}-RELEASE-skeleton/usr/local -# mv /usr/local/jails/templates/{betarel-current}-RELEASE-base/tmp /usr/local/jails/templates/{betarel-current}-RELEASE-skeleton/tmp -# mv /usr/local/jails/templates/{betarel-current}-RELEASE-base/var /usr/local/jails/templates/{betarel-current}-RELEASE-skeleton/var -# mv /usr/local/jails/templates/{betarel-current}-RELEASE-base/root /usr/local/jails/templates/{betarel-current}-RELEASE-skeleton/root +# mkdir -p /usr/local/jails/templates/{rel-latest}-RELEASE-skeleton/home +# mkdir -p /usr/local/jails/templates/{rel-latest}-RELEASE-skeleton/usr +# mv /usr/local/jails/templates/{rel-latest}-RELEASE-base/etc /usr/local/jails/templates/{rel-latest}-RELEASE-skeleton/etc +# mv /usr/local/jails/templates/{rel-latest}-RELEASE-base/usr/local /usr/local/jails/templates/{rel-latest}-RELEASE-skeleton/usr/local +# mv /usr/local/jails/templates/{rel-latest}-RELEASE-base/tmp /usr/local/jails/templates/{rel-latest}-RELEASE-skeleton/tmp +# mv /usr/local/jails/templates/{rel-latest}-RELEASE-base/var /usr/local/jails/templates/{rel-latest}-RELEASE-skeleton/var +# mv /usr/local/jails/templates/{rel-latest}-RELEASE-base/root /usr/local/jails/templates/{rel-latest}-RELEASE-skeleton/root .... The next step is to create the symlinks to the `skeleton` by executing the following commands: [source,shell,subs=attributes] .... -# cd /usr/local/jails/templates/{betarel-current}-RELEASE-base/ +# cd /usr/local/jails/templates/{rel-latest}-RELEASE-base/ # mkdir skeleton # ln -s skeleton/etc etc # ln -s skeleton/home home @@ -640,15 +640,15 @@ In case of using OpenZFS, OpenZFS snapshots can be used to easily create as many [source,shell,subs=attributes] .... -# zfs snapshot zroot/jails/templates/{betarel-current}-RELEASE-skeleton@base -# zfs clone zroot/jails/templates/{betarel-current}-RELEASE-skeleton@base zroot/jails/containers/thinjail +# zfs snapshot zroot/jails/templates/{rel-latest}-RELEASE-skeleton@base +# zfs clone zroot/jails/templates/{rel-latest}-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,subs=attributes] .... -# cp -R /usr/local/jails/templates/{betarel-current}-RELEASE-skeleton /usr/local/jails/containers/thinjail +# cp -R /usr/local/jails/templates/{rel-latest}-RELEASE-skeleton /usr/local/jails/containers/thinjail .... Then create the directory in which the base template and the skeleton will be mounted: @@ -690,7 +690,7 @@ Then the create the [.filename]#/usr/local/jails/thinjail-nullfs-base.fstab# fil [.programlisting,subs=attributes] .... -/usr/local/jails/templates/{betarel-current}-RELEASE-base /usr/local/jails/thinjail-nullfs-base/ nullfs ro 0 0 +/usr/local/jails/templates/{rel-latest}-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 ....home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69484986.34acc.1a58752b>
