Benutzer-Werkzeuge

Webseiten-Werkzeuge


freebsd:freebsd_-_update

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
freebsd:freebsd_-_update [2024-02-12 01:44:05] – [FreeBSD - Update] manfredfreebsd:freebsd_-_update [2025-08-10 01:29:34] (aktuell) manfred
Zeile 1: Zeile 1:
 +====== FreeBSD - Update ======
 +
 +  * [[::freebsd:FreeBSD - PKG]]
 +  * [[::freebsd:FreeBSD - Upgrade]]
 +  * [[::freebsd:FreeBSD - Ports-Tree]]
 +  * **[[::freebsd:FreeBSD - PortMaster]]** //verwendet nur Werkzeuge, die bereits im Basissystem vorhanden sind//
 +  * [[::freebsd:FreeBSD - PortUpgrade]]
 +
 +  to update:  modernisieren
 +  to upgrade: aktualisieren
 +
 +
 +===== Allgemeines =====
 +
 +[[https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld|25.6. Updating FreeBSD from Source]]
 +  > vi /etc/freebsd-update.conf
 +
 +aktuelle Hardware-Plattform:
 +  > uname -m
 +  amd64
 +
 +Prozessor-Architektur:
 +  > uname -p
 +  amd64
 +
 +Kernel-Version:
 +  > uname -K
 +  1400097
 +
 +Version der Benutzerumgebung:
 +  > uname -U
 +  1400097
 +
 +Kompiler-Kode-Version der einzelnen Pakete:
 +  > pkg annotate -aS FreeBSD_version
 +
 +prüfen, ob beide Versionsnummer übereinstimmen:
 +  > if [ "$(uname -K)" = "$(uname -U)" ]; then echo "Kernel-Version und Benutzerumgebung haben die gleiche Version."; else echo "Kernel-Version und Benutzerumgebung haben unterschiedliche Versionen!"; fi
 +  Kernel-Version und Benutzerumgebung haben die gleiche Version.
 +
 +alle Pakete anzeigen, die nach einem Upgrade neu gebaut werden sollten:
 +  > pkg annotate -aS FreeBSD_version | grep -Fv "Value: $(uname -U)"
 +  ...
 +  zstd-1.5.4_2: Tag: FreeBSD_version Value: 1302001
 +
 +alle ORIGINs der Pakete anzeigen, die nach einem Upgrade neu gebaut werden sollten:
 +  > for A in $(pkg annotate -aS FreeBSD_version | grep -Fv "Value: $(uname -U)" | awk -F':' '{print $1}'); do pkg info -qo ${A}; done
 +  ...
 +  archivers/zstd
 +
 +
 +===== FreeBSD 14.0 - alle gewünschten Pakte install/update =====
 +
 +**__//So mache ich es auf meinem Server. - Es ist nur ein Beispiel!//__**
 +
 +So stelle ich sicher, dass die Pakete in der richtigen Reihenfolge und mit den richtigen Optionen installiert werden.
 +Wichtig ist hierbei, dass ich die Pakete, bei denen mir die Compiler-Optionen egal sind, per PIN-Paket isntalliere
 +und die Pakete, die erweiterte Compiler-Optionen haben sollen, aus dem Ports-Tree gebaut werden.
 +
 +Das mache ich aus zwei Gründen so: __1.__ geht es schnelle und __2.__ lassen sich leider (bei mir) bestimmte Pakete (z.B.: [[::MKVToolnix]] und [[::Blurays kopieren#Mit PKG|MakeMKV]]) nicht problemlos aus dem Ports-Tree bauen.
 +
 +//Diese Konfiguration habe ich, am __16. Februar 2024__, unter **[[::FreeBSD:Upgrade FreeBSD 13.2 zu 14.0|FreeBSD 14.0]]** mit dem Ports-Tree in der Version **[[::FreeBSD:Upgrade Ports-Tree ab FreeBSD 14.0|2024Q1]]** erfolgreich benutzt (getestet)!//
 +
 +Ausführung:
 +  > for P in $(cd /usr/ports/multimedia/mkvtoolnix && make run-depends-list) /usr/ports/graphics/gd /usr/ports/graphics/ImageMagick7; do cd ${P} && make deinstall; done
 +  > /root/bin/alle_Pakete_installieren_bzw_updaten.sh
 +
 +<file bash /usr/src/sys/amd64/conf/MYKERNEL>
 +#
 +# https://docs.freebsd.org/de/books/handbook/kernelconfig/
 +#
 +# cat /home/etc/MYKERNEL > /usr/src/sys/amd64/conf/MYKERNEL
 +#
 +### die zu bauenden Kernel festlegen in /etc/src.conf
 +# KERNCONF=MYKERNEL GENERIC
 +
 +include GENERIC
 +
 +ident MYKERNEL
 +
 +nooptions  DDB # Enable the ddb(4) kernel debugger
 +options NULLFS # NULL filesystem
 +device nvram # Access to rtc cmos via /dev/nvram
 +#
 +device speaker # Play IBM BASIC-style noises out your speaker
 +envvar hint.speaker.0.at="isa"
 +envvar hint.speaker.0.port="0x61"
 +device isa
 +#nodevice isa # Don't need to support an ISA bus
 +#
 +options ZFS # NB: This depends on crypto, cryptodev and ZSTDIO
 +device crypto # core crypto support
 +device cryptodev # /dev/crypto for access to h/w
 +options ZSTDIO # zstd-compressed kernel and user dumps
 +#
 +device sg # Linux SCSI passthrough
 +
 +# PCI Ethernet NICs.
 +device cxgb # Chelsio T3 10 Gigabit Ethernet
 +device cxgb_t3fw # Chelsio T3 10 Gigabit Ethernet firmware
 +device cxgbe # Chelsio T4-T6 1/10/25/40/100 Gigabit Ethernet
 +device cxgbev # Chelsio T4-T6 Virtual Functions
 +device mxge # Myricom Myri-10G 10GbE NIC
 +device oce # Emulex 10 GbE (OneConnect Ethernet)
 +
 +
 +### oder in der /etc/src.conf mit der Variablen WITHOUT_MODULES abschalten
 +### WITHOUT_MODULES=    amr arcmsr ciss iir ips mly twa smartpqi tws aac aacraid ida mfi mlx mrsas twe agp cbb pccard cardbus wlan wlan_wep wlan_ccmp wlan_tkip wlan_amrr an ath ath_pci ath_hal bwi bwn ipw iwi iwn malo mwl ral wpi virtio hyperv
 +#
 +nooptions COMPAT_FREEBSD4 # Compatible with FreeBSD4
 +nooptions COMPAT_FREEBSD5 # Compatible with FreeBSD5
 +nooptions COMPAT_FREEBSD6 # Compatible with FreeBSD6
 +nooptions COMPAT_FREEBSD7 # Compatible with FreeBSD7
 +nooptions COMPAT_FREEBSD8 # Compatible with FreeBSD7
 +nooptions COMPAT_FREEBSD9 # Compatible with FreeBSD9
 +nooptions COMPAT_FREEBSD10 # Compatible with FreeBSD10
 +#nooptions COMPAT_FREEBSD11 # Compatible with FreeBSD11
 +#nooptions COMPAT_FREEBSD12 # Compatible with FreeBSD12
 +# ===>  Configuring for rust-1.75.0
 +# Bad system call
 +# => Sanity check failed: kernel is missing COMPAT_FREEBSD11
 +# => Aborting build
 +</file>
 +
 +//Ach ja, ich muß noch hinzufügen, dass sich "''multimedia/makemkv''" nur installieren lässt, wenn man "''device sg''" in den Kernel mit einkompiliert hat, weiterhin lassen sich die Pakete ''links'' (mit SVG-Unterstützung) und ''MiniDLNA'' nur installieren, wenn "''options COMPAT_FREEBSD11''" im Kernel aktiviert ist, weil diese eine Abhängigkeit zu Rust haben und es z.Z. Rust nur für "FreeBSD 11" gibt.//
 +
 +<file bash /etc/make.conf>
 +WRKDIRPREFIX=        /var/ports
 +DISTDIR=             /var/ports/distfiles
 +PACKAGES=            /var/ports/packages
 +INDEXDIR=            /var/ports
 +BATCH=NO
 +OPTIONS_UNSET+=DEBUG
 +DEFAULT_VERSIONS+=ssl=openssl
 +MAKEOPTS="-j9"
 +KERNCONF=MYKERNEL
 +DISABLE_VULNERABILITIES=yes
 +MAKE_JOBS_UNSAFE=yes
 +WITH_MPM=event
 +.if ${.CURDIR:M*/multimedia/ffmpeg}
 +  OPTIONS_FILE_SET+=FDK_AAC
 +  OPTIONS_FILE_SET+=OPENSSL
 +  OPTIONS_FILE_UNSET+=NETWORK
 +  OPTIONS_FILE_UNSET+=GNUTLS
 +  OPTIONS_FILE_UNSET+=GLSLANG
 +  OPTIONS_FILE_UNSET+=LIBPLACEBO
 +  OPTIONS_FILE_UNSET+=SHADERC
 +  OPTIONS_FILE_UNSET+=VULKAN
 +.endif
 +.if ${.CURDIR:M*/graphics/libglvnd}
 +  OPTIONS_FILE_SET+=X11
 +.endif
 +.if ${.CURDIR:M*/multimedia/mkvtoolnix}
 +  OPTIONS_FILE_SET+=DVDREAD
 +  OPTIONS_FILE_SET+=FLAC
 +.endif
 +.if ${.CURDIR:M*/editors/mg}
 +  FLAVOR=static
 +.endif
 +.if ${.CURDIR:M*/security/su-exec}
 +  FLAVOR=static
 +.endif
 +.if ${.CURDIR:M*/shells/oksh}
 +  FLAVOR=static
 +.endif
 +.if ${.CURDIR:M*/games/stonesoup}
 +  FLAVOR=console
 +.endif
 +.if ${.CURDIR:M*/games/cataclysm-dda}
 +  FLAVOR=curses
 +.endif
 +.if ${.CURDIR:M*/net-p2p/transmission-components}
 +  FLAVOR=cli
 +.endif
 +.if ${.CURDIR:M*/sysutils/cpu-x}
 +  FLAVOR=ncurses
 +.endif
 +.if ${.CURDIR:M*/editors/emacs-devel}
 +  FLAVOR=nox
 +.endif
 +.if ${.CURDIR:M*/editors/emacs}
 +  FLAVOR=nox
 +.endif
 +.if ${.CURDIR:M*/emulators/open-vm-tools}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/emulators/qemu7}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/emulators/qemu}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/games/brogue}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/games/xnethack}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/graphics/ImageMagick7}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/graphics/gifsicle}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/graphics/ImageMagick6}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/lang/nll}
 +  FLAVOR=nosdl
 +.endif
 +.if ${.CURDIR:M*/misc/chatgpt-shell-cli}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/net/unison232}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/net/unison251}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/net/unison248}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/net/unison240}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/net/unison}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/net/wireshark}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/net-p2p/qbittorrent}
 +  FLAVOR=nox
 +.endif
 +.if ${.CURDIR:M*/sysutils/pwsafe}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/sysutils/dvdisaster}
 +  FLAVOR=nox11
 +.endif
 +.if ${.CURDIR:M*/sysutils/screenfetch}
 +  FLAVOR=nox11
 +.endif
 +</file>
 +
 +<file bash /root/bin/alle_Pakete.cfg>
 +#==============================================================================#
 +
 +BIND_VERSION="918"
 +APACHE_VERSION="24"
 +PHP_VERSION="81"               # für die richtige Version, siehe www/dokuwiki (dokuwiki-php81) - Abhängigkeit
 +SAMBA_VERSION="416"
 +POSTGRESQL_VERSION="15"        # für die richtige Version, siehe databases/php81-pgsql - Abhängigkeit
 +
 +#==============================================================================#
 +
 +PKG_REPO_01="
 +devel/git
 +ports-mgmt/pkg
 +ports-mgmt/portmaster
 +ports-mgmt/psearch
 +shells/bash-static
 +editors/vim
 +sysutils/screen
 +misc/mc
 +archivers/rar
 +misc/gnu-watch
 +sysutils/zfsnap
 +converters/base64
 +converters/unix2dos
 +converters/dosunix
 +ftp/wget
 +ftp/lftp
 +net/rsync
 +net/bmon
 +archivers/zip
 +sysutils/dmidecode
 +sysutils/sysinfo
 +sysutils/smartmontools
 +sysutils/nvme-cli
 +sysutils/hwstat
 +sysutils/freecolor
 +www/squid
 +www/squidanalyzer
 +www/squidview
 +security/sudo
 +security/snoopy
 +security/openssl
 +security/mcrypt
 +sysutils/pwgen
 +sysutils/fusefs-ntfs
 +sysutils/fusefs-ext2
 +sysutils/e2fsprogs
 +sysutils/eject
 +sysutils/lsblk
 +sysutils/lsop
 +sysutils/lscpu
 +sysutils/bsdstats
 +sysutils/zeroer
 +sysutils/grub2-bhyve
 +sysutils/vm-bhyve
 +sysutils/ipmitool
 +sysutils/pcpustat
 +sysutils/freecolor
 +devel/pkgconf
 +mail/fetchmail
 +mail/fetchmailconf
 +textproc/pdftohtml
 +print/pstotext
 +print/psutils
 +print/ghostscript10
 +mail/dovecot
 +mail/maildrop
 +net-mgmt/iftop
 +net-mgmt/ipcalc
 +net-mgmt/sipcalc
 +graphics/p5-Image-ExifTool
 +www/p5-LWP-UserAgent-WithCache
 +databases/postgresql${POSTGRESQL_VERSION}-server
 +databases/pgtop
 +net/samba${SAMBA_VERSION}
 +graphics/php${PHP_VERSION}-gd
 +textproc/php${PHP_VERSION}-xml
 +archivers/php${PHP_VERSION}-zip
 +ftp/php${PHP_VERSION}-curl
 +ftp/curl
 +www/links
 +www/nginx
 +www/thttpd
 +www/fcgi
 +www/fcgiwrap
 +lang/php${PHP_VERSION}
 +lang/php${PHP_VERSION}-extensions
 +sysutils/php${PHP_VERSION}-fileinfo
 +databases/php${PHP_VERSION}-pdo_pgsql
 +databases/php${PHP_VERSION}-pgsql
 +www/php${PHP_VERSION}-opcache
 +net-im/py-matrix-synapse
 +audio/cdparanoia
 +audio/faac
 +audio/vorbis-tools
 +audio/lame
 +textproc/dict
 +textproc/jq
 +net/wol
 +"
 +
 +#==============================================================================#
 +
 +PKG_PORTS_01="
 +sysutils/lsof
 +sysutils/bsdhwmon
 +sysutils/bsdinfo
 +audio/libsndfile
 +multimedia/ffmpeg
 +multimedia/libdvdread
 +sysutils/cpupdate
 +"
 +
 +#==============================================================================#
 +
 +PKG_REPO_02="
 +sysutils/dvdbackup
 +sysutils/vobcopy
 +sysutils/dvd+rw-tools
 +security/nmap
 +security/py-acme
 +security/py-certbot
 +security/py-certbot-dns-cloudflare
 +graphics/ImageMagick7
 +multimedia/mediainfo
 +multimedia/mkvtoolnix
 +"
 +
 +#==============================================================================#
 +
 +BLURAY="emulators/linux-c7 multimedia/makemkv"
 +
 +#==============================================================================#
 +
 +PKG_PORTS_02="
 +converters/p5-JSON-PP
 +"
 +
 +#==============================================================================#
 +</file>
 +
 +<file bash /root/bin/alle_Pakete_installieren_bzw_updaten.sh>
 +#!/bin/sh
 +
 +. /root/bin/alle_Pakete.cfg
 +
 +(
 +### wenn es Probleme bei der Installation gibt
 +#echo "# 0 # make deinstall"
 +#for P in $(cd /usr/ports/multimedia/mkvtoolnix && make run-depends-list) /usr/ports/graphics/gd /usr/ports/graphics/ImageMagick7; do cd ${P} && make deinstall; done
 +
 +echo "# 1 # portsclean -CDL"
 +portsclean -CDL
 +
 +echo "# 2 # pkg install PKG_REPO_01"
 +pkg install ${PKG_REPO_01}
 +
 +echo "# 3 # portmaster -yKgtRf -U PKG_PORTS_01"
 +portmaster -yKgtRf -U ${PKG_PORTS_01}
 +
 +echo "# 4 # pkg install PKG_REPO_02 BLURAY"
 +pkg install ${PKG_REPO_02} ${BLURAY}
 +
 +echo "# 5 # portmaster -yKgtRf -U PKG_PORTS_02"
 +portmaster -yKgtRf -U ${PKG_PORTS_02}
 +
 +echo "# 6 # portsclean -CDL"
 +portsclean -CDL
 +) 2>&1 | tee /tmp/alle_Pakete_installieren_bzw_updaten.log
 +</file>
 +
 +
 +===== Upgrade FreeBSD 13.2 zu 14.0 =====
 +
 +  * [[::freebsd:Upgrade FreeBSD 13.2 zu 14.0]]
 +
 +
 +===== FreeBSD 13.1 zu 13.2 =====
 +
 +aktuelle Version vom User-Land anzeigen
 +  > cat /etc/os-release
 +
 +aktuelle Version vom Kernel anzeigen
 +  > uname -a
 +
 +zeigt das ''ident'' des aktuell laufenden Kernels
 +  > uname -i
 +  MYKERNEL
 +
 +Print the version and patch level of the **installed kernel**.
 +  > freebsd-version -k
 +
 +Print the version and patch level of the **running kernel**.
 +  > freebsd-version -r
 +
 +Print the version and patch level of the **installed userland**.
 +  > freebsd-version -u
 +
 +als erstes müssen alle Paches in das aktuelle System installiert werden
 +  > freebsd-update fetch
 +  > freebsd-update install
 +
 +
 +==== Update mit binären Dateien ====
 +
 +[[https://ostechnix.com/freebsd-upgrade/|Upgrade to FreeBSD 13.2 from FreeBSD 13.1]]
 +
 +# Ein binäres Update von 13.1 auf 13.2 kann man auch mit ''freebsd-update'' durchführen.
 +  > freebsd-update -r 13.2-RELEASE upgrade
 +  > freebsd-update install
 +
 +//Braucht man einen eigenen Kernel, dann muß man den nachher aus den Quellen bauen, wie unten beschrieben!//
 +
 +
 +==== FreeBSD-Upgrade aus den Quellen ====
 +
 +als erstes die neuesten Quellen holen, offiziell wird es etwas einfacher beschrieben aber nur diese Methode hat in jedem Fall (über 10 Jahre lang) zum Ziel geführt:
 +  > rm -fr /usr/src/*
 +  > cd /usr/src || exit 1
 +  > rm -fr .arcconfig .arclint .cirrus-ci/ .cirrus.yml .clang-format .git/ .gitattributes .github/ .gitignore
 +  
 +  > git clone https://git.freebsd.org/src.git .
 +  > git branch -a | head
 +  > git switch releng/13.2
 +  
 +  > sh /usr/src/sys/conf/newvers.sh -v
 +  
 +  > cd /usr/src && make cleanworld || exit 21
 +  > less /usr/src/UPDATING
 +
 +jetzt muss als erstes (wenn man das möchte) eine eigene Kerneldatei angelegt werden:
 +  > cat MYKERNEL > /usr/src/sys/amd64/conf/MYKERNEL
 +  > vi /usr/src/sys/amd64/conf/MYKERNEL
 +
 +nun können wir unsere System neu bauen, als erstes muß der Kernel gebaut und installiert werden:
 +  > cd /usr/src && make cleanworld && make -j$(sysctl -n hw.ncpu) buildkernel KERNCONF=MYKERNEL && make installkernel KERNCONF=MYKERNEL
 +  > shutdown -r now
 +
 +erst jetzt kann die Welt gebaut werden (bei Pach-Level-Updates geht das auch schon vorher aber Major-Release-Update ńur mit neuem Kernel):
 +  > cd /usr/src && make -j$(sysctl -n hw.ncpu) buildworld
 +
 +Enable “pre-world” mode. Only merge changes to files that are necessary to successfully run ‘make installworld’ or ‘make installkernel’.
 +  > etcupdate -p
 +  Conflicts remain from previous update, aborting.
 +  
 +  > etcupdate status
 +    C /etc/ssh/sshd_config
 +  
 +  > etcupdate diff
 +  ...
 +  
 +  > etcupdate resolve
 +  Resolving conflict in '/etc/ssh/sshd_config':
 +  Select: (p) postpone, (df) diff-full, (e) edit,
 +          (h) help for more options: h
 +    (p)  postpone    - ignore this conflict for now
 +    (df) diff-full   - show all changes made to merged file
 +    (e)  edit        - change merged file in an editor
 +    (r)  resolved    - accept merged version of file
 +    (mf) mine-full   - accept local version of entire file (ignore new changes)
 +    (tf) theirs-full - accept new version of entire file (lose local changes)
 +    (h)  help        - show this list
 +  Select: (p) postpone, (df) diff-full, (e) edit,
 +          (h) help for more options: e
 +  ...
 +  # Change to no to disable PAM authentication
 +  <<<<<<< yours
 +  #ChallengeResponseAuthentication yes
 +  ChallengeResponseAuthentication no
 +  ||||||| original
 +  #ChallengeResponseAuthentication yes
 +  =======
 +  #KbdInteractiveAuthentication yes
 +  >>>>>>> new
 +  ...
 +  
 +  ### das ändern wir in:
 +  
 +  ...
 +  # Change to no to disable PAM authentication
 +  #KbdInteractiveAuthentication yes
 +  ...
 +  
 +  /var/db/etcupdate/conflicts/etc/ssh/sshd_config: 151 lines, 3774 characters.
 +  Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved,
 +          (h) help for more options: r
 +  
 +  > etcupdate status
 +  > etcupdate -p
 +  > cd /usr/src && make installworld
 +  > etcupdate -B
 +  > shutdown -r now
 +
 +
 +===== FreeBSD 13.0 =====
 +
 +  * [[https://www.freebsd.org/releases/]]
 +    * [[https://www.freebsd.org/releases/13.1R/installation/|FreeBSD 13.1-RELEASE Installation Instructions]]
 +      * The freebsd-update(8) utility supports __binary upgrades__ of i386 and amd64 systems running earlier FreeBSD releases.
 +      * Systems running 12.3-RELEASE or 13.0-RELEASE can upgrade as follows:
 +        * ''# freebsd-update fetch''
 +        * ''# freebsd-update install''
 +      * Now the freebsd-update(8) utility can fetch bits belonging to 13.1-RELEASE. During this process freebsd-update(8) will ask for help in merging configuration files.
 +        * ''# freebsd-update upgrade -r 13.1-RELEASE''
 +        * ''# freebsd-update install''
 +      * The system must now be rebooted with the newly installed kernel before the non-kernel components are updated.
 +        * ''# shutdown -r now''
 +      * After rebooting, freebsd-update(8) needs to be run again to install the new userland components:
 +        * ''# freebsd-update install''
 +      * At this point, users of systems being upgraded from earlier FreeBSD releases will be prompted by freebsd-update(8) to rebuild all third-party applications (e.g., ports installed from the ports tree) due to updates in system libraries.
 +      * After updating installed third-party applications (and again, only if freebsd-update(8) printed a message indicating that this was necessary), run freebsd-update(8) again so that it can delete the old (no longer used) system libraries:
 +        * ''# freebsd-update install''
 +      * Finally, reboot into 13.1-RELEASE
 +        * ''# shutdown -r now''
 +    * [[https://www.freebsd.org/releases/12.1R/installation.html|Installation Instructions (FreeBSD 12.1-RELEASE) -> 2.2. Upgrading Using "FreeBSD Update"]]
 +
 +Als erstes die [[::freebsd:Jail]]s anhalten.
 +
 +
 +===== Beispiel FreeBSD 13.0 =====
 +
 +  > echo "KERNCONF=MYKERNEL" >> /etc/src.conf
 +
 +
 +==== nur den Kernel neu bauen ====
 +
 +  > vi /usr/src/sys/amd64/conf/MYKERNEL
 +  > cd /usr/src && make clean && make kernel
 +  > reboot
 +
 +<file bash /usr/src/sys/amd64/conf/MYKERNEL>
 +### die zu bauenden Kernel festlegen in /etc/src.conf
 +# KERNCONF=MYKERNEL GENERIC
 +
 +include                 GENERIC
 +
 +ident                   MYKERNEL
 +
 +nooptions               DDB                     # Enable the ddb(4) kernel debugger
 +device                  nullfs
 +device                  nvram
 +#
 +device                  speaker
 +envvar                  hint.speaker.0.at="isa"
 +envvar                  hint.speaker.0.port="0x61"
 +device                  isa
 +#nodevice               isa                     # Don't need to support an ISA bus
 +#
 +device                  zfs
 +device                  sg
 +nooptions               cxgbe                   # Chelsio T4-T6 1/10/25/40/100 Gigabit Ethernet
 +
 +### IPv6 - mit "no" davor wird abgeschaltet
 +options                 INET6                   # IPv6 communications protocols
 +device                  gif                     # IPv6 and IPv4 tunneling
 +
 +### oder in der /etc/src.conf mit der Variablen WITHOUT_MODULES abschalten
 +### WITHOUT_MODULES=    amr arcmsr ciss iir ips mly twa smartpqi tws aac aacraid ida mfi mlx mrsas twe agp cbb pccard cardbus wlan wlan_wep wlan_ccmp wlan_tkip wlan_amrr an ath ath_pci ath_hal bwi bwn ipw iwi iwn malo mwl ral wpi virtio hyperv
 +#
 +options                 COMPAT_FREEBSD32        # Compatible with i386 binaries
 +nooptions               COMPAT_FREEBSD4         # Compatible with FreeBSD4
 +nooptions               COMPAT_FREEBSD5         # Compatible with FreeBSD5
 +nooptions               COMPAT_FREEBSD6         # Compatible with FreeBSD6
 +nooptions               COMPAT_FREEBSD7         # Compatible with FreeBSD7
 +nooptions               COMPAT_FREEBSD9         # Compatible with FreeBSD9
 +nooptions               COMPAT_FREEBSD10        # Compatible with FreeBSD10
 +options                 COMPAT_FREEBSD11        # Compatible with FreeBSD11
 +options                 COMPAT_FREEBSD12        # Compatible with FreeBSD12
 +</file>
 +
 +
 +==== das ganze System neu bauen ====
 +
 +
 +=== die System-Quellen komplett neu holen ===
 +
 +GIT installieren
 +  > cd /usr/ports/devel/git && make clean && make config-recursive && make && make install && make clean
 +
 +System-Quellen neu saugen:
 +  > rm -fr /usr/src/*
 +  > cd /usr/src
 +  > rm -fr .arcconfig .arclint .cirrus-ci/ .cirrus.yml .clang-format .git/ .gitattributes .github/ .gitignore
 +  
 +  > git clone https://git.freebsd.org/src.git .
 +  > git branch -a | head
 +  > #git checkout releng/13.2
 +  > git switch releng/13.2
 +  > git branch -a | head
 +
 +
 +=== die System-Quellen aktualisieren ===
 +
 +wenn die System-Quellen schon einmal mit GIT gesaugt wurden:
 +  > cd /usr/src && make clean
 +  > git pull
 +  > sh /usr/src/sys/conf/newvers.sh -v
 +
 +  > vi /usr/src/sys/amd64/conf/MYKERNEL
 +  > cd /usr/src && make clean && make buildworld && make installkernel
 +
 +  > reboot
 +
 +  > for A in squid minidlna postgresql dovecot nginx ; do service ${A} stop ; done
 +  > cd /usr/src && make installworld && mergemaster -Ui
 +  > make check-old;
 +  > make delete-old;
 +  > make check-old-libs;
 +  > make delete-old-libs;
 +
 +  > reboot
 +
 +
 +=== die Pakete aus dem Ports-Tree aktualisieren ===
 +
 +  > portsclean -CDL
 +
 +<code>
 +for PT in ${PKG_LISTE}
 +do
 +        echo "#------------------------------------------------------------------------------#"
 +        echo "### ${PT}"
 +        cd /usr/ports/${PT} && make clean
 +        cd /usr/ports/${PT} && make config
 +done
 +</code>
 +
 +  > portupgrade -arF
 +  > portsnap fetch update
 +
 +<code>
 +for PT in ${PKG_LISTE}
 +do
 +        echo "#------------------------------------------------------------------------------#"
 +        echo "### ${PT}"
 +        #cd /usr/ports/${PT} && make config-recursive
 +        cd /usr/ports/${PT} && make clean ; make && (make deinstall ; make install)
 +done
 +</code>
 +
 +  > portsclean -CDL
 +
 +<code Home-Server-Beispiel>
 +PKG_LISTE="
 +ports-mgmt/pkg
 +ports-mgmt/portupgrade
 +ports-mgmt/portmaster
 +ports-mgmt/psearch
 +shells/bash
 +editors/vim
 +sysutils/screen
 +misc/mc
 +misc/gnu-watch
 +sysutils/zfsnap
 +converters/base64
 +converters/unix2dos
 +converters/dosunix
 +ftp/wget
 +ftp/lftp
 +net/rsync
 +net/bmon
 +archivers/zip
 +archivers/p7zip
 +sysutils/dmidecode
 +sysutils/sysinfo
 +sysutils/smartmontools
 +sysutils/nvme-cli
 +sysutils/hwstat
 +www/squid
 +www/squidanalyzer
 +www/squidview
 +security/sudo
 +security/snoopy
 +security/openssl
 +security/mcrypt
 +sysutils/pwgen
 +sysutils/fusefs-ntfs
 +sysutils/fusefs-ext2
 +sysutils/e2fsprogs
 +sysutils/eject
 +sysutils/lsblk
 +sysutils/lsop
 +sysutils/lscpu
 +sysutils/bsdstats
 +sysutils/zeroer
 +sysutils/grub2-bhyve
 +sysutils/vm-bhyve
 +sysutils/ipmitool
 +sysutils/pcpustat
 +devel/pkgconf
 +mail/fetchmail
 +mail/fetchmailconf
 +textproc/pdftohtml
 +print/pstotext
 +print/psutils
 +print/ghostscript9-agpl-base
 +mail/dovecot
 +mail/maildrop
 +net-mgmt/iftop
 +net-mgmt/ipcalc
 +net-mgmt/sipcalc
 +graphics/p5-Image-ExifTool
 +databases/postgresql12-server
 +graphics/poppler-utils
 +net/samba${SAMBA_VERSION}
 +lang/php${PHP_VERSION}
 +graphics/php${PHP_VERSION}-gd
 +textproc/php${PHP_VERSION}-xml
 +archivers/php${PHP_VERSION}-zip
 +ftp/php${PHP_VERSION}-curl
 +ftp/curl
 +security/php${PHP_VERSION}-openssl
 +www/links
 +www/nginx
 +www/thttpd
 +net-im/py-matrix-synapse
 +audio/cdparanoia
 +audio/faac
 +audio/vorbis-tools
 +audio/lame
 +textproc/dict
 +sysutils/lsof
 +sysutils/bsdhwmon
 +sysutils/bsdinfo
 +audio/libsndfile
 +multimedia/ffmpeg
 +multimedia/libdvdread
 +multimedia/mplayer
 +sysutils/cpupdate
 +security/gnupg
 +graphics/ImageMagick7
 +multimedia/x264
 +multimedia/mediainfo
 +sysutils/dvdbackup
 +audio/vorbis-tools
 +multimedia/mkvtoolnix
 +multimedia/handbrake
 +sysutils/vobcopy
 +sysutils/dvd+rw-tools
 +net/minidlna
 +security/nmap
 +converters/p5-JSON-PP
 +sysutils/ezjail
 +emulators/linux-c7
 +multimedia/makemkv
 +</code>
 +
 +
 +===== ab FreeBSD 11.0-RELEASE =====
 +
 +update FreeBSD 11.0-RELEASE
 +  # freebsd-update fetch
 +  # freebsd-update install
 +
 +[[https://www.freebsd.org/releases/11.2R/installation.html|upgrade von FreeBSD 11.1 auf FreeBSD 11.2-RELEASE]]
 +  # freebsd-update upgrade -r 11.2-RELEASE
 +  # freebsd-update install
 +  <reboot the system>
 +  # freebsd-update install
 +  <updating installed third-party applications>
 +  # freebsd-update install
 +  <reboot the system>
 +
 +
 +===== bis FreeBSD 10.3-RELEASE =====
 +
 +FreeBSD 10.3-RELEASE (''[[https://forums.freebsd.org/threads/missed-upgrade-instructions-regarding-bspatch.58165/|: > /usr/bin/bspatch]]'')
 +  # : > /usr/bin/bspatch
 +  # freebsd-update upgrade -r 11.0-RELEASE
 +  # freebsd-update install
 +  <reboot the system>
 +  # freebsd-update install
 +  <rebuild third-party software>
 +  # freebsd-update install
 +
 +
 +===== Beispiel FreeBSD 8.0 =====
 +
 +  # uname -a
 +  FreeBSD hostname 8.0-RELEASE-p4 FreeBSD 8.0-RELEASE-p4 #0: Sun Aug 29 22:00:45 CEST 2010     root@hostname:/usr/obj/usr/src/sys/GENERIC  amd64
 +
 +Wir haben also ein 8.0-er Release und wollen auf 8.1 aktuallisieren, das ging mit //cvsup// ganz gut
 +aber jetzt geht es mit //freebsd-update// deutlich besser... ;-)
 +
 +Und das geht so, erstmal alles nötige für das neue Release saugen:
 +  # freebsd-update -r 8.1-RELEASE upgrade
 +  Looking up update.FreeBSD.org mirrors... 4 mirrors found.
 +  Fetching metadata signature for 8.0-RELEASE from update5.FreeBSD.org... done.
 +  Fetching metadata index... done.
 +  Fetching 1 metadata patches. done.
 +  Applying metadata patches... done.
 +  Fetching 1 metadata files...
 +  ...
 +
 +Jetzt werden einige Dateiunterschiede gezeigt, die man von Hand bearbeiten muss, aber das gibt es ja auch beim Update mit //cvsup//.
 +
 +  * [[http://www.denkrobat.de/wiki/index.php/FreeBSD_updaten]]
 +
 +... dann den neuen Kernel installieren:
 +  # freebsd-update fetch
 +  # freebsd-update install
 +  Installing updates...
 +  Kernel updates have been installed.  Please reboot and run
 +  "/usr/sbin/freebsd-update install" again to finish installing updates.
 +
 +... mit dem neuen Kernel booten:
 +  # reboot && exit
 +
 +  # uname -a
 +  FreeBSD hostname 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
 +
 +... jetzt den Rest installieren:
 +  # freebsd-update install
 +  Installing updates... done.
 +
 +... mit dem neuen System booten:
 +  # reboot && exit
 +
 +Fertig!
 +
 +
 +=== Probleme ===
 +
 +das Upgrade funktioniert nicht:
 +  # freebsd-update -r 9.0-RELEASE upgrade
 +  Looking up update.FreeBSD.org mirrors... 4 mirrors found.
 +  Fetching public key from update5.FreeBSD.org... failed.
 +  Fetching public key from update4.FreeBSD.org... failed.
 +  Fetching public key from update2.FreeBSD.org... failed.
 +  Fetching public key from update3.FreeBSD.org... failed.
 +  No mirrors remaining, giving up.
 +
 +Die Ursache für diesen Fehler kenne ich noch nicht...
 +
 +der Vollstädigkeithalber möchte ich nur erwähnen, dass man die Daten hier findet:
 +[[http://update.freebsd.org/9.0-RELEASE/amd64/pub.ssl]]:
 +  
 +  -----BEGIN PUBLIC KEY-----
 +  MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA2kXIMh58KXUCk1siiXwG
 +  tKk55IG2khASQbx7nL7Z9Mh0Ie4VnPV1REvchfYFz6gZV9cX7Yz9R7uyEac8NRXN
 +  gKXGxnzF887CsjcTxWvsEoFqTLG57O4LSSm+MO3Sg4HuxnanifeWec9PNz150vU/
 +  +q6s6XTtNHSysuo7XcBjczJigSBAMjdTEMCexiHKGZm0c9tyR4grA1TqSk2Agr9+
 +  7F7SA4Ck8wjM7srFSlYoyxHZtTE+9vz0tx0/5v2VW11NN0RBNoY1F90CCL41Ln73
 +  yqABPWTfAaJ6Z6oQMwNBc+Q2SoCzK76XgZosCWylj3rmzSPhdTcrvFVa0IsUc2Gr
 +  wZImlJ7UtJYpVrKXDvOb1UG/2yQx8Eci+XyPhcgUahSN4Vidz9YyiD7qpf11VYhL
 +  BFeHnkm9LsrBJil4wGuOpXUUzMiKxpR6g3gfMA7PcBK6erxzFzcJHI3KMN0m3PIW
 +  szig8XxdLTc/e9XihPWqDbpGqNMjl9Tfz/nN2LXJA+acf41LenFIY7x4IkHrPM6D
 +  UNU+PsR6F+FMg3VgiJ3lrJmssVqLZRD9MMu51JtrN2NK1uhmFJDK7ZkLefHjdfTh
 +  1HOcIyd8rRt/m8LsbQcdFlg/BTeqoG+wHburoDn9z7HknB4DBxcyRGxHdJuBzytj
 +  YKZHuFglSqt+29fNS/WXWTcCAwEAAQ==
 +  -----END PUBLIC KEY-----
 +
 +
 +===== Jail =====
 +
 +[[::freebsd:Jail#Update all Jail's]]
 +