From owner-freebsd-questions@FreeBSD.ORG Sun Jul 15 19:48:33 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32E5D1065672 for ; Sun, 15 Jul 2012 19:48:33 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id E52BE8FC0C for ; Sun, 15 Jul 2012 19:48:32 +0000 (UTC) Received: from r56.edvax.de (port-92-195-22-218.dynamic.qsc.de [92.195.22.218]) by mx01.qsc.de (Postfix) with ESMTP id 1016B3CA61; Sun, 15 Jul 2012 21:48:24 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q6FJmNwM002580; Sun, 15 Jul 2012 21:48:23 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 15 Jul 2012 21:48:23 +0200 From: Polytropon To: "Ronald F. Guilmette" Message-Id: <20120715214823.679eb23d.freebsd@edvax.de> In-Reply-To: <64329.1342378317@tristatelogic.com> References: <64329.1342378317@tristatelogic.com> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: fsck on FAT32 filesystem? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 19:48:33 -0000 On Sun, 15 Jul 2012 11:51:57 -0700, Ronald F. Guilmette wrote: > > In message > , Adam Vande More wrote: > > >On Sun, Jul 15, 2012 at 2:23 AM, Ronald F. Guilmette > >wrote: > >> > >> Is there any such a tool (as fsck for FAT32) available for freeBSD? If so, > >> where would I find it? > >> > > > >/sbin/fsck_msdosfs > > > Thank you. That sure sounds like it ought to do the trick. It will do its job: Check the file system's integrity. >From that point, you will either have the answer that everything is okay, or you have to go into the direction of recovery. In that case, different tools need to be used. For example, make an 1:1 copy using dd (or ddrescue or dd_rescue) of the disk. Work with a copy of that copy. Do not alter the disk. Then use tools that do the job of recovery (see my list postings about that topic, they contain a good list of tools you can use on UNIX). The suggestion of SpinRite is also good, even though the program is expensive. I'm confident it's worth its money. But if you are willing to _learn_ (which means to read and to experiment), the free recovery tools available through the Ports Collection are really good. Example: I had to recover data from a USB stick that "Windows" had "repaired", so no files could be read anymore. Getting a copy of the stick required a long time (because it was already damaged), but with the help of the free programs, I could recover _all_ files from the stick, and hand them over to a happy customer. But as I said, it may be possible that you don't have to walk the rugged streets of data recovery. :-) Suggestion: First use fsck_msdosfs without any parameters so it will ONLY CHECK the disk without altering anything (also see "man fsck" for -n, -v and maybe -d). Addendum: For dealing with non-standard file systems (such as FAT/msdosfs), the use of the _native tools_ seems to be the best solution in most times. In exceptions, it makes things worse. Still in most situations it just does the right thing. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...