From owner-freebsd-questions@FreeBSD.ORG Tue Mar 31 06:15:57 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6292106568A for ; Tue, 31 Mar 2009 06:15:57 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 8C7378FC08 for ; Tue, 31 Mar 2009 06:15:57 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from sarevok.dnr.servegame.org (gate.lan.rachie.is-a-geek.net [192.168.2.10]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id CB4F67E81A; Mon, 30 Mar 2009 22:15:55 -0800 (AKDT) From: Mel Flynn To: freebsd-questions@freebsd.org Date: Tue, 31 Mar 2009 08:15:54 +0200 User-Agent: KMail/1.11.0 (FreeBSD/8.0-CURRENT; KDE/4.2.0; i386; ; ) References: <49D1B297.8060307@gmail.com> In-Reply-To: <49D1B297.8060307@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903310815.54296.mel.flynn+fbsd.questions@mailing.thruhere.net> Cc: manish jain Subject: Re: Question about forcing fsck at boottime 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: Tue, 31 Mar 2009 06:15:58 -0000 On Tuesday 31 March 2009 08:05:11 manish jain wrote: > I am migrating from Linux and am still learning the basics of FreeBSD. > One thing that I would to carry over from my Linux days is to force an > fsck on all filesystems at system startup. On Linux, this was simply a > matter of editing /etc/rc.sysinit. Things seem a bit more complicated in > the BSD world. Can somebody please point me in the right direction ? fsck -p is done by default (meaning, filesystems are not fully scanned if they are marked clean). If pruning fails, background_fsck is checked, which will work on UFS systems with soft updates, but is not recommended by many as it may leave some errors unchecked. If background_fsck is set to NO, things will stop and operator intervention is required, unless one has set fsck_y_enable. All this logic is implemented in /etc/rc.d/fsck. The rc.conf(5) manpage and related rc(8), rcorder(8) and rc.subr(8) are a good read when migrating. -- Mel