Date: Tue, 23 Jun 2026 14:59:09 +0000 From: Benedict Reuschling <bcr@FreeBSD.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org Cc: Alfredo Cruz <alfredo.carlon@gmail.com> Subject: git: 9dfeda70dd - main - handbook/jails: Small fixes to the Linux jail section Message-ID: <6a3a9f3d.1d442.4734390d@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/doc/commit/?id=9dfeda70dd59b61f43455b76afed50a6d52d9ced commit 9dfeda70dd59b61f43455b76afed50a6d52d9ced Author: Alfredo Cruz <alfredo.carlon@gmail.com> AuthorDate: 2026-06-23 14:48:30 +0000 Commit: Benedict Reuschling <bcr@FreeBSD.org> CommitDate: 2026-06-23 14:58:56 +0000 handbook/jails: Small fixes to the Linux jail section - Add missing containers/ path in one instance - Move the jail.conf creation to the beginning of this section (slightly modified from the original patch), because it fits better there instead of letting the reader know about it when starting the jail - Use sh as the shell executed when running jexec to ensure it is a jail that is present in Linux - Rephrase a sentence to avoid a comma and instead use "and" to connect the two packages to install (also modified from the original submission) Event: Halifax Hackathon 202606 PR: 295777 Differential Revision: https://reviews.freebsd.org/D57771 --- documentation/content/en/books/handbook/jails/_index.adoc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/documentation/content/en/books/handbook/jails/_index.adoc b/documentation/content/en/books/handbook/jails/_index.adoc index f3e6eef17f..49f38720b2 100644 --- a/documentation/content/en/books/handbook/jails/_index.adoc +++ b/documentation/content/en/books/handbook/jails/_index.adoc @@ -818,6 +818,13 @@ The next step will be to create a jail as indicated above, for example in crossref:jails[creating-thin-jail-openzfs-snapshots, Creating a Thin Jail Using OpenZFS Snapshots], but *without* performing the configuration. FreeBSD Linux jails require a specific configuration that will be detailed below. +Create an empty [.filename]#/etc/jail.conf# to prevent failures when trying to stop the jail: + +[source,shell] +.... +# touch /etc/jail.conf +.... + Once the jail has been created as explained above, execute the following command to perform required configuration for the jail and start it: [source,shell] @@ -825,7 +832,7 @@ Once the jail has been created as explained above, execute the following command # jail -cm \ name=ubuntu \ host.hostname="ubuntu.example.com" \ - path="/usr/local/jails/ubuntu" \ + path="/usr/local/jails/containers/ubuntu" \ interface="em0" \ ip4.addr="192.168.1.150" \ exec.start="/bin/sh /etc/rc" \ @@ -848,10 +855,10 @@ Execute the following command to access the FreeBSD Linux jail: [source,shell] .... -# jexec -u root ubuntu +# jexec -u root ubuntu sh .... -Inside the jail, execute the following commands to install package:sysutils/debootstrap[] and prepare the Ubuntu environment: +Inside the jail, execute the following commands to install man:pkg[7] and package:sysutils/debootstrap[] to prepare the Ubuntu environment: [source,shell] ....home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a3a9f3d.1d442.4734390d>
