Re: FreeBSD 12.2 can not be upgraded

From: Paul Mather <paul_at_gromit.dlib.vt.edu>
Date: Sun, 04 Sep 2022 20:31:20 UTC
On Sep 4, 2022, at 2:06 PM, Doug Denault <doug@safeport.com> wrote:


> On Sun, 4 Sep 2022, Dan Mahoney wrote:
> 
>> 
>>      On Sep 4, 2022, at 10:05, Doug Denault <doug@safeport.com> wrote:
>> There was a long thread on this. My observations and questions are more about how to
>> update production systems. My long standing update path is to update my FreeBSD
>> workstations. If that goes okay we some servers on out LAN that we update next.
>> I ran `freebsd-update -r 12.3-RELEASE upgrade` which converted my laptop essentially into
>> a paperweight by the introduction a bad copy of ld-elf.so.1. The system would boot, but
>> most useful commands (think cp) exited with an error. This is all documented via google
>> with no successful work arounds that I could fine. What you can not do is `freebsd-update
>> rollback`. I though I could maybe fix this by going to single user and overwriting
>> ld-elf.so.1. This can not be done as all commands depend on this file.
>> I created image files from:
>>  FreeBSD-12.3-RELEASE-amd64-dvd1.iso (4+GB)
>>  FreeBSD-12.3-RELEASE-amd64-memstick.img ~1GB
>> Neither of these images are self contained. Both install 12.3 correctly but by downloading
>> the OS from a mirror site of your choosing. Is there a path thought the dvd1 install that
>> does something with the extra 3GB of data? Does the dvd1.iso image have to be burned to a
>> DVD?
> 
> Still left with what's in the extra 3GB.


This is from the FreeBSD Handbook chapter on installing FreeBSD (https://docs.freebsd.org/en/books/handbook/bsdinstall/#bsdinstall-installation-media):

-dvd1.iso: This file contains all of the files needed to install FreeBSD, its source, and the Ports Collection. It also contains a set of popular binary packages for installing a window manager and some applications so that a complete system can be installed from media without requiring a connection to the Internet. This file should be burned to a DVD using a DVD burning application.


> With the ld-elf.so.1 /rescue/sh is useless because it depends on /libexec. You can easily recover your data from the hosed system by running an install image and chosing the third option, something like 'live system'. Then all you have to do is mount the hard drive. In my case I did not even have to remember the route and ifconfig commands (obviously an issue for me :) dhclient worked fine.


I don't understand your comment about /rescue/sh in the first sentence in the quoted paragraph above.  The binaries in /rescue are statically linked, so I don't see how they depend on /libexec.  In fact, ldd will even complain if you run it against /rescue/sh because it is not a dynamically-linked executable.  Furthermore, file(1) will include "statically linked" in its output when run against /rescue/sh.  (Disclaimer: I don't have any 12.x systems any more to double-check, but it is true for FreeBSD 13.1 and historically has been the case for as long as I know.  See man rescue(8) for details.)

Cheers,

Paul.