FreeBSD Update
Подготовка к установке обновлений безопасности FreeBSD
Проверка текущей версии ОС:
# freebsd-version -ku 14.2-RELEASE 14.2-RELEASE
Перед скачиванием и установкой обновлений безопасности FreeBSD следует сделать резервную копию файлов конфигурации ОС.
# cp -Rp /etc /etc.backup
Скачивание бинарных обновлений безопасности FreeBSD
# freebsd-update fetch src component not installed, skipped Looking up update.FreeBSD.org mirrors... 3 mirrors found. Fetching public key from update1.freebsd.org... done. Fetching metadata signature for 14.2-RELEASE from update1.freebsd.org... done. Fetching metadata index... done. Fetching 2 metadata files... done. Inspecting system... done. Preparing to download files... done. Fetching 122 patches.....10....20....30....40....50....60....70....80....90....100....110....120. done. Applying patches... done. Fetching 8 files... .... done. The following files will be removed as part of updating to 14.2-RELEASE-p7: /etc/ssl/certs/08063a00.0 /etc/ssl/certs/18856ac4.0 /etc/ssl/certs/57bcb2da.0 /etc/ssl/certs/5e98733a.0 /etc/ssl/untrusted/03179a64.0 [пропущен список удаляемых файлов в ходе обновления] The following files will be added as part of updating to 14.2-RELEASE-p7: /etc/ssl/certs/616816f6.0 /etc/ssl/certs/6a9bdba3.0 /etc/ssl/certs/878d9bca.0 /etc/ssl/certs/a09a51ae.0 /etc/ssl/certs/b8d25de6.0 [пропущен список добавляемых файлов в ходе обновления] The following files will be updated as part of updating to 14.2-RELEASE-p7: /bin/freebsd-version /boot/kernel/cd9660.ko /boot/kernel/ext2fs.ko /boot/kernel/if_ena.ko /boot/kernel/kernel [пропущен список заменяемых файлов в ходе обновления]
Установка бинарных обновлений безопасности и перезагрузка FreeBSD
# freebsd-update install src component not installed, skipped Creating snapshot of existing boot environment... done. Installing updates... Restarting sshd after upgrade Performing sanity check on sshd configuration. Stopping sshd. Performing sanity check on sshd configuration. Starting sshd. Scanning /usr/share/certs/untrusted for certificates... Scanning /usr/share/certs/trusted for certificates... done.
Перезагрузка FreeBSD после установки бинарных обновлений безопасности ОС:
# reboot
Проверка установленной версии FreeBSD
# freebsd-version -ku 14.2-RELEASE-p1 14.2-RELEASE-p7
Сравнение списков предыдущих и обновлённых файлов конфигурации ОС:
# diff -rq /etc /etc.backup Only in /etc.backup/ssl/certs: 08063a00.0 Only in /etc.backup/ssl/certs: 18856ac4.0 Only in /etc.backup/ssl/certs: 57bcb2da.0 Only in /etc.backup/ssl/certs: 5e98733a.0 Only in /etc/ssl/certs: 616816f6.0 Only in /etc/ssl/certs: 6a9bdba3.0 Only in /etc/ssl/certs: 878d9bca.0 Only in /etc/ssl/certs: a09a51ae.0 Only in /etc/ssl/certs: b8d25de6.0 Only in /etc/ssl/certs: ba8887ce.0 Only in /etc/ssl/certs: ffdd40f9.0 Only in /etc.backup/ssl/untrusted: 03179a64.0 Only in /etc/ssl/untrusted: 08063a00.0 Only in /etc.backup/ssl/untrusted: 080911ac.0 Only in /etc.backup/ssl/untrusted: 157753a5.0 Only in /etc/ssl/untrusted: 18856ac4.0 Only in /etc.backup/ssl/untrusted: 2c543cd1.0 Only in /etc.backup/ssl/untrusted: 2e5ac55d.0 Only in /etc.backup/ssl/untrusted: 3e45d192.0 Only in /etc.backup/ssl/untrusted: 4a6481c9.0 Only in /etc.backup/ssl/untrusted: 5273a94c.0 Only in /etc/ssl/untrusted: 57bcb2da.0 Only in /etc.backup/ssl/untrusted: 5c44d531.0 Only in /etc/ssl/untrusted: 5e98733a.0 Only in /etc.backup/ssl/untrusted: 76cb8f92.0 Only in /etc.backup/ssl/untrusted: 861a399d.0 Only in /etc.backup/ssl/untrusted: 9c2e7d30.0 Only in /etc.backup/ssl/untrusted: d853d49e.0 Only in /etc.backup/ssl/untrusted: f3377b1b.0
С 01 октября 2025 года срок поддержки FreeBSD 14.2-RELEASE истёк. И проблемы безопасности, обнаруженные после этой даты, исправляться не будут.
# freebsd-update fetch src component not installed, skipped Looking up update.FreeBSD.org mirrors... 3 mirrors found. Fetching metadata signature for 14.2-RELEASE from update1.freebsd.org... done. Fetching metadata index... done. Inspecting system... done. Preparing to download files... done. No updates needed to update system to 14.2-RELEASE-p7. WARNING: FreeBSD 14.2-RELEASE HAS PASSED ITS END-OF-LIFE DATE. Any security issues discovered after Wed Oct 1 03:00:00 MSK 2025 will not have been corrected.
Вывод команды сообщает об этом. Потребуется повышение версии ОС.
Обновление FreeBSD с версии 14.2-RELEASE до 14.3-RELEASE
Повышение младшей версии ОС:
# freebsd-update upgrade -r 14.3-RELEASE src component not installed, skipped Looking up update.FreeBSD.org mirrors... 3 mirrors found. Fetching metadata signature for 14.2-RELEASE from update1.freebsd.org... done. Fetching metadata index... done. Fetching 1 metadata files... done. Inspecting system... done. The following components of FreeBSD seem to be installed: kernel/generic kernel/generic-dbg world/base world/lib32 The following components of FreeBSD do not seem to be installed: world/base-dbg world/lib32-dbg Does this look reasonable (y/n)?
Вывод команды спросит согласие на установку компонентов ОС.
To install the downloaded upgrades, run 'freebsd-update [options] install'.
Вывод команды предложит сделать продолжение обновления ОС:
# freebsd-update install src component not installed, skipped Creating snapshot of existing boot environment... done. Installing updates... Kernel updates have been installed. Please reboot and run 'freebsd-update [options] install' again to finish installing updates.
Вывод команды предложит сделать перезагрузку ОС и продолжить обновление ОС:
# reboot
И:
# freebsd-update install
Список обновлений файлов конфигурации ОС в ходе повышения версии:
# diff -rq /etc /etc.backup Files /etc/autofs/special_media and /etc.backup/autofs/special_media differ Files /etc/defaults/periodic.conf and /etc.backup/defaults/periodic.conf differ Files /etc/defaults/rc.conf and /etc.backup/defaults/rc.conf differ Files /etc/devd/iwmbtfw.conf and /etc.backup/devd/iwmbtfw.conf differ Only in /etc/devd: rtlbtfw.conf Files /etc/mtree/BSD.debug.dist and /etc.backup/mtree/BSD.debug.dist differ Files /etc/mtree/BSD.include.dist and /etc.backup/mtree/BSD.include.dist differ Files /etc/mtree/BSD.tests.dist and /etc.backup/mtree/BSD.tests.dist differ Files /etc/mtree/BSD.usr.dist and /etc.backup/mtree/BSD.usr.dist differ Files /etc/pkg/FreeBSD.conf and /etc.backup/pkg/FreeBSD.conf differ Files /etc/rc.d/iovctl and /etc.backup/rc.d/iovctl differ Files /etc/rc.d/ipfilter and /etc.backup/rc.d/ipfilter differ Files /etc/rc.d/kld and /etc.backup/rc.d/kld differ Files /etc/rc.d/sendmail and /etc.backup/rc.d/sendmail differ Files /etc/rc.d/var_run and /etc.backup/rc.d/var_run differ Files /etc/regdomain.xml and /etc.backup/regdomain.xml differ Files /etc/services and /etc.backup/services differ Files /etc/ssh/moduli and /etc.backup/ssh/moduli differ Files /etc/ssh/sshd_config and /etc.backup/ssh/sshd_config differ
Все файлы обновлены автоматически, т.к. ранее не были отредактированы вручную.