Broken Upgrade from 13.0-RELEASE to 13.1-RELEASE

I recently upgraded my server from FreeBSD 13.0 RELEASE to 13.1 RELEASE. I followed the instructions in the handbook, but I'm having issues, especially with iocage. When I attempt to run iocage, I get this error:

Code:
# iocage
ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.9.so.1.0 not found

I've done some digging in this forum and elsewhere and came across some similar issues. I've included the links at the end of this post for reference.

One of the solutions I tried was this:
Code:
rm -r /var/db/freebsd-update/* && freebsd-update fetch install

It did not resolve the issue.

This is my current system:
Code:
# freebsd-version
13.1-RELEASE-p5

I am not running a custom kernel and am using pkg to manage 3rd party packages.

Is there any solution that doesn't involve starting from scratch?

Thank you.

Reference Links:
 
ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.9.so.1.0 not found
My /lib/libc.so.7 on 13.1 does have this version, so it just seems your upgrade is incomplete? What does readelf -V /lib/libc.so.7 | grep FBSD_1.7 show?
 
My /lib/libc.so.7 on 13.1 does have this version, so it just seems your upgrade is incomplete? What does readelf -V /lib/libc.so.7 | grep FBSD_1.7 show?
Code:
# readelf -V /lib/libc.so.7 | grep FBSD_1.7

returns nothing.
 
For some reason your /lib/libc.so.7 hasn't been updated. It has the wrong date/time stamp and the wrong size.

Code:
% ll /lib/libc.so.7
-r--r--r--  1 root  wheel  1955744 May 22  2022 /lib/libc.so.7

Here's what I think happened. You ran freebsd-update -r 13.1-RELEASE upgrade, then freebsd-update install and rebooted. Then you 'forgot' to run the second freebsd-update install. After that you ran freebsd-update fetch install which replaced your /bin/freebsd-version with the 13.1-RELEASE-p5 version.

So, you ended up with a 13.1 kernel, a 13.0 userland and a freebsd-version(1) from 13.1-RELEASE-p5.

How do we fix this? I guess the only thing you can do is to run freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade to start the upgrade process again and then make sure to run freebsd-update install twice.

Also note that jails will not be updated, you have to do those separately. Check the iocage documentation on how to do this.
 
I added the instructions to my previous post. You can start the upgrade process again, that's probably the easiest way to fix it.
 
For some reason your /lib/libc.so.7 hasn't been updated. It has the wrong date/time stamp and the wrong size.

Code:
% ll /lib/libc.so.7
-r--r--r--  1 root  wheel  1955744 May 22  2022 /lib/libc.so.7

Here's what I think happened. You ran freebsd-update -r 13.1-RELEASE upgrade, then freebsd-update install and rebooted. Then you 'forgot' to run the second freebsd-update install. After that you ran freebsd-update fetch install which replaced your /bin/freebsd-version with the 13.1-RELEASE-p5 version.

So, you ended up with a 13.1 kernel, a 13.0 userland and a freebsd-version(1) from 13.1-RELEASE-p5.

How do we fix this? I guess the only thing you can do is to run freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade to start the upgrade process again and then make sure to run freebsd-update install twice.

Also note that jails will not be updated, you have to do those separately. Check the iocage documentation on how to do this.
I did the following:
  1. freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade
  2. freebsd-update install
  3. Rebooted
  4. freebsd-update install
However, the second freebsd-update install, gave me this error:
Code:
# freebsd-update install
No updates are available to install.
 
An easy solution is the following.
Backup your /etc directory
Get base.txz & kernel.txz from the ftp site & untar them in the / directory.
Fix /etc manual with your backup.
 
However, the second freebsd-update install, gave me this error:
Code:
# freebsd-update install
No updates are available to install.
That's not an error but it's also not what is supposed to happen. The second install run should install the userland, including /lib/libc.so.7. The first install run only upgrades the kernel. What does ls -ltr /var/db/freebsd-update/ show? That's where things are being stored during the upgrade/update process. Maybe something's wrong or different in your setup?

Anyway, I think you should have one more go. But do NOT reboot after the first freebsd-update install, just run the second freebsd-update install directly after it. Then do the reboot.
 
That's not an error but it's also not what is supposed to happen. The second install run should install the userland, including /lib/libc.so.7. The first install run only upgrades the kernel. What does ls -ltr /var/db/freebsd-update/ show? That's where things are being stored during the upgrade/update process. Maybe something's wrong or different in your setup?

Anyway, I think you should have one more go. But do NOT reboot after the first freebsd-update install, just run the second freebsd-update install directly after it. Then do the reboot.
I'll run the two freebsd-update install back to back and reply back. In the mean time, here's the output of ls -ltr /var/db/freebsd-update/.

Code:
# ls -ltr /var/db/freebsd-update/
total 12105
-rw-r--r--  1 root  wheel    800 Nov 29 18:15 pub.ssl
-rw-r--r--  1 root  wheel     50 Jan  3 11:41 serverlist_full
-rw-r--r--  1 root  wheel     50 Jan  3 11:41 serverlist
-rw-r--r--  1 root  wheel     25 Jan  3 11:41 serverlist_tried
-rw-r--r--  1 root  wheel    112 Jan  3 11:43 tag
-rw-r--r--  1 root  wheel    225 Jan  3 11:43 tINDEX.present
drwxr-xr-x  2 root  wheel  40708 Jan  3 12:14 files
lrwxr-xr-x  1 root  wheel     14 Jan  3 12:14 f465c3739385890c221dff1a05e578c6cae0d0430e46996d319db7439f884336-rollback -> install.jnbnGv
drwx------  2 root  wheel      4 Jan  3 12:21 install.jnbnGv
 
That's not an error but it's also not what is supposed to happen. The second install run should install the userland, including /lib/libc.so.7. The first install run only upgrades the kernel. What does ls -ltr /var/db/freebsd-update/ show? That's where things are being stored during the upgrade/update process. Maybe something's wrong or different in your setup?

Anyway, I think you should have one more go. But do NOT reboot after the first freebsd-update install, just run the second freebsd-update install directly after it. Then do the reboot.
Redoing the upgrade and install doesn't seem to work. The process I used was:
  1. freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade
  2. freebsd-update install
  3. freebsd-update install

Code:
# freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 13.0-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.

# freebsd-update install
Creating snapshot of existing boot environment... done.
Installing updates...Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
Scanning //usr/local/share/certs for certificates...
 done.

# freebsd-update install
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
 
Ports and packages that need different libraries can be made to use more recent libraries using libmap.conf and service ldconfig restart. But, be aware that newer libraries may not be 100% compatible and a port/package rebuild is always a better solution. Try remapping the library in libmap.conf first. If it works, great! If not, rebuild the port.
 
That's not going to solve the issue though, the OP appears to be stuck with an older /lib/libc.so.7 and the freebsd-update(8) process seems to not work correctly. While you could certainly map libraries that won't change the fact he's stuck with an old libc which doesn't seem to want to be upgraded.

Alright, one final time, then I'm completely lost. Nuke the entire contents of /var/db/freebsd-update/, there might be something wrong with any of the files in there. Then do the upgrade dance once more.

Check if /etc/freebsd-update.conf has this:
Code:
# Components of the base system which should be kept updated.
Components src world kernel

rm -rf /var/db/freebsd-update/*
freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade
freebsd-update install (Don't reboot even though it tells you to)
freebsd-update install
 
That's not going to solve the issue though, the OP appears to be stuck with an older /lib/libc.so.7 and the freebsd-update(8) process seems to not work correctly. While you could certainly map libraries that won't change the fact he's stuck with an old libc which doesn't seem to want to be upgraded.

Alright, one final time, then I'm completely lost. Nuke the entire contents of /var/db/freebsd-update/, there might be something wrong with any of the files in there. Then do the upgrade dance once more.

Check if /etc/freebsd-update.conf has this:
Code:
# Components of the base system which should be kept updated.
Components src world kernel

rm -rf /var/db/freebsd-update/*
freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade
freebsd-update install (Don't reboot even though it tells you to)
freebsd-update install
My /etc/freebsd-update.conf does have:
Code:
# Components of the base system which should be kept updated.
Components src world kernel

After performing the following steps:
  1. rm -rf /var/db/freebsd-update/*
  2. freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade
  3. freebsd-update install (did not reboot)
  4. freebsd-update install
This is what the process returned:
Code:
# rm -rf /var/db/freebsd-update/*
# freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching public key from update1.freebsd.org... done.
Fetching metadata signature for 13.0-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic kernel/generic-dbg src/src world/base world/lib32

The following components of FreeBSD do not seem to be installed:
world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)? y

Fetching metadata signature for 13.1-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.
Fetching files from 13.0-RELEASE for merging... done.
Preparing to download files... done.
Fetching 3 files... . done.
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
Attempting to automatically merge changes in files... done.

The following file could not be merged automatically: /etc/ssh/ssh_config
Press Enter to edit this file in vi and resolve the conflicts
manually...


The following file could not be merged automatically: /etc/ssh/sshd_config
Press Enter to edit this file in vi and resolve the conflicts
manually...


The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/defaults/devfs.rules

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/defaults/periodic.conf
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/defaults/rc.conf
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/devd.conf
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/devd/iwmbtfw.conf
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/freebsd-update.conf
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/mtree/BSD.debug.dist
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/mtree/BSD.include.dist
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/mtree/BSD.root.dist
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/mtree/BSD.tests.dist
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/mtree/BSD.usr.dist
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/network.subr
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/ntp/leap-seconds
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/auditd
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/ctld
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/devmatch
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/growfs
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/gssd
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/hostapd
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/ipfw
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/jail
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/linux
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/mountd
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/nfsd
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/ntpd
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/os-release

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/pf
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/rctl
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/securelevel
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/sysctl_lastload
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/tlsclntd
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/tlsservd
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/wpa_supplicant
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/zfs
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/rc.d/zfskeys
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/regdomain.xml
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/security/audit_event
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/ssh/moduli
Does this look reasonable (y/n)? y

The following changes, which occurred between FreeBSD 13.0-RELEASE and
FreeBSD 13.1-RELEASE have been merged into /etc/ssh/ssh_config:
--- current version
+++ new version
@@ -47,12 +47,16 @@
 #   UserKnownHostsFile ~/.ssh/known_hosts.d/%k
 #   VerifyHostKeyDNS yes
 <<<<<<< current version
 <<<<<<< current version
 <<<<<<< current version
+<<<<<<< current version
 #   VersionAddendum FreeBSD-20200214
 LogLevel Verbose
+=======
+#   VersionAddendum FreeBSD-20211221
+>>>>>>> 13.1-RELEASE
 =======
 #   VersionAddendum FreeBSD-20211221
 >>>>>>> 13.1-RELEASE
 =======
 #   VersionAddendum FreeBSD-20211221
Does this look reasonable (y/n)? y

The following changes, which occurred between FreeBSD 13.0-RELEASE and
FreeBSD 13.1-RELEASE have been merged into /etc/ssh/sshd_config:
--- current version
+++ new version
@@ -64,11 +64,15 @@
 #PermitEmptyPasswords no

 # Change to no to disable PAM authentication
 <<<<<<< current version
 <<<<<<< current version
+<<<<<<< current version
 ChallengeResponseAuthentication no
+=======
+#KbdInteractiveAuthentication yes
+>>>>>>> 13.1-RELEASE
 =======
 #KbdInteractiveAuthentication yes
 >>>>>>> 13.1-RELEASE
 =======
 #KbdInteractiveAuthentication yes
Does this look reasonable (y/n)? y

The following file will be removed, as it no longer exists in
FreeBSD 13.1-RELEASE: /etc/ttys
Does this look reasonable (y/n)? y
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".

# freebsd-update install
Creating snapshot of existing boot environment... done.
Installing updates...Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
Scanning //usr/local/share/certs for certificates...
 done.

# freebsd-update install
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
#

While the freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade was running, I was prompted with this:
Code:
The following files will be updated as part of updating to
13.1-RELEASE-p5:
/etc/group
/etc/ssh/ssh_config
/etc/ssh/sshd_config
/usr/share/man/man3/efi_variables_supported.3.gz
/usr/share/man/man9/osd_free_reserved.9.gz
/usr/share/man/man9/osd_reserve.9.gz
/usr/share/man/man9/osd_set_reserved.9.gz
 
Right, you're supposed to edit those files and solve the merge issues. Not ignore them. I suggest doing a clean reinstall.
 
Right, you're supposed to edit those files and solve the merge issues. Not ignore them. I suggest doing a clean reinstall.
The only one it prompted me to edit were the SSH config files. I only had one change in the SSH config and even after reverting it to the default config, I still had upgrade issues. Beesides /etc/rc.conf and /etc/pf.conf, most of the other configuration files are just the defaults.

At this point I'll just do a reinstall.
 
Back
Top