From owner-freebsd-stable@FreeBSD.ORG Fri Sep 17 05:23:43 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 039EA106566C; Fri, 17 Sep 2010 05:23:43 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 7822E8FC16; Fri, 17 Sep 2010 05:23:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id o8H50GdW068830; Fri, 17 Sep 2010 15:00:16 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Fri, 17 Sep 2010 15:00:16 +1000 (EST) From: Ian Smith To: Ivan Voras In-Reply-To: Message-ID: <20100917143359.X73353@sola.nimnet.asn.au> References: <20100915153638.19173erppua441d2@webmail.uni-tuebingen.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-stable@freebsd.org Subject: Re: very stupid mistake: a part of /usr is deleted X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 05:23:43 -0000 On Wed, 15 Sep 2010, Ivan Voras wrote: [..] > That is actually an easy situation to recover, you can do it in at least > these ways: > > 1) if you build/upgrade from source, you can either reinstall if you have > working /usr/obj or try and rebuild them if you have working /usr/src > > 2) if you have another machine with the same FreeBSD version and > architecture, simply copy the missing files (with tar, scp, ftp, fetch/wget, > etc...) > > 3) if you have networking and at least working fetch / ftp / wget, cat and > tar, you can fetch the files at > ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.0-RELEASE/base/ and use > install.sh to reinstall the base binaries > > Remember that those files are not magical, you can restore them any way you > are able. You can even boot the live CD (from > ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/ISO-IMAGES/8.0/), mount the > appropriate file system and copy the files from the CD. 1) and 3) look good, but 2) - except tar - or cp'ing files from the CD won't preserve hard links, of which there are quite a few in /usr/bin, that install.sh takes care of: tar --unlink -xpzf - -C ${DESTDIR:-/} Apart from the few megs of extra space used, I wonder if that matters, especially regarding later updates that may replace some of those files? cheers, Ian