# Major Version Upgrade 11.4-Release to 12.2-Release



## ldgc (Sep 30, 2021)

Hello 
I installed FreeBSD 11.4-Release on an old machine one week ago.
I noticed that today this version reached EOL.
It is my first time upgrading to a major version.
I read the handbook and search the forums for information about this subject.

`freebsd-version: 11.4-RELEASE-p13; uname -r: 11.4-RELEASE-p9`
Are the following steps a correct procedure for a GENERIC kernel and packages method?
`# freebsd-update -r 12.2-RELEASE upgrade
# freebsd-update install
# freebsd-update install
# pkg upgrade -f
# freebsd-update install
# shutdown -r now`


----------



## SirDice (Sep 30, 2021)

Yep, that looks good. You don't need to add the `-f` to `pkg upgrade` though, it should detect the major version change and automatically do a reinstall of everything.


----------



## macondo (Oct 4, 2021)

Excuse my ignorance, isn't he supposed to first go to 12.0??? and THEN go 12.2???


----------



## bakul (Oct 4, 2021)

macondo said:


> Excuse my ignorance, isn't he supposed to first go to 12.0??? and THEN go 12.2???



12.0 is older (released Dec 2018) than 11.4 (released Jun 2020), so no! In general not a good idea to "upgrade" to an older release even if the major version number is higher than your current os version.

Also, I'd just as soon upgrade to 13.0. Saving everything you care about before hand of course. In general this is a good idea because you're more likely to find help when a new release is _fresh_ in people's minds! On the other hand the latest release may still have some issues. You have to pick your poison!


----------



## macondo (Oct 4, 2021)

thanks, pal...


----------



## LexiboyBSD (Oct 4, 2021)

ldgc said:


> Hello
> I installed FreeBSD 11.4-Release on an old machine one week ago.
> I noticed that today this version reached EOL.
> It is my first time upgrading to a major version.
> ...


You are forgetting a *shutdown -r now* after the first instance of *freebsd-update install*.


----------



## SirDice (Oct 4, 2021)

LexiboyBSD said:


> You are forgetting a *shutdown -r now* after the first instance of *freebsd-update install*.


Not required, it's recommended but I've done hundreds of updates without that extra reboot without any issues.


----------



## sko (Oct 4, 2021)

And FTR:
If you are using zfs it is always a good idea to do a `beadm create beforeupgrade` and maybe even a `zfs snapshot -r zroot@before-upgrade` before any (major) upgrade to roll back if something goes wrong.
On important systems I usually install the system upgrades in a new BE running in a jail (the new bectl(8) even has a `bectl jail` option for that), and if this goes through without any errors I reboot into that BE and finish the upgrade (packages, jails...).

edit:
Before going from 11.4 up to 13.0 also check the availability of the packages you have installed! IIRC there was some fallout e.g. due to EOL of python 2.x and some packages that were available for the 11 (and 12) branch are still not available for 13.


----------



## mer (Oct 4, 2021)

I'll second what sko says:  if you are using ZFS, do the upgrade in a new boot environment.  There are a few tutorials around (I followed the one by vermaden that's linked a few times).  
Don't forget to pay attention to messages about boot blocks/boot code.  11 to 12 should be no need, but it's a good idea to keep that in mind.


----------



## ernie (May 27, 2022)

I just tried  freebsd-update -r 12.3-RELEASE upgrade
from 11.4-RELEASE-p13
Then pkg upgrade
It seemed to go though ok without error messages popping up.

But after the required restart, I discovered that bind9 and mod_php had both been uninstalled, there was no version of php on the machine at all after the upgrade.

I installed the mod_php81 and php81 packages which seemed to work.
Then I installed bind918 and that seemed to find my old config files and run.

I don't know if anything else has been uninstalled by the upgrade.

Is that kind of unrequested removal of packages normal, or did I miss a step?


----------



## SirDice (May 27, 2022)

ernie said:


> Is that kind of unrequested removal of packages normal


You blindly typed "y" without checking what `pkg upgrade` wants to do. Because it clearly shows packages that may need to be deleted (due to the default PHP changing to 8.0 for example).


----------



## grahamperrin@ (May 27, 2022)

At the time of the switch: 



			https://github.com/freebsd/freebsd-ports/blob/2e1fdc173831debc50f2c25b86e202c0a4967334/UPDATING#L8-L22
		


More generally (current): 



			https://github.com/freebsd/freebsd-ports/blob/main/UPDATING
		


The essence of the file has not changed since 2004: 









						freebsd-ports/UPDATING at 71495f4e8e74931dcb3875362487316ce2289c31 · freebsd/freebsd-ports
					

FreeBSD ports tree (read-only mirror). Contribute to freebsd/freebsd-ports development by creating an account on GitHub.




					github.com
				




– that was, around eight years before the `pkgng` mindset became a norm: 



			pkgng/CharterAndRoadMap - FreeBSD Wiki
		


*Documentation could be better*; for people's mindsets to include _both_ UPDATING files.


----------

