# When upgrading from 11.4 to 12.3



## hruodr (Mar 22, 2022)

After waiting hours, I get the following:


```
% freebsd-update -r 12.3-RELEASE upgrade
....
42010....42020....42030....42040....42050....42060....42070....42080....42090....42100....42110....42120....42130....42140....42150....42160....42170....42180....42190... done.
Applying patches... done.
Fetching 53552 files... gunzip: (stdin): unexpected end of file
6974668243b9fbc72f385349853a585ec196c793a11bdf30e28a3d22dcec6a0d has incorrect hash.
```

Any hint what to do?


----------



## SirDice (Mar 22, 2022)

Delete the file in /var/db/freebsd-update/files and run the upgrade again. It probably got corrupted during the download. Also check to make sure your filesystem isn't full.


----------



## Alain De Vos (Mar 22, 2022)

Or  you could try consecutive  upgrades.

```
freebsd-update -r 12.0-RELEASE upgrade
freebsd-update -r 12.1-RELEASE upgrade
freebsd-update -r 12.2-RELEASE upgrade
freebsd-update -r 12.3-RELEASE upgrade
```


----------



## hruodr (Mar 22, 2022)

SirDice said:


> Delete the file in /var/db/freebsd-update/files



There is no file

6974668243b9fbc72f385349853a585ec196c793a11bdf30e28a3d22dcec6a0d



> % ls /var/db/freebsd-update/files/*6974668*
> ls: No match.



I have a lot of disk space free.


----------



## hruodr (Mar 22, 2022)

Alain De Vos said:


> Or you could try consecutive upgrades.


That would take days. Better would be to reinstall.


----------



## SirDice (Mar 22, 2022)

Alain De Vos said:


> Or you could try consecutive upgrades.


Don't! https://forums.freebsd.org/threads/...fter-upgrade-from-11-4-to-12-0-release.81121/


----------



## hruodr (Mar 22, 2022)

I run it again, now it is fetching only 31799 files, 20000 less than before.

Terrible!

Would not be better two or three compressed tarballs?!


----------



## SirDice (Mar 22, 2022)

If you want to start "fresh" then delete everything in /var/db/freebsd-update (don't remove the directory itself, only its content). But then it's going to have to download everything again.


----------



## hruodr (Mar 22, 2022)

SirDice said:


> If you want to start "fresh" ...


No, I do not want that. 

It seems it deleted the file with bad hash. I just gave the command again.

But I think, the upgrade could be faster. ...


----------



## SirDice (Mar 22, 2022)

hruodr said:


> But I think, the upgrade could be faster. ...


Yeah, it's not the fastest process in the world. Even if you have a decent internet connection like mine (600Mbit/s) it's still quite slow. If you have multiple machines you need to upgrade it helps if you can set up a caching proxy. Then only the first update would be slow (it downloads the patches from upstream) but the next machine should be a lot faster (it gets the updates from the proxy's cache).


----------



## hruodr (Mar 22, 2022)

I want my own configuration files (/etc), how to skip the merge process when upgrading?

I do not understand its notation ("<<current version" and such).

It is terrible that one is forced to do that work in the context of upgrading
and not in calm.


----------



## hruodr (Mar 22, 2022)

After `freebsd-update -r 12.3-RELEASE upgrade`, I get



> % freebsd-update install
> No updates are available to install.



What is happening?


----------



## Alain De Vos (Mar 22, 2022)

There are two alternative ways of upgrading.
One is make buildkernel & make buildworld in background.

A second way is
backup of /etc and /usr/local/etc
chflags -R noschg /
And untar the files base.txz and kernel.txz downloaded from :


			Index of /pub/FreeBSD/releases/amd64/12.3-RELEASE/
		

And restore your /etc configuration as needed.


----------



## hruodr (Mar 22, 2022)

Alain De Vos said:


> And untar the files base.txz and kernel.txz downloaded from


This means files are only added, not deleted.
No inconsistencies created?
If it is so simple, why these update commands?


----------



## SirDice (Mar 22, 2022)

hruodr said:


> It is terrible that one is forced to do that work in the context of upgrading
> and not in calm.


Ehm, you are doing this in calm. The `freebsd-update -r .... upgrade` process doesn't change anything yet. The actual changes will be made during the `freebsd-update install` phases.


----------



## SirDice (Mar 22, 2022)

hruodr said:


> No inconsistencies created?


Lots of them. Don't use that method, it's fine to use to bring up a completely hosed and broken system, it's not good for upgrading.


----------



## hruodr (Mar 22, 2022)

SirDice said:


> Ehm, you are doing this in calm.


It seems, the install did not work, because I answered somewhere, that it is not reasonable what it wrote.

No I am running the command that takes so much time for third time.

You are offered to change things, but not to leave them as they are, or to correct what one changes.

I do not like this upgrade procedure.


----------



## Alain De Vos (Mar 22, 2022)

I wonder if you can configure a faster freebsd-update mirror ?
But i'm not the only one finding the default sometimes low on bandwith.


----------



## SirDice (Mar 22, 2022)

hruodr said:


> I do not like this upgrade procedure.


Then build it from source. See how you like etcupdate(8), and yes, you're still going to need to merge files, that's part of the upgrade process.

There are only two officially supported ways of updating, building from source or freebsd-update(8).


----------



## hruodr (Mar 22, 2022)

SirDice said:


> Then build it from source.


The kernel compiles reasonable time, but probably the rest is too much for my slow computer.


----------



## Alain De Vos (Mar 22, 2022)

hruodr said:


> This means files are only added, not deleted.
> No inconsistencies created?
> If it is so simple, why these update commands?


Restoring /etc can be tricky when you do it manually the first time. But it's not too complicated. Thats why SirDice mentions the use of etcupdate to simplify.


----------



## Alain De Vos (Mar 22, 2022)

hruodr said:


> The kernel compiles reasonable time, but probably the rest is too much for my slow computer.


You can build kernel and world on a faster computer then tar /usr/src and /usr/obj from the faster computer and copy it to the older computer.
Then you just untar these directories on the slower computer and run make installworld & make installkernel.


----------



## hruodr (Mar 22, 2022)

I am back!!!!

But now:



> # uname -a
> FreeBSD fbsd.local 12.3-RELEASE-p3 FreeBSD 12.3-RELEASE-p3 GENERIC  amd64



The first negative impression: blurr and awfull fonts in the console.

Is there a way to get the old fonts back in the console?!

I wonder how spread tastelessness is, when it comes to fonts.

It took hours to upgrade the system and the packages, almost a whole day.
And now I must recompile a lot of programs. Perhaps reinstalling is better.
I got the message:



> Completing this upgrade requires removing old shared object files.
> Please rebuild all installed 3rd party software (e.g., programs
> installed from the ports tree) and then run "/usr/sbin/freebsd-update install"
> again to finish installing updates.



But how to delete old shared objects?

The last `freebsd-update install`, after `pkg-static upgrade -f`
took also a lot of time and ended in something like an error:



> % freebsd-update install
> Creating snapshot of existing boot environment... done.
> Installing updates...rmdir: ///var/db/etcupdate/current/usr/share/openssl/man/en.ISO8859-1: Directory not empty
> rmdir: ///var/db/etcupdate/current/usr/share/openssl/man: Directory not empty
> ...


----------



## diizzy (Mar 22, 2022)

While it shouldn't matter you might want to consecutive in terms of chronological order, in this case that would be 12.2 and then 12.3 .


----------



## grahamperrin@ (Mar 24, 2022)

hruodr said:


> … how to delete old shared objects? …



If you built and installed from source, is this what you want? 


```
root@mowa219-gjp4-8570p-freebsd:~ # cd /usr/src
root@mowa219-gjp4-8570p-freebsd:/usr/src # make -DBATCH_DELETE_OLD_FILES delete-old
>>> Removing old files (only deletes safe to delete libs)
>>> Old files removed
>>> Removing old directories
>>> Old directories removed
To remove old libraries run 'make delete-old-libs'.
root@mowa219-gjp4-8570p-freebsd:/usr/src #
```

Also, you might like to boot in single user mode and check the file system.


----------

