Date: Wed, 28 Jul 2004 20:19:11 -0500 From: "Brandon D. Valentine" <brandon@dvalentine.com> To: David Kreil <kreil@ebi.ac.uk> Cc: freebsd-questions@freebsd.org Subject: Re: How to recover/reinitialize a trashed /var partition? Message-ID: <20040729011911.GA59212@brandon.dvalentine.com> In-Reply-To: <200407290043.i6T0hTC26000@puffin.ebi.ac.uk> References: <200407290043.i6T0hTC26000@puffin.ebi.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040729011911.GA59212>