| Next revision | Previous revision |
| infra:servers:updatingfreebsd [2026/05/10 17:38] – created varinka | infra:servers:updatingfreebsd [2026/06/22 13:06] (current) – external edit 127.0.0.1 |
|---|
| </code> | </code> |
| |
| | ====== Updating Jails ====== |
| | |
| | Jails may be **pkgbase** (using ''pkg'' for the base system) or **not pkgbase** (using ''freebsd-update'' / ''freebsd-rustdate'' for the base system). The two are independent: a jail can be pkgbase even if its host is not, and vice versa. |
| | |
| | **pkgbase** means using ''pkg'' for updating the base system. This is a relatively new practice in FreeBSD, available since 15.0. Before ''pkg update/upgrade'', people would use ''freebsd-update'' (traditional) or ''freebsd-rustdate'' (newer alternative) for updating the OS. See ''/etc/pkg/Base.conf'' for further information. |
| | |
| | Note, it is possible to migrate a non-pkgbase system to pkgbase. Look that up if needed. |
| | |
| | ===== Updating pkgbase Jails ===== |
| | |
| | <code> |
| | mount -t devfs devfs <path/to/jail>/dev |
| | pkg-static -c </path/to/jail> update && pkg-static -c </path/to/jail> upgrade |
| | </code> |
| | |
| | ===== Updating NOT pkgbase Jails ===== |
| | |
| | You can use ''freebsd-update'' or ''freebsd-rustdate'' **from the host**, targeting the jail. You give ''freebsd-rustdate'' the path of the jail base with the ''-b'' flag and the path of the updating tool with ''-w'', and pass the subcommand at the end to be executed: |
| | |
| | <code> |
| | freebsd-rustdate -b /usr/local/jails/<jailname> -w /usr/local/jails/<jailname>/var/db/freebsd-update/ check |
| | freebsd-rustdate -b /usr/local/jails/<jailname> -w /usr/local/jails/<jailname>/var/db/freebsd-update/ fetch |
| | freebsd-rustdate -b /usr/local/jails/<jailname> -w /usr/local/jails/<jailname>/var/db/freebsd-update/ install |
| | </code> |
| ===== See Also ===== | ===== See Also ===== |
| |