Changeset View
Standalone View
documentation/content/en/books/handbook/cutting-edge/_index.adoc
| Show First 20 Lines • Show All 1,082 Lines • ▼ Show 20 Lines | ||||||||||||||||||
| The last step after updating is to restart the computer so all the changes take effect: | The last step after updating is to restart the computer so all the changes take effect: | |||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| # shutdown -r now | # shutdown -r now | |||||||||||||||||
| .... | .... | |||||||||||||||||
| [[pkgbase]] | [[pkgbase]] | |||||||||||||||||
| == Updating FreeBSD with Base System Packages | == Updating FreeBSD with packages | |||||||||||||||||
grahamperrinUnsubmitted Done Inline Actions
grahamperrin: | ||||||||||||||||||
| Starting from 14.0-RELEASE, the FreeBSD project has published a set of packages of the kernel and base system, using man:pkg[8]. | Starting from 14.0-RELEASE, the FreeBSD project has published a set of packages of the base system, using man:pkg[8]. | |||||||||||||||||
Done Inline Actionsbase is kernel + userland, so we need avoid expressions such as kernel and base. grahamperrin: //base// is kernel + userland, so we need avoid expressions such as //kernel and base//. | ||||||||||||||||||
Done Inline Actions
Less use of the word use. grahamperrin: Less use of the word //use//. | ||||||||||||||||||
| These can be used in the same convenient way that users are used to, for adding and upgrading ported software, but for the kernel and userland itself. | The convenience of pkg is no longer limited to the FreeBSD ports collection. | |||||||||||||||||
| The packages, and usage thereof, are often referred to as pkgbase. | man:pkg[8] can be used for FreeBSD itself. | |||||||||||||||||
| Base packages, and usage thereof, were traditionally referred to as _pkgbase_. | ||||||||||||||||||
Not Done Inline Actions
grahamperrin: | ||||||||||||||||||
| Packages have been available since link:https://lists.freebsd.org/archives/freebsd-pkgbase/2023-October/000221.html[October 2023], considered experimental for FreeBSD's 14 Release. | Publication of official packages began in link:https://lists.freebsd.org/archives/freebsd-pkgbase/2023-October/000221.html[October 2023]. | |||||||||||||||||
| Their use with FreeBSD 14 is currently experimental. | ||||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| Starting from 15.0-RELEASE, Base System packages will be the default and officially supported way to both install new FreeBSD instances, and also to update and upgrade between minor and major releases. | Starting from 15.0-RELEASE, man:freebsd-base[7] will be supported as a tech preview for: | |||||||||||||||||
| [NOTE] | * installation | |||||||||||||||||
| ==== | * minor upgrades | |||||||||||||||||
| From 15.0-RELEASE onwards, the long-running man:freebsd-update[8] tool will only be supported on the earlier 13 and 14 release branches. | * major upgrades | |||||||||||||||||
| ==== | ||||||||||||||||||
| Base System Packages replace: | freebsd-base will eventually replace: | |||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| * tarball distribution sets, such as `base.txz` or `kernel.txz`, which are historically used for installation of the OS with man:bsdinstall[8] | * tarball distribution sets, such as `base.txz` or `kernel.txz`, which are historically used for installation of the OS with man:bsdinstall[8] | |||||||||||||||||
| * man:freebsd-update[8] for updates to the OS. | * man:freebsd-update[8] for updates to the OS. | |||||||||||||||||
Done Inline ActionsThe current plan is for freebsd-update to work with pkg. grahamperrin: The current plan is for freebsd-update to work with pkg. | ||||||||||||||||||
| The current plan is for freebsd-update to work with pkg. | ||||||||||||||||||
| [WARNING] | ||||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| ==== | ||||||||||||||||||
| The replacement of distribution sets will take some time, until freebsd-base is fully stable! | ||||||||||||||||||
| ==== | ||||||||||||||||||
| Base System packages complement crossref:cutting-edge[makeworld,"building and installing from source"], which is still available for those who wish to build their own custom kernels or userland. | Base System packages complement crossref:cutting-edge[makeworld,"building and installing from source"], which is still available for those who wish to build their own custom kernels or userland. | |||||||||||||||||
| It is also possible to build custom base system packages from local sources, as well as just relying on officially provided packages. | It is also possible to build custom base system packages from local sources, as well as just relying on officially provided packages. | |||||||||||||||||
| === Converting a Host to use pkgbase | === Converting a Host to use freebsd-base | |||||||||||||||||
| Systems installed with FreeBSD 14.0-RELEASE or later can be converted to use Base System packages. | FreeBSD 14.0-RELEASE or later can be converted to use base packages. | |||||||||||||||||
| For earlier versions, it is recommended to first upgrade to a recent Version, and then convert. | Earlier versions must be upgraded with freebsd-update before conversion. | |||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| The FreeBSD Foundation has sponsored development of a tool called link:https://github.com/FreeBSDFoundation/pkgbasify[pkgbasify], which for most users, will be the easiest and safest way to convert systems to use Base System packages. | For conversion, the FreeBSD Foundation-sponsored link:https://github.com/FreeBSDFoundation/pkgbasify[pkgbasify] tool is recommended. | |||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| Follow the instructions given there. | ||||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| man:freebsd-update[8] will be enhanced to use pkg and pkgbasify. | ||||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| [WARNING] | [WARNING] | |||||||||||||||||
| ==== | ==== | |||||||||||||||||
| Note that this migration requires up to 5GiB additional free space, to download, unpack, and relocate any conflicting files. | Note that this migration requires up to 5GiB additional free space, to download, unpack, and relocate any conflicting files. | |||||||||||||||||
| The pkgbasify tool does not check for this and it is the responsibility of the user to ensure that enough space is available before running the migration. | The pkgbasify tool does not check for this and it is the responsibility of the user to ensure that enough space is available before running the migration. | |||||||||||||||||
| ==== | ==== | |||||||||||||||||
| man:pkgbasify[8] (or whatever outcome link:https://reviews.freebsd.org/D51594[D51594] or link:https://wiki.freebsd.org/WantedPorts#O-P[port request] will have) performs 6 main tasks: | man:pkgbasify[8] (or whatever outcome link:https://reviews.freebsd.org/D51594[D51594] or link:https://wiki.freebsd.org/WantedPorts#O-P[port request] will have) performs 6 main tasks: | |||||||||||||||||
| * Creates a backup boot environment (ZFS only) with man:bectl[8] | * Creates a backup boot environment (ZFS only) with man:bectl[8] | |||||||||||||||||
| * Creates the new package repository config files | * Creates the new package repository config files | |||||||||||||||||
| * Upgrades existing system components such as base, kernel, lib32, debug | * Upgrades existing system components such as base, kernel, lib32, debug | |||||||||||||||||
| * Merges existing and new config files | * Merges existing and new config files | |||||||||||||||||
| * Updates passwd and capabilities databases | * Updates passwd and capabilities databases | |||||||||||||||||
| * Restarts sshd immediately | * Restarts sshd immediately | |||||||||||||||||
| [source,shell] | === Upgrading a Host using freebsd-base | |||||||||||||||||
Done Inline ActionsDon't attempt to duplicate the pkgbasify-provided documentation for pkgbasify. grahamperrin: Don't attempt to duplicate the pkgbasify-provided documentation for pkgbasify. | ||||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| .... | ||||||||||||||||||
| # cd /tmp | ||||||||||||||||||
| # fetch https://github.com/FreeBSDFoundation/pkgbasify/raw/refs/heads/main/pkgbasify.lua | ||||||||||||||||||
| # chmod +x pkgbasify.lua | ||||||||||||||||||
| # ./pkgbasify.lua | ||||||||||||||||||
| .... | ||||||||||||||||||
| === Upgrading a Host using pkgbase | ||||||||||||||||||
| [WARNING] | [WARNING] | |||||||||||||||||
| ==== | ==== | |||||||||||||||||
| This is still in development, so please be careful especially when converting an existing system to use pkgbase. | This is still in development, so please be careful especially when converting an existing system to use freebsd-base. | |||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| ==== | ==== | |||||||||||||||||
| Create a folder for custom pkg repository config files, if there is none present already. | Create a folder for custom pkg repository config files, if there is none present already. | |||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| # mkdir -p /usr/local/etc/pkg/repos/ | # mkdir -p /usr/local/etc/pkg/repos/ | |||||||||||||||||
| .... | .... | |||||||||||||||||
| For using the pkgbase repository, create a pkg repository configuration file called `FreeBSD-base.conf`: | For using the freebsd-base repository, create a pkg repository configuration file called `FreeBSD-base.conf`: | |||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| [[pgk-base-repo-configuration]] | [[pgk-base-repo-configuration]] | |||||||||||||||||
| [.programlisting] | [.programlisting] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| FreeBSD-base { | FreeBSD-base { | |||||||||||||||||
| url = "pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}"; | url = "pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}"; | |||||||||||||||||
| mirror_type = "srv"; | mirror_type = "srv"; | |||||||||||||||||
| signature_type = "fingerprints"; | signature_type = "fingerprints"; | |||||||||||||||||
| Show All 11 Lines | ||||||||||||||||||
| [cols="10%,20%,70%, options="header"] | [cols="10%,20%,70%, options="header"] | |||||||||||||||||
| |=== | |=== | |||||||||||||||||
| | Branch | | Branch | |||||||||||||||||
| | Frequency | | Frequency | |||||||||||||||||
| | URL | | URL | |||||||||||||||||
| | main | | main | |||||||||||||||||
| | twice daily - 12:00 and 00:00 UTC | | twice daily - 12:00 and 00:00 UTC | |||||||||||||||||
| | `https://pkg.freebsd.org/${ABI}/base_latest` | | `pkg+https://pkg.freebsd.org/${ABI}/base_latest` | |||||||||||||||||
| | main | | main | |||||||||||||||||
| | weekly – Sunday at 12:00 UTC | | weekly – Sunday at 12:00 UTC | |||||||||||||||||
| | `https://pkg.freebsd.org/${ABI}/base_weekly` | | `pkg+https://pkg.freebsd.org/${ABI}/base_weekly` | |||||||||||||||||
| | stable/14 | | stable/14 | |||||||||||||||||
| | twice daily – 12:00 and 00:00 UTC | | twice daily – 12:00 and 00:00 UTC | |||||||||||||||||
| | `https://pkg.freebsd.org/${ABI}/base_latest` | | `pkg+https://pkg.freebsd.org/${ABI}/base_latest` | |||||||||||||||||
| | stable/14 | | stable/14 | |||||||||||||||||
| | weekly – Sunday at 12:00 UTC | | weekly – Sunday at 12:00 UTC | |||||||||||||||||
| | `https://pkg.freebsd.org/${ABI}/base_weekly` | | `pkg+https://pkg.freebsd.org/${ABI}/base_weekly` | |||||||||||||||||
| | releng/14.2 | | releng/14.3 | |||||||||||||||||
| | twice daily – 12:00 and 00:00 UTC | | twice daily – 12:00 and 00:00 UTC | |||||||||||||||||
| | `https://pkg.freebsd.org/${ABI}/base_release_2` | | `pkg+https://pkg.freebsd.org/${ABI}/base_release_3` | |||||||||||||||||
| | releng/14.3 | | releng/15.0 | |||||||||||||||||
| | twice daily – 12:00 and 00:00 UTC | | twice daily – 12:00 and 00:00 UTC | |||||||||||||||||
| | `https://pkg.freebsd.org/${ABI}/base_release_3` | | `pkg+https://pkg.freebsd.org/${ABI}/base_release_0` | |||||||||||||||||
| | stable/15 | ||||||||||||||||||
| | twice daily – 12:00 and 00:00 UTC | ||||||||||||||||||
| | `pkg+https://pkg.freebsd.org/${ABI}/base_latest` | ||||||||||||||||||
| | stable/15 | ||||||||||||||||||
| | weekly – Sunday at 12:00 UTC | ||||||||||||||||||
| | `pkg+https://pkg.freebsd.org/${ABI}/base_weekly` | ||||||||||||||||||
| |=== | |=== | |||||||||||||||||
Not Done Inline ActionsNeeds releng/15.0 plus 16.0-CURRENT options. For all FreeBSD-base url values:
grahamperrin: Needs releng/15.0 plus 16.0-CURRENT options.
For all FreeBSD-base url values:
- pkg+https… | ||||||||||||||||||
Done Inline ActionsCan you tell when pkgbase.freebsd.org will be introduced? lukas.engelhardt_gmx.de: Can you tell when pkgbase.freebsd.org will be introduced?
16.0-CURRENT is main/base_latest, or… | ||||||||||||||||||
| To upgrade the system, change the configuration file according to the desired release, and run: | To upgrade the system, change the configuration file according to the desired release, and run: | |||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| # pkg update -r FreeBSD-base | # pkg update -r FreeBSD-base | |||||||||||||||||
| # pkg upgrade -r FreeBSD-base | # pkg upgrade -r FreeBSD-base | |||||||||||||||||
| .... | .... | |||||||||||||||||
| check, if these packages are correct and accept the changes. | check, if these packages are correct and accept the changes. | |||||||||||||||||
| Reboot the OS executing the following command: | Reboot the OS executing the following command: | |||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| # shutdown -r now | # shutdown -r now | |||||||||||||||||
| .... | .... | |||||||||||||||||
| ==== Performing Major version upgrades | [[pkgbase-major-upgrade]] | |||||||||||||||||
| ==== Major Upgrades | ||||||||||||||||||
Done Inline Actionss/your/the/ also maybe: s/nice/easy/ bcr: s/your/the/
also maybe: s/nice/easy/ | ||||||||||||||||||
| With ZFS, boot environments allow an upgrade to be performed without interrupting running software. | ||||||||||||||||||
Done Inline Actionss/your/the/ bcr: s/your/the/ | ||||||||||||||||||
Done Inline Actions
For now, be more assertive about backup. grahamperrin: For now, be more assertive about backup. | ||||||||||||||||||
| If the system does not use root-on-ZFS: backup before upgrading. | ||||||||||||||||||
| When running ZFS, consider creating a boot environment before upgrading to a newer version. | ===== Preparations | |||||||||||||||||
| To create a new boot environment using the man:bectl[8] tool run: | Change `/usr/local/etc/pkg/repos/FreeBSD-base.conf` to target the correct major release like `base_release_0` for 15.0-RELEASE, to look like this: | |||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| [WARNING] | ||||||||||||||||||
| ==== | ||||||||||||||||||
Not Done Inline Actionsthis file won't exist in 15.0-RELEASE. instead, the secteam-managed repository will exist in /etc/pkg. ivy: this file won't exist in 15.0-RELEASE. instead, the secteam-managed repository will exist in… | ||||||||||||||||||
Not Done Inline Actionshow is the major upgrade supposed to go, or is this not decided yet? lukas.engelhardt_gmx.de: how is the major upgrade supposed to go, or is this not decided yet? | ||||||||||||||||||
Not Done Inline Actionsi don't think that's been decided yet as we don't have a supported pkgbase major upgrade path right now, since 15 is the first pkgbase release. i expect it will involve editing the FreeBSD-base.conf (or whatever the file ends up being called) to specify the new release (which is more or less what you're written here), then running pkg upgrade. if you're trying to document a pkgbase upgrade from 14 to 15... this is not really supported, and the documentation should probably reflect that. at the least, that would involve installing the FreeBSD-set-minimal package, which is new in 15. i haven't tested this and have no idea if such an upgrade actually works. ivy: i don't think that's been decided yet as we don't have a supported pkgbase major upgrade path… | ||||||||||||||||||
Done Inline Actionss/so it looks like/to look like this/ bcr: s/so it looks like/to look like this/ | ||||||||||||||||||
| This file might change to be included in RELEASE with a different path. | ||||||||||||||||||
| ==== | ||||||||||||||||||
| [.programlisting] | ||||||||||||||||||
| .... | ||||||||||||||||||
| FreeBSD-base { | ||||||||||||||||||
| url = "pkg+https://pkg.freebsd.org/${ABI}/base_release_0"; | ||||||||||||||||||
| mirror_type = "srv"; | ||||||||||||||||||
| signature_type = "fingerprints"; | ||||||||||||||||||
| fingerprints = "/usr/share/keys/pkg"; | ||||||||||||||||||
| enabled = yes; | ||||||||||||||||||
| } | ||||||||||||||||||
| .... | ||||||||||||||||||
| [WARNING] | ||||||||||||||||||
| ==== | ||||||||||||||||||
| As pkgbase with FreeBSD 14 is experimental, so is a pkgbase major upgrade to 15. | ||||||||||||||||||
| At the time of this writing in some edge-cases the major upgrade removes pkg and therefore segfaults. | ||||||||||||||||||
| This is considered a (link:https://github.com/freebsd/pkg/issues/2475[known issue]) for 15.0-RELEASE. | ||||||||||||||||||
| To work around this issue, lock pkg before upgrading. | ||||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| # bectl create 14.2-RELEASE-p4 | # pkg -c /mnt/upgrade lock pkg | |||||||||||||||||
| .... | .... | |||||||||||||||||
Not Done Inline Actions/base_release_${VERSION_MINOR} might be better. grahamperrin: `/base_release_${VERSION_MINOR}`
might be better. | ||||||||||||||||||
Not Done Inline Actionswon't this use the existing release minor, not the minor of the release we're trying to upgrade to? ivy: won't this use the existing release minor, not the minor of the release we're trying to upgrade… | ||||||||||||||||||
Done Inline Actionsi agree, this is especially for upgrading, therefore should be set manually, or i would have to set VERSION_MINOR with env later when upgrading. lukas.engelhardt_gmx.de: i agree, this is especially for upgrading, therefore should be set manually, or i would have to… | ||||||||||||||||||
| Use this boot environment to start the system as it was before the update if something goes wrong. | An experimental major upgrade from FreeBSD 14, to 15 (or 16.0-CURRENT), should be followed by installation of meta package `FreeBSD-set-minimal`. | |||||||||||||||||
| ==== | ||||||||||||||||||
Done Inline Actions
Whilst FreeBSD Handbook does not normally stray into CURRENT territory, it's worth mentioning 16.0-CURRENT here. grahamperrin: Whilst FreeBSD Handbook does not normally stray into CURRENT territory, it's worth mentioning… | ||||||||||||||||||
| Save a list of the non-base packages in case they are needed later: | Save a list of the non-base packages in case they are needed later: | |||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| pkg prime-origins | sort -u > /var/tmp/pkg-prime-origins.txt | pkg prime-origins | sort -u > /var/tmp/pkg-prime-origins.txt | |||||||||||||||||
| .... | .... | |||||||||||||||||
| Change `/usr/local/etc/pkg/repos/FreeBSD-base.conf` to target the correct major release like `base_latest`, so it looks like: | [[pkgbase-major-zfs]] | |||||||||||||||||
| ===== major upgrade with zfs | ||||||||||||||||||
| Create a boot environment using man:bectl[8] and name it according to the version upgrading to | ||||||||||||||||||
Done Inline Actionss/your/a/ bcr: s/your/a/
s/you would like to upgrade to/to upgrade to/ | ||||||||||||||||||
| [source,shell] | ||||||||||||||||||
| .... | ||||||||||||||||||
| # bectl create 15.0-RELEASE | ||||||||||||||||||
| .... | ||||||||||||||||||
| [.programlisting] | Create a directory then mount the new boot environment there to enable working with pkg man:chroot[8] and rootdir. | |||||||||||||||||
| [source,shell] | ||||||||||||||||||
Done Inline Actionss/folder/directory/g bcr: s/folder/directory/g
s/your/the just created/ | ||||||||||||||||||
Done Inline Actions
Will it help to link to the manual page for chroot(8)? grahamperrin: Will it help to link to the manual page for [[ https://man.freebsd.org/cgi/man.cgi? | ||||||||||||||||||
| .... | .... | |||||||||||||||||
| FreeBSD-base { | # mkdir /mnt/upgrade | |||||||||||||||||
| url = "pkg+https://pkg.freebsd.org/${ABI}/base_latest"; | # bectl mount 15.0-RELEASE /mnt/upgrade | |||||||||||||||||
| mirror_type = "srv"; | ||||||||||||||||||
| signature_type = "fingerprints"; | ||||||||||||||||||
| fingerprints = "/usr/share/keys/pkg"; | ||||||||||||||||||
| enabled = yes; | ||||||||||||||||||
| } | ||||||||||||||||||
| .... | .... | |||||||||||||||||
| The next step will upgrade the system to the specified version. | The next step will upgrade the boot environment to the specified version. | |||||||||||||||||
| [WARNING] | [WARNING] | |||||||||||||||||
| ==== | ==== | |||||||||||||||||
| This step might remove non-base packages, which could include the running desktop environment. | This step might remove non-base packages, which could include the running desktop environment. | |||||||||||||||||
| Be careful. | ||||||||||||||||||
| ==== | ==== | |||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| Set the environment variable ABI to upgrade the major version (replace amd64 with the architecture and 15 with the targeted version). | Set the environment variable ABI to upgrade the major version (replace amd64 with the architecture and 15 with the targeted version). | |||||||||||||||||
| Set the pkg-static chroot directory to the boot environment mountpoint. | ||||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
Done Inline ActionsLink to the issue, instead? Easier to track. grahamperrin: Link to the issue, instead? Easier to track.
https://github.com/freebsd/pkg/issues/2475 | ||||||||||||||||||
Done Inline ActionsBetter link to the issue? Easier to track: grahamperrin: Better link to the issue? Easier to track:
https://github.com/freebsd/pkg/issues/2475 | ||||||||||||||||||
| # env ABI=FreeBSD:15:amd64 pkg-static -c /mnt/upgrade upgrade -r FreeBSD-base | ||||||||||||||||||
| .... | ||||||||||||||||||
| There will be a prompt asking about ignoring the version mismatch looking like this: | ||||||||||||||||||
| [source,shell] | ||||||||||||||||||
| .... | ||||||||||||||||||
| Newer FreeBSD version for package FreeBSD-zoneinfo: | ||||||||||||||||||
| To ignore this error set IGNORE_OSVERSION=yes | ||||||||||||||||||
| - package: 1500058 | ||||||||||||||||||
| - running userland: 1500000 | ||||||||||||||||||
| Ignore the mismatch and continue? [y/N]: | ||||||||||||||||||
| .... | ||||||||||||||||||
| Check and confirm that. | ||||||||||||||||||
| To check if that was successful, chroot into the mountpoint of the boot environment and run `freebsd-version -kru`. | ||||||||||||||||||
| [source,shell] | ||||||||||||||||||
| .... | ||||||||||||||||||
| # chroot /mnt/upgrade | ||||||||||||||||||
| # freebsd-version -ku | ||||||||||||||||||
| # exit | ||||||||||||||||||
| .... | ||||||||||||||||||
| Activate the boot environment temporarily and reboot. | ||||||||||||||||||
| [source,shell] | ||||||||||||||||||
| .... | ||||||||||||||||||
| # bectl activate -t 15.0-RELEASE | ||||||||||||||||||
| # shutdown -r now | ||||||||||||||||||
| .... | ||||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| If the system does not work as expected: restart the OS to cease using the temporarily active boot environment. | ||||||||||||||||||
| The next boot will reuse the pre-upgrade environment. | ||||||||||||||||||
| If the system runs stable after reboot, don't forget to permanently activate this boot environment to prevent accidentally booting the old system. | ||||||||||||||||||
| [source,shell] | ||||||||||||||||||
| .... | ||||||||||||||||||
| bectl activate 15.0-RELEASE | ||||||||||||||||||
| .... | ||||||||||||||||||
| [[pkgbase-major-non-zfs]] | ||||||||||||||||||
| ===== major upgrade without zfs | ||||||||||||||||||
| Set the environment variable ABI to upgrade the major version (replace amd64 with the architecture and 15 with the targeted version). | ||||||||||||||||||
| [source,shell] | ||||||||||||||||||
Done Inline Actionsupgrading from 14 to 15 with pkgbase is not officially supported, since pkgbase is not supported in 14. upgrading from 14 to 15 with freebsd-update is fully supported. ivy: upgrading from 14 to 15 //with pkgbase// is not officially supported, since pkgbase is not… | ||||||||||||||||||
| .... | ||||||||||||||||||
Not Done Inline Actionsi'm fairly sure this is not true. there is some weird edge case which can result in pkg proposing to remove itself, which does cause pkg to crash if the user types 'y', but this is not the usual situation. ivy: i'm fairly sure this is not true. there is some weird edge case which can result in pkg… | ||||||||||||||||||
| # env ABI=FreeBSD:15:amd64 pkg-static upgrade -r FreeBSD-base | # env ABI=FreeBSD:15:amd64 pkg-static upgrade -r FreeBSD-base | |||||||||||||||||
| .... | .... | |||||||||||||||||
Done Inline Actionss/you need to// bcr: s/you need to// | ||||||||||||||||||
Not Done Inline Actions
grahamperrin: | ||||||||||||||||||
| There will be a prompt to ask about ignoring the version mismatch looking like this: | There will be a prompt to ask about ignoring the version mismatch looking like this: | |||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| Newer FreeBSD version for package FreeBSD-zoneinfo: | Newer FreeBSD version for package FreeBSD-zoneinfo: | |||||||||||||||||
| To ignore this error set IGNORE_OSVERSION=yes | To ignore this error set IGNORE_OSVERSION=yes | |||||||||||||||||
| - package: 1500058 | - package: 1500058 | |||||||||||||||||
Done Inline Actionss/to where you mounted your boot environment/to the boot environment mountpoint/ bcr: s/to where you mounted your boot environment/to the boot environment mountpoint/ | ||||||||||||||||||
Not Done Inline ActionsThis chunk should probably be earlier. grahamperrin: This chunk should probably be earlier. | ||||||||||||||||||
Not Done Inline ActionsThis chunk should probably be earlier. grahamperrin: This chunk should probably be earlier. | ||||||||||||||||||
| - running userland: 1500000 | - running userland: 1500000 | |||||||||||||||||
| Ignore the mismatch and continue? [y/N]: | Ignore the mismatch and continue? [y/N]: | |||||||||||||||||
| .... | .... | |||||||||||||||||
| Check and confirm that. | Check and confirm that. | |||||||||||||||||
| To check if that was successful, run `freebsd-version -kru`. | To check if the upgrade was successful, run `freebsd-version -ku`. | |||||||||||||||||
Done Inline Actionss/to ask/asking/ bcr: s/to ask/asking/ | ||||||||||||||||||
| Then reboot. | Then reboot. | |||||||||||||||||
Done Inline ActionsCan the subsection of the book be structured to avoid duplication? grahamperrin: Can the subsection of the book be structured to avoid duplication? | ||||||||||||||||||
Done Inline Actionsmoved to preparations lukas.engelhardt_gmx.de: moved to preparations | ||||||||||||||||||
| After upgrading to a new major version, updates and upgrades of installed packages to match the ABI version may be necessary. | ===== Post-upgrade tasks | |||||||||||||||||
| If pkg was locked during the update as a workaround remove the lock like this: | ||||||||||||||||||
Done Inline Actionss/you should remove the lock/remove the lock like this:/ bcr: s/you should remove the lock/remove the lock like this:/ | ||||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| # pkg update | # pkg unlock pkg | |||||||||||||||||
| # pkg upgrade | ||||||||||||||||||
| .... | .... | |||||||||||||||||
| If something broke, go back and activate the backup boot environment created before. | After upgrading to a new major version, updates and upgrades of installed packages to match the ABI version may be necessary. | |||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| # bectl activate 14.2-RELEASE-p4 | # pkg upgrade | |||||||||||||||||
| .... | .... | |||||||||||||||||
Done Inline Actions
If # implies superuser, then pkg update is superfluous. grahamperrin: If `# ` implies superuser, then `pkg update` is superfluous. | ||||||||||||||||||
Done Inline Actions
grahamperrin: | ||||||||||||||||||
| Reboot, and the system will be back to the state before upgrading. | ||||||||||||||||||
| If no boot environment was created before, consider getting help from link:https://www.freebsd.org/support/[FreeBSD Support]. | Consider getting help from link:https://www.freebsd.org/support/[FreeBSD Support] when experiencing issues. | |||||||||||||||||
Done Inline Actionss/If you need some more help, consider getting help from/Consider getting help from ... when experiencing issues. bcr: s/If you need some more help, consider getting help from/Consider getting help from ... when… | ||||||||||||||||||
| [[build-pkgbase-packages-locally]] | [[build-pkgbase-packages-locally]] | |||||||||||||||||
| === Manually building pkgbase and publishing it to the local network | === Manually building pkgbase and publishing it to the local network | |||||||||||||||||
Done Inline Actionss/your/the/ Also describe how (the -t option to bectl). bcr: s/your/the/
Also describe how (the -t option to bectl). | ||||||||||||||||||
| When building custom pkgbase packages clone the FreeBSD source tree: | When building custom pkgbase packages clone the FreeBSD source tree: | |||||||||||||||||
Done Inline Actionss/you/the system/ bcr: s/you/the system/
s/your/the/ | ||||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| # cd /usr/src | # cd /usr/src | |||||||||||||||||
| # git clone https://github.com/freebsd/freebsd-src.git /usr/src | # git clone https://github.com/freebsd/freebsd-src.git /usr/src | |||||||||||||||||
| .... | .... | |||||||||||||||||
| Check out the branch for the release to build packages for: | Check out the branch for the release to build packages for: | |||||||||||||||||
Done Inline Actionss/your/the/g bcr: s/your/the/g
s/you might accidentally boot/to prevent accidentally booting/ | ||||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| # git checkout releng/14.3 | # git checkout releng/14.3 | |||||||||||||||||
| .... | .... | |||||||||||||||||
| Start the building process, depending on the resources available this could take some while. | Start the building process, depending on the resources available this could take some while. | |||||||||||||||||
| Set the parallel processes according to the CPU core count. | Set the parallel processes according to the CPU core count. | |||||||||||||||||
| This example is written for an 8 core CPU: | This example is written for an 8 core CPU: | |||||||||||||||||
Done Inline Actionsthis text seems to duplicate the text above. ivy: this text seems to duplicate the text above. | ||||||||||||||||||
| [source,shell] | [source,shell] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| # make -j8 buildworld && make -j8 buildkernel && make -j8 packages | # make -j8 buildworld && make -j8 buildkernel && make -j8 packages | |||||||||||||||||
| .... | .... | |||||||||||||||||
| When building frequently, consider using package:devel/ccache[] to speed up subsequent builds from the cache. | When building frequently, consider using package:devel/ccache[] to speed up subsequent builds from the cache. | |||||||||||||||||
| After building, the packages will get saved into `/usr/obj/usr/src/repo/FreeBSD:14:amd64/14.3p2` or something like that, depending on the version build. | After building, the packages will get saved into `/usr/obj/usr/src/repo/FreeBSD:14:amd64/14.3p2` or something like that, depending on the version build. | |||||||||||||||||
| To publish these packages to the network set up a nginx service and use this location in the http server configuration: | To publish these packages to the network set up a nginx service and use this location in the http server configuration: | |||||||||||||||||
Done Inline ActionsWhitespace at the end of the sentence here. bcr: Whitespace at the end of the sentence here. | ||||||||||||||||||
| [.programlisting] | [.programlisting] | |||||||||||||||||
| .... | .... | |||||||||||||||||
| location /FreeBSD:14:amd64 { | location /FreeBSD:14:amd64 { | |||||||||||||||||
| alias /usr/obj/usr/src/repo/FreeBSD:14:amd64/; | alias /usr/obj/usr/src/repo/FreeBSD:14:amd64/; | |||||||||||||||||
| autoindex on; | autoindex on; | |||||||||||||||||
| } | } | |||||||||||||||||
| .... | .... | |||||||||||||||||
| ▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines | ||||||||||||||||||