From owner-freebsd-fs@FreeBSD.ORG Thu Jul 29 01:19:29 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEDC816A4CE; Thu, 29 Jul 2004 01:19:29 +0000 (GMT) Received: from structbio.vanderbilt.edu (reef.structbio.Vanderbilt.Edu [160.129.138.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CFEE43D5A; Thu, 29 Jul 2004 01:19:29 +0000 (GMT) (envelope-from bandix@home.funnyvalentine.net) Received: from home.funnyvalentine.net (adsl-065-007-237-012.sip.bna.bellsouth.net [65.7.237.12]) i6T1JHRg028354 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 28 Jul 2004 20:19:18 -0500 Received: (from bandix@localhost) by home.funnyvalentine.net (8.12.10/8.12.10/Submit) id i6T1JBwj060096; Wed, 28 Jul 2004 20:19:11 -0500 (CDT) (envelope-from bandix) Date: Wed, 28 Jul 2004 20:19:11 -0500 From: "Brandon D. Valentine" To: David Kreil Message-ID: <20040729011911.GA59212@brandon.dvalentine.com> References: <200407290043.i6T0hTC26000@puffin.ebi.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200407290043.i6T0hTC26000@puffin.ebi.ac.uk> User-Agent: Mutt/1.5.6i cc: freebsd-fs@freebsd.org cc: freebsd-questions@freebsd.org Subject: Re: How to recover/reinitialize a trashed /var partition? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2004 01:19:30 -0000 On Thu, Jul 29, 2004 at 01:43:29AM +0100, David Kreil wrote: > I am writing in the hope that someone can give me a hint of how to either > recover or recreate a virgin FreeBSD /var partition in an otherwise > (apparently) functioning system. If you've still got /usr/obj around from your last buildworld you can boot to single user mode and installworld again. If not, you can use mtree(8) to recreate the hierarchy for /var. This should work: # mtree -deU -f /etc/mtree/BSD.var.dist -p /var You may have to touch/chown/chmod a few files here and there to make sure the appropriate users have permissions to write to/from them. See /usr/src/etc/Makefile for some more information on that. Unfortunately I don't think there is a 'var' target in any of those Makefiles. HTH, Brandon D. Valentine -- brandon@dvalentine.com http://www.geekpunk.net Pseudo-Random Googlism: brandon is gummmmy