From owner-freebsd-questions@FreeBSD.ORG Thu Jan 12 20:40:31 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 97DC416A41F for ; Thu, 12 Jan 2006 20:40:31 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDFCA43D45 for ; Thu, 12 Jan 2006 20:40:30 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by kane.otenet.gr (8.13.4/8.13.4/Debian-8) with SMTP id k0CKeA0s010610; Thu, 12 Jan 2006 22:40:10 +0200 Received: by flame.pc (Postfix, from userid 1001) id A286E11759; Thu, 12 Jan 2006 22:38:37 +0200 (EET) Date: Thu, 12 Jan 2006 22:38:37 +0200 From: Giorgos Keramidas To: fbsd_user Message-ID: <20060112203837.GA32499@flame.pc> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Garrett Cooper , freebsd-questions@freebsd.org Subject: Re: have bad stab causing boot error X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 20:40:31 -0000 On 2006-01-12 15:20, fbsd_user wrote: >On Jan 12, 2006, at 11:03 AM, fbsd_user wrote: >> fstab is bad and boot drops me into "manual root filesystems spec" >> >> I answer ufs:ad0s1a >> and get these messages >> "warning / was not properly dismounted" >> "warning R/W of / denied. filesystem is not clean run fcsk" >> >> when I enter fsck command nothing happens. >> What is procedure to follow here??? > > Once it asks you for your shell in single user mode, you either > choose it or just press enter for /bin/sh, and then you want to do > this: > # mount -o rw /dev/ad0s1a / #mount -a works nicely here too. > # /sbin/fsck /dev/ad0s1a Careful with the order of those commands. You are *NOT* allowed to fsck a filesystem that has been mounted as read-write. You also missed an invocation of adjkerntz, which is pretty much mandatory for getting the timestamps of files right. The correct thing to do, would be (comments in parentheses): # adjkerntz -i (adjust kernel time) # fsck -p (check all filesystems) # mount -u / (mount root fs as read-write) # mount -a (mount all other filesystems)