From nobody Tue Sep 6 22:14:45 2022 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MMfnh1Fclz4bpQv for ; Tue, 6 Sep 2022 22:14:48 +0000 (UTC) (envelope-from doug@safeport.com) Received: from fledge.watson.org (fledge.watson.org [147.160.157.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "A1-48603", Issuer "A1-48603" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MMfng34w6z3ys6 for ; Tue, 6 Sep 2022 22:14:47 +0000 (UTC) (envelope-from doug@safeport.com) Received: from fledge.watson.org (doug@localhost [127.0.0.1]) by fledge.watson.org (8.16.1/8.16.1) with ESMTPS id 286MEkY8022330 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 6 Sep 2022 22:14:46 GMT (envelope-from doug@safeport.com) Received: from localhost (doug@localhost) by fledge.watson.org (8.16.1/8.16.1/Submit) with ESMTP id 286MEjvb022327; Tue, 6 Sep 2022 22:14:45 GMT (envelope-from doug@safeport.com) X-Authentication-Warning: fledge.watson.org: doug owned process doing -bs Date: Tue, 6 Sep 2022 22:14:45 +0000 (UTC) From: doug Reply-To: doug@safeport.com To: David Christensen cc: questions@freebsd.org Subject: Re: FreeBSD 12.2 can not be upgraded In-Reply-To: Message-ID: References: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 4MMfng34w6z3ys6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=fail (mx1.freebsd.org: domain of doug@safeport.com does not designate 147.160.157.40 as permitted sender) smtp.mailfrom=doug@safeport.com X-Spamd-Result: default: False [-2.10 / 15.00]; R_SPF_FAIL(1.00)[-all]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; HAS_REPLYTO(0.00)[doug@safeport.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6405, ipnet:147.160.157.0/24, country:US]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[safeport.com]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; HAS_XAW(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Sun, 4 Sep 2022, David Christensen wrote: > On 9/4/22 13:31, Paul Mather wrote: >> 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.) > > Here is what one of my 12.3-R systems has to say about /rescue/sh: > > 2022-09-04 22:08:51 dpchrist@f3 ~ > $ freebsd-version ; uname -a > 12.3-RELEASE-p6 > FreeBSD f3.tracy.holgerdanske.com 12.3-RELEASE-p6 FreeBSD 12.3-RELEASE-p6 > GENERIC amd64 > > 2022-09-04 22:09:02 dpchrist@f3 ~ > $ ldd /rescue/sh > ldd: /rescue/sh: not a dynamic ELF executable > > 2022-09-04 22:09:04 dpchrist@f3 ~ > $ file /rescue/sh > /rescue/sh: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), > statically linked, for FreeBSD 12.3, FreeBSD-style, stripped I'm not a C guy and took the internals course a few decades ago so basically no internals knowledge here. I can only report what I experienced. The update 12.2-->12.3 introduced a copy of ld-elf.so.1 that produced various errors. In this state there was a set of commands that would not run. As this is a workstation I hit this a lot in the 9-11 versions of the system when trying to update xfce, firefox or installing something like libreoffice. With the missing ".so" files in /usr/local I was able to get by the error [sometimes] by replacing the offending module. With ld-elf.so.1 it is protected by being read-only and with the immutable bit set. So I went to single user mode and tried to update it. Basically a no-go until I deleted it. Then nothing worked so I rebooted to single user mode and tried to use /rescue/sh. That version was not [apparently] statically linked. At any rate I got the same class of error. At this point I had a rather expensive paper weight. Fairly easy to solve, boot from an iso or img file, use livefs to save my data, and start a fresh. I understand all my actions after the freebsd-update error were futile and perhaps ill-advised, but what did I have to lose?