From owner-freebsd-questions@FreeBSD.ORG Thu Jan 26 20:11: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 2593616A420 for ; Thu, 26 Jan 2006 20:11:31 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.187.76.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 720AD43D45 for ; Thu, 26 Jan 2006 20:11:29 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from [IPv6:::1] (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.13.4/8.13.4) with ESMTP id k0QKBHxD097921; Thu, 26 Jan 2006 20:11:17 GMT (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <43D92CDF.7000502@infracaninophile.co.uk> Date: Thu, 26 Jan 2006 20:11:11 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 1.5 (X11/20060113) MIME-Version: 1.0 To: manish jain References: <20060126193954.27987.qmail@web34013.mail.mud.yahoo.com> In-Reply-To: <20060126193954.27987.qmail@web34013.mail.mud.yahoo.com> X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig80B9FE5FAC750A7B98F1D657" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (smtp.infracaninophile.co.uk [IPv6:::1]); Thu, 26 Jan 2006 20:11:17 +0000 (GMT) X-Virus-Scanned: ClamAV 0.88/1252/Thu Jan 26 11:03:25 2006 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: Problem with fsck 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, 26 Jan 2006 20:11:31 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig80B9FE5FAC750A7B98F1D657 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable manish jain wrote: > I recently persuaded my organisation to shift our main > server from Linux to FreeBSD 6.0. We are now facing a > problem with fsck. After improper shutdown, we need > fsck to run automatically and non-interactively in the > foreground upon restart. Enabling background fsck lets > the system come up but fails to properly start a few > network services. With background fsck disabled, what > would be the best way to automatically run 'fsck -fy' > for each of the partitions upon restart after an > improper shutdown ? Would it be okay to add the > corresponding fsck lines somewhere at the top of > /etc/rc ? Simply put: background_fsck=3D"NO" into /etc/rc.conf. That will cause the box to run 'fsck -p' in the foreground on each reboot. Alternatively, if this is a one-off, just hit '4' on the boot-up menu screen, boot into single user mode and run fsck manually. First, run 'fsck -p' to automatically repair any filesystems marked as unclean when shutdown. If fsck flails and requests human interaction then run fsck /dev/adXsYz adjusting X, Y and z to suit your local partitioning, and changing ad to whatever is appropriate if you aren't running on bog-standard IDE or SATA drives. Note that it can be quite dangerous to run 'fsck -y' blindly: that gives fsck permission to destroy otherwise recoverable data if it needs to in order to get the filesystem back into shape. =20 Once fsck shows all your partitions as clean, just hit ^D to let the system come the rest of the way up. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig80B9FE5FAC750A7B98F1D657 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD2Szl8Mjk52CukIwRAzIfAJ927wH7PLtWHwW55DabJOfWxeF8eACfXLUf W2S0+eUSDfxT/ieXbaBcxZQ= =eX8Q -----END PGP SIGNATURE----- --------------enig80B9FE5FAC750A7B98F1D657--