From nobody Sun Sep 4 18:06:39 2022 X-Original-To: freebsd-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 4MLKNK6tcMz4cMKP for ; Sun, 4 Sep 2022 18:06:41 +0000 (UTC) (envelope-from doug@safeport.com) Received: from ogunquit.safeport.com (ogunquit.safeport.com [147.160.157.18]) by mx1.freebsd.org (Postfix) with ESMTP id 4MLKNJ5PZlz45RP for ; Sun, 4 Sep 2022 18:06:40 +0000 (UTC) (envelope-from doug@safeport.com) Received: from bucksport.safeport.com (bucksport.safeport.com [147.160.157.15]) by ogunquit.safeport.com (Postfix) with ESMTP id 16B42BE6C; Sun, 4 Sep 2022 14:06:40 -0400 (EDT) Date: Sun, 4 Sep 2022 14:06:39 -0400 (EDT) From: Doug Denault To: Dan Mahoney cc: "freebsd-questions@freebsd.org" Subject: Re: FreeBSD 12.2 can not be upgraded In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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: MULTIPART/MIXED; BOUNDARY="0-690367718-1662314800=:67914" X-Rspamd-Queue-Id: 4MLKNJ5PZlz45RP X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of doug@safeport.com designates 147.160.157.18 as permitted sender) smtp.mailfrom=doug@safeport.com X-Spamd-Result: default: False [-2.19 / 15.00]; CTYPE_MIXED_BOGUS(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.992]; R_SPF_ALLOW(-0.20)[+ip4:147.160.157.18]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; MIME_TRACE(0.00)[0:+,1:+]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@FreeBSD.ORG]; R_DKIM_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:6405, ipnet:147.160.157.0/24, country:US]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[safeport.com]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-690367718-1662314800=:67914 Content-Type: TEXT/PLAIN; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT On Sun, 4 Sep 2022, Dan Mahoney wrote: > > > On Sep 4, 2022, at 10:05, Doug Denault 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. > dvd1 includes a bunch of extra local packages, it's otherwise identical to cd1. > > You should have a bunch of static binaries in /rescue which include cp. > > I've been bitten by this several times in the past (on machines in faraway countries, where my > only access was a serial console), where all of a sudden midway through a freebsd update install > I'll just see a bunch of segfaults, and I'm still not sure what's happening to cause it, but my > solution has been to *before I update* grab a spare tar file for base.txz for my target OS, just > in case. > > My am not sure what is the philosophy of deleting the supporting files so quickly. > Other than making a system from backup is there a way to install an older version? > > > Yes.  Grab the base.txz files from ftp.freebsd.org or ftp-archive.freebsd.org, or from your boot > cdrom.  Untar them over /, and you should have a working linker back.  I would not call that "a > production system" but it should be stable enough to let your system attempt to redo the > upgrade. > > Yes, freebsd-update is bad at recovering from this failure mode.  The rollback function really > is only good for rolling back patchlevels, not major upgrades.  Nor does it have a "wait, you're > a shell script, please just use the static files in /rescue, and re-attempt the install" > function. Thanks, good idea. That works going forward but so far I have not found a 12.1 or 12.2 system that I want for testing > FreeBSD really should have "ftp" or "fetch" or "scp" or  something in /rescue, but there is at > least nc, which you can use to get a file on to the box, albeit slowly. Thanks Dan. 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. Doug _____ Douglas Denault http://www.safeport.com doug@safeport.com Voice: 301-217-9220 Fax: 301-217-9277 --0-690367718-1662314800=:67914--