Update instructions for manually creating a jail

Remove unneeded subshell
Remove csh examples, and explicitly use sh everywhere
Remove the GAMES set which on longer exists
Remove the DOCS set that may be removed in the future, it is not needed inside a jail

PR:		194993
Differential Revision:	https://reviews.freebsd.org/D2116
Submitted by:	alex@kaworu.ch (original)
Reviewed by:	wblock
Approved by:	bcr (mentor)
Sponsored by:	ScaleEngine Inc.
This commit is contained in:
Allan Jude 2015-05-29 20:02:35 +00:00
parent 8a190e350e
commit 90052d5585
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=46732

View file

@ -205,17 +205,12 @@
<para>To install the userland from installation media, first
create the root directory for the jail. This can be done by
setting the <varname>DESTDIR</varname> variable to the proper
location. The command to use depends on which shell is being
used.</para>
location.</para>
<para>When using &man.sh.1;:</para>
<para>Start a shell and define <varname>DESTDIR</varname>:</para>
<screen>&prompt.root; <userinput>export DESTDIR=<replaceable>/here/is/the/jail</replaceable></userinput></screen>
<para>If <command>csh</command>/<command>tcsh</command> is used,
execute this instead:</para>
<screen>&prompt.root; <userinput>setenv DESTDIR <replaceable>/here/is/the/jail</replaceable></userinput></screen>
<screen>&prompt.root; <userinput>sh</userinput>
&prompt.root; <userinput>export DESTDIR=<replaceable>/here/is/the/jail</replaceable></userinput></screen>
<para>Mount the install media as covered in &man.mdconfig.8;
when using the install ISO:</para>
@ -236,31 +231,17 @@
<screen>&prompt.root; <userinput>/mnt/8.<replaceable>4</replaceable>-RELEASE/base/install.sh</userinput></screen>
<para>To install everything but the kernel, issue this
command:</para>
<para>To install everything except the kernel, issue one of these
commands:</para>
<para>When using &man.sh.1; on &os;&nbsp;9.x and newer, issue this
command:</para>
<para>When using &os;&nbsp;9.x and newer:</para>
<screen>&prompt.root; <userinput>for <replaceable>sets</replaceable> in BASE DOC GAMES PORTS; do (tar -xf /mnt/FREEBSD_INSTALL/USR/FREEBSD_DIST/$<replaceable>sets</replaceable>.TXZ -C $DESTDIR) ; done</userinput></screen>
<screen>&prompt.root; <userinput>for <replaceable>sets</replaceable> in BASE PORTS; do tar -xf /mnt/FREEBSD_INSTALL/USR/FREEBSD_DIST/$<replaceable>sets</replaceable>.TXZ -C $DESTDIR ; done</userinput></screen>
<para>When using &os;&nbsp;8.x, run this:</para>
<para>When using &os;&nbsp;8.x:</para>
<screen>&prompt.root; <userinput>cd /mnt/8.<replaceable>4</replaceable>-RELEASE; for <replaceable>dir</replaceable> in base catpages dict doc games info manpages ports; do (cd $<replaceable>dir</replaceable>; ./install.sh) ; done</userinput></screen>
<para>If <command>csh</command>/<command>tcsh</command> is used on
&os; 9.x and newer, execute this command:</para>
<screen>&prompt.root; <userinput>foreach <replaceable>sets</replaceable> ( BASE DOC GAMES PORTS )
tar -xf /mnt/FREEBSD_INSTALL/USR/FREEBSD_DIST/$sets.TXZ -C $DESTDIR
done</userinput></screen>
<para>On &os;&nbsp;8.x, run this command:</para>
<screen>&prompt.root; <userinput>foreach <replaceable>dir</replaceable> ( base catpages dict doc games info manpages ports )
cd /mnt/8.<replaceable>4</replaceable>-RELEASE/$dir; ./install.sh
done</userinput></screen>
<para>The &man.jail.8; manual page explains the procedure for
building a jail:</para>
@ -390,14 +371,14 @@ jail_<replaceable>www</replaceable>_devfs_enable="YES" # mount devfs in
<screen>&prompt.root; <userinput>service jail start <replaceable>www</replaceable></userinput>
&prompt.root; <userinput>service jail stop <replaceable>www</replaceable></userinput></screen>
<para>A clean way to shut down a &man.jail.8; is not available at
the moment. This is because commands normally used to
accomplish a clean system shutdown cannot be used inside a jail.
The best way to shut down a jail is to run the following command
from within the jail itself or using the &man.jexec.8; utility
from outside the jail:</para>
<para>Jails can be shut down with &man.jexec.8;. Use &man.jls.8;
to identify the jail's <varname>JID</varname>, then use
&man.jexec.8; to run the shutdown script in that jail.</para>
<screen>&prompt.root; <userinput>sh /etc/rc.shutdown</userinput></screen>
<screen>&prompt.root; <userinput>jls</userinput>
JID IP Address Hostname Path
3 192.168.0.10 www /usr/jail/www
&prompt.root; <userinput>jexec <replaceable>3</replaceable> /etc/rc.shutdown</userinput></screen>
<para>More information about this can be found in the &man.jail.8;
manual page.</para>