From owner-freebsd-questions@FreeBSD.ORG Wed Nov 1 17:56:16 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 BC33716A407 for ; Wed, 1 Nov 2006 17:56:16 +0000 (UTC) (envelope-from e.schuele@computer.org) Received: from rwcrmhc15.comcast.net (rwcrmhc15.comcast.net [204.127.192.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 784BE43D46 for ; Wed, 1 Nov 2006 17:56:16 +0000 (GMT) (envelope-from e.schuele@computer.org) Received: from [192.168.1.110] (www.gtisd.com?[208.206.151.6]) by comcast.net (rwcrmhc15) with SMTP id <20061101175615m1500b6em8e>; Wed, 1 Nov 2006 17:56:16 +0000 From: Eric Schuele To: freebsd@orchid.homeunix.org In-Reply-To: <4548D3DC.3060902@orchid.homeunix.org> References: <1162399232.4866.25.camel@ugly> <4548D3DC.3060902@orchid.homeunix.org> Content-Type: text/plain Date: Wed, 01 Nov 2006 11:56:14 -0600 Message-Id: <1162403774.4866.27.camel@ugly> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: /var corrupted..... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: e.schuele@computer.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2006 17:56:16 -0000 On Wed, 2006-11-01 at 18:05 +0100, Karol Kwiatkowski wrote: > On 01/11/2006 17:40, Eric Schuele wrote: > > Hello, > > > > [Running 6.2-PRERELEASE as of Oct 30th] > > > > My /var filesystem on my laptop died this morning. I had just > > installed/enabled gdm. I exited my wm and the machine spontaneously > > rebooted. Upon coming back up it said there was a bad superblock and to > > try the one at offset 32. It then said that one was bad. 'newfs -N' > > tells me the next alt-superblock is at 160. fsck says to run 'fsck -b > > '. However when you do that it says -b is an unknown > > option. So so googling leads me to fsck_ufs. Which then says there are > > more "softupdate inconsistencies" than I can say yes to. Plus some > > other issues. I suspect something is very wrong in what I'm doing... > > but I'm a trooper... so I forge ahead. :) I eventually end up doing a > > 'fsck_ufs -y' on it... and it bails out giving me something like > > "-73827348927342458734 BAD I=213423" many many times. So.... > > > > I may have totally destroyed my /var filesystem at this point. So my > > questions are: > > > > 1) If not... pointers on what to do next would be *greatly* appreciated. > > > > 2) If I have destroyed it what can I do at this point? I have no full > > backup of /var. I had nothing of any real importance on there. Some > > MySQL data... but I've got that. My package database comes to mind. > > but nothing of any personal value... just stuff to keep the OS on its > > feet. So... if its gone... is there anyway to create a functional /var > > filesystem that will allow me to "get back to work as usual"? Or is my > > only option a complete reinstall of everything? > > I'm not sure if option 1 is out of question (wait for other replies) > but to recreate /var directory tree you can use mtree(8) on newly > created partiton, something like: > > # /usr/sbin/mtree -du -p /var -f /etc/mtree/BSD.var.dist Ok... good tip thanks. That would definitely leave my db/pkg out of whack. I wonder if a 'portupgrade -af' would fix that up? I'll wait for others to weigh in as well on option 1 before going this way. Thanks. > > The downside of this (option 2) is you'll loose some important > information about your system, /var/db/pkg comes first to my mind. If > you don't have any backups try to recover anything you can first. Good > luck! > > > Thanks, > > Eric > > HTH, > > Karol >