Changeset View
Changeset View
Standalone View
Standalone View
head/en_US.ISO8859-1/books/handbook/jails/chapter.xml
Show First 20 Lines • Show All 529 Lines • ▼ Show 20 Lines | &prompt.root; <userinput>jexec <replaceable>3</replaceable> /etc/rc.shutdown</userinput></screen> | ||||
system as attempting to patch userland from within the jail | system as attempting to patch userland from within the jail | ||||
may likely fail as the default behavior in FreeBSD is to | may likely fail as the default behavior in FreeBSD is to | ||||
disallow the use of &man.chflags.1; in a jail which prevents | disallow the use of &man.chflags.1; in a jail which prevents | ||||
the replacement of some files. It is possible to change this | the replacement of some files. It is possible to change this | ||||
behavior but it is recommended to use &man.freebsd-update.8; | behavior but it is recommended to use &man.freebsd-update.8; | ||||
to maintain jails instead. Use <option>-b</option> to specify | to maintain jails instead. Use <option>-b</option> to specify | ||||
the path of the jail to be updated.</para> | the path of the jail to be updated.</para> | ||||
<para>To update the jail to the latest patch release of the | |||||
version of &os; it is already running, then execute the | |||||
following commands on the host:</para> | |||||
<screen>&prompt.root; <userinput>freebsd-update -b <replaceable>/here/is/the/jail</replaceable> fetch</userinput> | <screen>&prompt.root; <userinput>freebsd-update -b <replaceable>/here/is/the/jail</replaceable> fetch</userinput> | ||||
&prompt.root; <userinput>freebsd-update -b <replaceable>/here/is/the/jail</replaceable> install</userinput></screen> | &prompt.root; <userinput>freebsd-update -b <replaceable>/here/is/the/jail</replaceable> install</userinput></screen> | ||||
<para>To upgrade the jail to a new major or minor version, | |||||
first upgrade the host system as described in | |||||
<xref linkend="freebsdupdate-upgrade" />. Once the host has been | |||||
upgraded and rebooted, the jail can then be upgraded. | |||||
For example to upgrade from 12.0-RELEASE to 12.1-RELEASE, | |||||
on the host run:</para> | |||||
<screen>&prompt.root; <userinput>freebsd-update -b <replaceable>/here/is/the/jail</replaceable> --currently-running <replaceable>12.0-RELEASE</replaceable> -r <replaceable>12.1-RELEASE</replaceable> upgrade</userinput> | |||||
&prompt.root; <userinput>freebsd-update -b <replaceable>/here/is/the/jail</replaceable> install</userinput> | |||||
&prompt.root; <userinput>service jail restart <replaceable>myjail</replaceable></userinput> | |||||
&prompt.root; <userinput>freebsd-update -b <replaceable>/here/is/the/jail</replaceable> install</userinput></screen> | |||||
<para>Then, if it was a major version upgrade, reinstall all | |||||
installed packages and restart the jail again. This is | |||||
required because the ABI version changes when upgrading | |||||
between major versions of &os;. From the host:</para> | |||||
<screen>&prompt.root; <userinput>pkg -j <replaceable>myjail</replaceable> upgrade -f</userinput> | |||||
&prompt.root; <userinput>service jail restart <replaceable>myjail</replaceable></userinput></screen> | |||||
</sect2> | </sect2> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="jails-application"> | <sect1 xml:id="jails-application"> | ||||
<info> | <info> | ||||
<title>Updating Multiple Jails</title> | <title>Updating Multiple Jails</title> | ||||
<authorgroup> | <authorgroup> | ||||
▲ Show 20 Lines • Show All 1,120 Lines • Show Last 20 Lines |