Bug 270338 - FreeBSD Handbook: minor and major upgrades with freebsd-update(8): corrections and improvements
Summary: FreeBSD Handbook: minor and major upgrades with freebsd-update(8): correction...
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-doc (Nobody)
URL: https://docs.freebsd.org/en/books/han...
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2023-03-19 10:30 UTC by Graham Perrin
Modified: 2024-05-05 08:04 UTC (History)
2 users (show)

See Also:


Attachments
Screenshot: two windows, FreeBSD Handbook to the right, some Diigo annotations (320.91 KB, image/png)
2023-03-19 20:55 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2023-03-19 10:30:07 UTC
The UPGRADING section of today's <https://markmail.org/message/txbjmnhhtv3sgvpi>, highly condensed: 

# freebsd-update upgrade -r 13.2-RC3

# freebsd-update install

# shutdown -r now

# freebsd-update install

# shutdown -r now

# freebsd-update install

– that is, three (3) runs of    freebsd-update install


<https://docs.freebsd.org/en/books/handbook/cutting-edge/#freebsdupdate-upgrade> at 74845c5c7f seems to not describe the possibility of a third run in the case of a major upgrade.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2023-03-19 10:43:24 UTC
<https://github.com/freebsd/freebsd-doc/blob/main/documentation/content/en/books/handbook/cutting-edge/_index.adoc#23-performing-major-and-minor-version-upgrades>

> Performing Major and Minor Version Upgrades

– (currently 25.2.3) includes this (before 25.2.3.1): 

> The upgrade is now complete. If this was a major version upgrade, 
> reinstall all ports and packages as described in Upgrading Packages 
> After a Major Version Upgrade.

– with reference to <https://github.com/freebsd/freebsd-doc/blob/main/documentation/content/en/books/handbook/cutting-edge/_index.adoc#freebsdupdate-portsrebuild>: 

> Upgrading Packages After a Major Version Upgrade

– (currently 25.2.3.2).


----


I can not tally the suggested sequence of commands in the Handbook (25.2.3, excluding 25.2.3.1, followed by 25.2.3.2) with the suggsted sequence in today's RC3 announcement. 

Am I missing something?
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2023-03-19 10:45:17 UTC
(In reply to Graham Perrin from comment #0)

> … seems to not describe the possibility of a third run in the case of 
> a major upgrade.

Maybe ignore that. I think, it's the sequences (the order) confusing me.
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2023-03-19 20:55:16 UTC
Created attachment 240990 [details]
Screenshot: two windows, FreeBSD Handbook to the right, some Diigo annotations

Briefly


Given the advice in the window to the left (yesterday's email), visualise this scenario: 

a) kernel and world already upgraded from 12.4-RELEASE to
   13.2-RC3

b) a recommended rebuild and install of all applications

c) shutdown -r now

d) freebsd-update install    to remove stale files

– I see no problem with this.


----


Given the advice to the right (the Handbook) and the same scenario: 

a) kernel and world already upgraded from 12.4-RELEASE to
   13.2-RC3

b) pkg-static upgrade -f     using an infrastructure that does 
                             not yet have any 13.2⋯-based jail 
                             for build purposes

c) freebsd-update install    to tie up loose ends

d) reboot                    to the same version of the OS
                             (not a new version).
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2023-04-09 18:19:47 UTC
From D39474: 

> Given the imminent announcement of 13.2-RELEASE, I'll appreciate 
> approval or comments at the earliest opportunity.

Thanks
Comment 5 Graham Perrin freebsd_committer freebsd_triage 2023-04-14 17:25:08 UTC
<https://github.com/freebsd/freebsd-doc/commit/a836774703facd9ab8b7bfd64ab1c6116631cdeb>

> [Handbook]: Clarify kernel modules on upgrades

<https://github.com/freebsd/freebsd-doc/commit/8cd5510042fa533c7b3a99a25f6db67636145466>

> handbook/cutting-edge/: trailing white space
Comment 6 Graham Perrin 2023-10-06 17:04:05 UTC
From bug 213935 comment 1: 

> I think you should not skip intermediate versions. ⋯

As far as I know: this (advice to not skip) is often recommended, but not officially made explicit. 

It is, I think, implicit in release-specific installation instructions. For example, from instructions at <https://www.freebsd.org/releases/13.2R/> for 13.2-RELEASE: 

> ⋯ freebsd-update(8) ⋯ 12.4-RELEASE or 13.1-RELEASE can upgrade ⋯


@re please: should there be clearer advice, in the FreeBSD Handbook, to complete minor update routines before attempting a major upgrade? 

Currently, under <https://docs.freebsd.org/en/books/handbook/book/#freebsdupdate-upgrade>: 

> ⋯ 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
> 
> ⋯


(If, say, an operator has a non-patched 13.0 system: there's no hint to patch before attempting an upgrade.)
Comment 7 Graham Perrin 2023-10-07 23:58:42 UTC
(In reply to Graham Perrin from comment #6)

> @re please: 

Sorry, ignore that. 

Yesterday afternoon, I remembered the keyword that appears, somewhere, with regard to major upgrades that omit prior minor updates: 

    untested.

Moreover, bug 264142 comment 0:

> Required per email discussion with gjb@ if not running the 
> latest -p<n> of the version upgrading from.

(Comment 6 here is a duplicate of already linked bug 264142.)
Comment 8 Ed Maste freebsd_committer freebsd_triage 2023-11-22 18:07:13 UTC
I requests in some comments followed later by "Sorry, ignore that.", and a link to a Phabricator code review that is resolved.

Are there outstanding issues or uncommitted changes in this PR, or should it be resolved now?
Comment 9 Graham Perrin 2024-05-05 07:13:46 UTC
(In reply to Ed Maste from comment #8)

Sorry for the slow response, I'm rarely in Bugzilla nowadays. There remain inconsistencies, and a probable need to rethink at least one thing in the context of pkgbase. 

Partly to simplify comparison, I'll add: 

- one comment with information condensed from www.freebsd.org/releases

- three comments with information condensed from docs.freebsd.org …
Comment 10 Graham Perrin 2024-05-05 07:14:54 UTC
<https://www.freebsd.org/releases/13.3R/installation/#upgrade-binary> condensed

freebsd-update fetch
freebsd-update install
freebsd-update upgrade -r 13.3-RELEASE
freebsd-update install
shutdown -r now
freebsd-update install
pkg (or whatever) for ports
"only if freebsd-update(8) printed a message indicating that this was necessary"
freebsd-update install
shutdown -r now
Comment 11 Graham Perrin 2024-05-05 07:15:56 UTC
<https://docs.freebsd.org/en/books/handbook/cutting-edge/#updating-upgrading-freebsdupdate> condensed

freebsd-update fetch
freebsd-update install
Comment 12 Graham Perrin 2024-05-05 07:17:16 UTC
<https://docs.freebsd.org/en/books/handbook/cutting-edge/#freebsdupdate-upgrade> condensed

freebsd-update fetch
freebsd-update install
freebsd-update -r 13.2-RELEASE upgrade
freebsd-update install
shutdown -r now
freebsd-update install
"Depending upon whether any library version numbers were bumped, there may only be two install phases instead of three."
"The upgrade is now complete. If this was a major version upgrade, reinstall all ports and packages as described in Upgrading Packages After a Major Version Upgrade."
Comment 13 Graham Perrin 2024-05-05 07:19:04 UTC
<https://docs.freebsd.org/en/books/handbook/cutting-edge/#freebsdupdate-portsrebuild> condensed

pkg-static upgrade -f
freebsd-update install
portmaster -af
"Reboot the machine into the new FreeBSD version."
Comment 14 Graham Perrin 2024-05-05 07:24:22 UTC
Re: comment #12

This can not be true: 

> … there may only be two install phases …

If you restart the OS after the first two runs of 
    freebsd-update install
then you'll probably find a kernel-userland mismatch in response to 
    freebsd-version -kru
Comment 15 Graham Perrin 2024-05-05 08:04:24 UTC
(In reply to Graham Perrin from comment #9)

To avoid discussion in Bugzilla …

… for users of FreeBSD Discord, I created a thread for this bug 270338 in the #documentation channel: 

<https://discord.com/channels/727023752348434432/1236580259558592522>

Please note, this is not to discourage discussion in areas that are more open, e.g. <https://www.freebsd.org/community/>. It's a convenience, for users of the service.