Naïvely, I ran freebsd-update -r 15.0-STABLE install in my regular FreeBSD desktop. That was a mistake.

In principle freebsd-update is the way to update the installed system. In principle it works really smoothly, from binary release to binary release: it has a good manpage which tells you you can go from release to release. My FreeBSD laptop (which also runs Fedora 42 as more of a daily-driver OS) was running 14.3, so:

  • freebsd-update -r 15.0-RELEASE upgrade Fetch all the things.
  • freebsd-update -r 15.0-RELEASE install Install the new stuff.
  • reboot Smooth sailing.

That is the naive and optimistic thing to do.

If you spotted “make sure you read the announcement and release notes” in the manpage, good for you.

After the reboot, I was dropped into a shell where nearly every command I typed in resulted in

ld-elf.so.1: Shared object "libsys.so.7" not found, required by "libc.so.7"

Good Bug Reports Help

Fortunately, Graham Perrin had already reported this with basically-the-same steps to get into trouble.

And based on that Matthew and Colin made a fix so that other people could first update their packages (e.g. pkg update on the system before using freebsd-update) to get the fixes in to the package-manager.

Good Workarounds, Also

In the same PR (Problem Report), Craig describes a workaround which almost worked for me. Because it’s a laptop, I needed a few extra steps. As an aside, /rescue is a directory where statically-linked rescue binaries live, which don’t suffer from shared-library misery.

  • /rescue/kldload if_ure Load the kernel driver for the USB-ethernet port.
  • /rescue/dhclient ue0 DHCP to get some network.

I have root-on-ZFS, and in single-user mode this comes up read-only, so switch read-only off. This is different from other (e.g. UFS, ext4) filesystems where mount -o rw,remount would be the thing to do:

  • /rescue/mount To check what the name is of the ZFS mounted on /
  • /rescue/zfs set readonly=off zroot/ROOT/default Make it read-write.

After that, basically Craig’s steps:

  • cd /tmp
  • /release/fetch https://download.freebsd.org/releases/amd64/15.0-BETA2/base.txz Fetch the installation tarball.
  • cd /
  • /release/tar xzf /tmp/base.txz lib/libsys.so.7 Extract the missing library.
  • freebsd-update install This one is the “normal” dynamically-linked one, which works now the missing library is there.

Post-Upgrade Mucking About

Since there wasn’t anything especially configured or complicated on this machine, I reinstalled the package-manager with a hammer and then upgraded all the packages:

  • pkg-static install pkg Reinstall with a known-good tool.
  • pkg update Fetch all the things.
  • pkg upgrade Install all the things.

Somehow I’ve also gotten myself stuck in a “graphics driver causes kernel panic”, state. Which kind of limits the graphics side of things this week. Amusingly AMD GPU stability is listed as a release feature, but #391 and #393 issues tell a slightly different story. I’m glad of bz@’s proposed fix, although I’ll need to rebuild the kernel to try it (which literally means make buildkernel installkernel on FreeBSD, it’s that simple).