Installation trashed after upgrade - how to reinstall

Hey fine people,

a couple of days ago I upgraded to 14.1-RELEASE from an older unsupported version and I didn't notice at the time but I somehow got into a situation where openssl is not finding all the libraries it needs and so neither of the update, package, etc tools work anymore because they can't verify the trust chain. Other libs are also missing so for example man doesn't work. Remote login doesn't work. You get the idea.

So here is my question:
Is there a reasonably easy way to reinstall the system without losing all the settings?

Best Roddi
 
"ldd /usr/bin/openssl" to see which shared lib is missing. You may be able to temporarily get by symlinking to an older version. Or may be able to extract it from one of the 14.1-RELEASE sets.
for example man doesn't work
man is a shell script but it calls less. So do "ldd /usr/bin/less" to find what is missing.
 
Sorry for the physical screenshots from my bad monitor. As mentioned in the original post I cannot ssh into the machine anymore.

Thanks
 

Attachments

  • IMG_9825.jpg
    IMG_9825.jpg
    542.6 KB · Views: 46
  • IMG_9824.jpg
    IMG_9824.jpg
    603.1 KB · Views: 77
  • IMG_9823.jpg
    IMG_9823.jpg
    1.6 MB · Views: 62
  • IMG_9822.jpg
    IMG_9822.jpg
    1.5 MB · Views: 54
  • IMG_9821.jpg
    IMG_9821.jpg
    949.4 KB · Views: 82
The 4th screenshot talks of 12 where I would have expected a 14. And latest where I have quarterly. My unmodified $ cat /etc/pkg/FreeBSD.conf mentions ${ABI}, but I don't know how that's resolved to 12 or 14.
 
The brutal way to fix this quickly is to just untar the tarballs of kernel and base over the installation, omitting /etc in the extract commandline.

Alternatively you could only extract /lib and /usr/lib and go from there.
 
What do you think about the option to recall an older zfs snapshot and try again? Sadly I forgot to make a snapshot before the upgrade.

Maybe freebsd-update should ask whether it should create a snapshot if it is about to do an upgrade on a zfs root volume.
 
What do you think about the option to recall an older zfs snapshot and try again? Sadly I forgot to make a snapshot before the upgrade.

Maybe freebsd-update should ask whether it should create a snapshot if it is about to do an upgrade on a zfs root volume.
freebsd-update typically creates a new boot environment when you do the install if it detects ZFS root. At least it's been that way in 13.x and 14.x (I think). Not sure if it did so in older versions; what version did you try the upgrade from?

Have you tried stopping in the loader and seeing what boot environments are available?
 
I think I upgraded from 11

More likely 12, according to the third fourth of your photographs.

1722784239323.pngFor an upgrade to 14.1-RELEASE:
  • 13.3-RELEASE is the lowest from which you may make the attempt without expecting an error.


1722784603386.pngWithout knowing the exact version from which you made the attempt:
  • for an upgrade from end of life 12.0-RELEASE, you can upgrade first to 12.1-RELEASE ?… and so on.
 
Is bectl usable?

… it says do a "freebsd-update fetch" first because there is nothing to install.

There's the --currently-running option of freebsd-update(8), although:
  • I have no experience with that option
  • if you begin with an assumption of 12.0-RELEASE for an upgrade to 12.1-RELEASE, I can't predict what states the system will be in until you go from 13.3-RELEASE to 14.1-RELEASE.
In any case: read all sets of release notes for 12.1 and beyond (not just the notes for 14.1).

… brutal … tarballs … omitting /etc in the extract commandline. …

pkgbase might be less brutal for a targeted fix. Still paying attention to /etc

FreeBSD-runtime is one of two vital packages, it includes things such as /usr/bin/less and /etc/master.passwd

Code:
root@fourteen-pkgbase:~ # pkg query -e '%o = base && %V = 1' '%o/%n'
base/FreeBSD-clibs
base/FreeBSD-runtime
root@fourteen-pkgbase:~ # freebsd-version -kru ; uname -mvKU
14.1-RELEASE-p2
14.1-RELEASE-p2
14.1-RELEASE-p2
FreeBSD 14.1-RELEASE-p2 releng/14.1-n267684-1eba659e2f68 GENERIC amd64 1401000 1401000
root@fourteen-pkgbase:~ #
 

Attachments

Hey, big Thanks to everybody!

I solved it by doing a "zfs rollback" of the boot drive. Very nervously to be honest. After that the system came back to life and I was able to slowly update it to an up-to-date affair of things:

zroot@zfSnap2024-07-12_09.05.00--14d 0B - 144K - zroot@pre-12.3 0B - 144K - zroot@post-12.3 0B - 144K - zroot@pre-12.4 0B - 144K - zroot@zfSnap2024-08-12_20.05.00--14d 0B - 144K - zroot@post-12.4 0B - 144K - zroot@pre-13.1 0B - 144K - zroot@post-13.1 0B - 144K - zroot@pre-13.3 0B - 144K - zroot@zfSnap2024-08-12_21.05.00--14d 0B - 144K - zroot@post-13.3 0B - 144K - zroot@pre-14.1-second-attempt 0B - 144K - …

This went kinda smoothly. So ZFS saved the day. To be honest ZFS was reason I changed to FreeBSD some 15 years ago. It finally paid off big time.

Thank You! In ZFS we trust!

Best Roddi
 
Back
Top