| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| infra:servers:updatingfreebsd [2026/06/08 09:38] – 37.26.174.181 | infra:servers:updatingfreebsd [2026/06/22 13:06] (current) – external edit 127.0.0.1 |
|---|
| </code> | </code> |
| |
| ==== Updating Jails ==== | ====== Updating Jails ====== |
| |
| Aside from all the jails on the bane server and others, we have a status page jail running UptimeKuma. For understandable reasons, this jail must outlive the other ones to be able to notify us about the others' instability from time to time. So UptimeKuma is held in a remote FreeBSD server in chicago called bespin (taken from Vultr), in a jail called st-01. | 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. |
| |
| What is specific about this Bespin server: it is NOT pkg-base; meaning you cannot use pkg to update/upgrade the OS. So there are two ways to upgrade freebsd in respect with it being pkg-base or NOT pkg-base. | **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. |
| |
| The jail st-01 /for astatus.abi.am/ uses pkg-base (Using pkg for updating the base. That's why its called package base. This is a relatively new practice in freeBSD available since 15.0. Before pkg update/upgrade people would use freebsd-update or freebsd-rustpdate [neo alternative] for updating the OS. See /etc/pkg/base for further information. | Note, it is possible to migrate a non-pkgbase system to pkgbase. Look that up if needed. |
| |
| So in Bespin, the /etc/pkg/FreeBSD.conf had a field saying freebsd-base{..., enabled: no, ...} meaning it is not pkg base. FAQ: Yes, there is a way to migrate it to pkg base, look that up! | ===== Updating pkgbase Jails ===== |
| | |
| ==== Updating pkgbase Jails ===== | |
| |
| | <code> |
| mount -t devfs devfs <path/to/jail>/dev | mount -t devfs devfs <path/to/jail>/dev |
| pkg-static -c </path/to/jail> update && pkg-static -c </path/to/jail> upgrade | pkg-static -c </path/to/jail> update && pkg-static -c </path/to/jail> upgrade |
| | </code> |
| |
| ==== Updating NOT pkgbase Jails ==== | ===== Updating NOT pkgbase Jails ===== |
| |
| you can use update or rustdate ON the jail, by giving the freebsd-rustdate command the path of base with -b flag and the path of the updating tool with -w, and passing the subcommand at the end to be executed։ | 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: |
| |
| freebsd-rustdate -b /path/to/jail -w /path/to/jail/var/db/freebsd-update/ <subcommand> | <code> |
| | freebsd-rustdate -b /usr/local/jails/<jailname> -w /usr/local/jails/<jailname>/var/db/freebsd-update/ check |
| More precisely in our case we run: | |
| | |
| freebsd-rustdate -b /usr/local/jails/<jailname> -w /usr/local/jails/<jailname>/var/db/freebsd-update/ check-fetch | |
| 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/ fetch |
| freebsd-rustdate -b /usr/local/jails/<jailname> -w /usr/local/jails/<jailname>/var/db/freebsd-update/ install | freebsd-rustdate -b /usr/local/jails/<jailname> -w /usr/local/jails/<jailname>/var/db/freebsd-update/ install |
| | </code> |
| ===== See Also ===== | ===== See Also ===== |
| |