Naar inhoud springen

Freebsd patching / upgrade

Uit VanderSchaft
Versie door Dschaft (overleg | bijdragen) op 25 jun 2025 om 13:20 (Nieuwe pagina aangemaakt met 'FreeBSD security patches may be downloaded and installed using the following commands. The first command will determine if any outstanding patches are available, and if so, will list the files that will be modified if the patches are applied. The second command will apply the patches. # freebsd-update fetch # freebsd-update install If the update applies any kernel patches, the system will need a reboot in order to boot into the patched kernel. If the pat...')
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)

FreeBSD security patches may be downloaded and installed using the following commands. The first command will determine if any outstanding patches are available, and if so, will list the files that will be modified if the patches are applied. The second command will apply the patches.

# freebsd-update fetch
# freebsd-update install

If the update applies any kernel patches, the system will need a reboot in order to boot into the patched kernel. If the patch was applied to any running binaries, the affected applications should be restarted so that the patched version of the binary is used.

If anything goes wrong, freebsd-update has the ability to roll back the last set of changes with the following command:

# freebsd-update rollback
Uninstalling updates... done.

Again, the system should be restarted if the kernel or any kernel modules were modified and any affected binaries should be restarted.


Before upgrading to a new version, ensure the existing FreeBSD installation is up to date with respect to security and errata patches:

# freebsd-update fetch
# freebsd-update install

The following command, when run on a FreeBSD 13.1 system, will upgrade it to FreeBSD 13.2:

# freebsd-update -r 13.2-RELEASE upgrade

After the command has been received, freebsd-update will evaluate the configuration file and current system in an attempt to gather the information necessary to perform the upgrade.

The system is not being altered yet as all patching and merging is happening in another directory. Once all patches have been applied successfully, all configuration files have been merged and it seems the process will go smoothly, the changes can be committed to disk by the user using the following command:

# freebsd-update install

The machine should now be restarted with the updated kernel:

# shutdown -r now

Once the system has come back online, restart freebsd-update using the following command. Since the state of the process has been saved, freebsd-update will not start from the beginning, but will instead move on to the next phase and remove all old shared libraries and object files.

# freebsd-update install