From owner-freebsd-questions@FreeBSD.ORG Tue Jan 4 05:01:12 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D960F16A4CE for ; Tue, 4 Jan 2005 05:01:12 +0000 (GMT) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15E9243D3F for ; Tue, 4 Jan 2005 05:01:12 +0000 (GMT) (envelope-from syncman@optusnet.com.au) Received: from [192.168.0.7] (c211-30-63-111.belrs1.nsw.optusnet.com.au [211.30.63.111]) (authenticated bits=0)j04512g2015776; Tue, 4 Jan 2005 16:01:08 +1100 Message-ID: <41DABE72.2000501@optusnet.com.au> Date: Tue, 04 Jan 2005 16:04:02 +0000 From: Andrew Sinclair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson , freebsd-questions@freebsd.org References: <41DA0AB8.3080400@centtech.com> In-Reply-To: <41DA0AB8.3080400@centtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: portupgrade system destruction? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2005 05:01:13 -0000 Moved to freebsd-questions by Andrew Sinclair. Eric Anderson wrote: > I have a few dedicated servers at a hosting company (about 3 hours > drive time away). On one of the systems I ran a 'portupgrade -arR' > this morning, and then disconnected (I ran it in a screen session). > About an hour later, I realized I could not log in anymore via ssh. > Seems that I can connect, but my passwords fail (permission denied). I > can't FTP in, or check mail with any username/password combos. Even my > preshared SSH keys do not work. When connecting via POP, I get this > message: > > Connected to hostname. > Escape character is '^]'. > /usr/libexec/ld-elf.so.1: Shared object "libc-client4.so.8" not found > Connection closed by foreign host. > > Can anyone help me figure out what may have gone wrong? And even how I > might be able to fix it remotely, or walk someone through a fix? > Portupgrade makes a mess at the best of times. A recursive portupgrade is not so clever about dependencies, particually on a live system. On occasion, it even seems to tamper with core libraries which is what would have occured in your case. With all due respect, you better have a disaster recovery plan. You said one of the systems. That's a good sign. Core library dependancies like libc are a bitch to deal with. My approach would be to reinstall a release on the existing system image, then restore the overwritten /etc files from a recent backup or an identical server. First, install the same release version on your PC. Build a custom kernel for the server (it's better to monitor the build locally). Tarball the files to be installed, send it to work and get one of the admins to do the following: 1. Burn your chosen release CD 2. Insert into affected servers slot-load and reboot, reinstalling everything (including sources) 2. Extract the kernel and LKM's tarball you uploaded to / 3. Restore /etc from backup. 4. Reboot and watch for errors on the console This should get you running again but you might have to fix some ports manually. The reason I didn't suggest restoring your complete OS from backup is because an older version may not like your ports. I think it saves time but it's your call.