From owner-freebsd-current@FreeBSD.ORG Sat Apr 17 18:24:21 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3878C16A4CE for ; Sat, 17 Apr 2004 18:24:21 -0700 (PDT) Received: from cmsrelay03.mx.net (cmsrelay03.mx.net [165.212.11.112]) by mx1.FreeBSD.org (Postfix) with SMTP id CC18D43D58 for ; Sat, 17 Apr 2004 18:24:20 -0700 (PDT) (envelope-from noackjr@alumni.rice.edu) Received: from cmsapps02.cms.usa.net (165.212.11.138) by cmsoutbound.mx.net with SMTP; 18 Apr 2004 01:24:20 -0000 Received: from optimator.noacks.org [66.136.22.94] by cmsapps02.cms.usa.net (ASMTP/noackjr@usa.net) via mtad (C8.MAIN.3.13N) with ESMTP id 578iDRByR0488M38; Sun, 18 Apr 2004 01:24:17 GMT X-USANET-Auth: 66.136.22.94 AUTH noackjr@usa.net optimator.noacks.org Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id B5DDD615A; Sat, 17 Apr 2004 20:24:16 -0500 (CDT) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19626-03; Sat, 17 Apr 2004 20:24:15 -0500 (CDT) Received: from alumni.rice.edu (compgeek [192.168.1.10]) by optimator.noacks.org (Postfix) with ESMTP id 65FD76103; Sat, 17 Apr 2004 20:24:15 -0500 (CDT) Message-ID: <4081D8BD.7010209@alumni.rice.edu> Date: Sat, 17 Apr 2004 20:24:13 -0500 From: Jon Noack User-Agent: Mozilla Thunderbird 0.5+ (Windows/20040312) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christer Solskogen References: <1082192214.23944.14.camel@funshine.carebears.net> In-Reply-To: <1082192214.23944.14.camel@funshine.carebears.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at noacks.org cc: current@freebsd.org Subject: Re: mounting msdosfs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2004 01:24:21 -0000 On 4/17/2004 3:56 AM, Christer Solskogen wrote: > I got two msdosfs(fat32) partitions on my machine. > I can mount them without any problems, but fsck wont work. > > # fsck_msdosfs /dev/ad0s5 > ** /dev/ad0s5 > backup doesn't compare to primary bootblock > > I did a clean FreeBSD 5.2.1 install(not upgraded or anything) > > Since mounting them, and using them goes well I guess almost everything > is alright. Is there a way of spesifying to not fsck them at boot, but > mount them? > > Hm, i think i remember netbsd had a simular problem, but it got fixed. > But I`m not sure if it would work on FreeBSD. > http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=11134 Assuming you can mount the partition without any complaints, set the sixth field in /etc/fstab to zero to avoid the fsck. Here's the section from fstab(5): The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in which file system checks are done at reboot time. The root file system should be specified with a fs_passno of 1, and other file systems should have a fs_passno of 2. File systems within a drive will be checked sequentially, but file systems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or is zero, a value of zero is returned and fsck(8) will assume that the file system does not need to be checked. An example entry (note the 'Pass#' is set to '0'): # Device Mountpoint FStype Options Dump Pass# /dev/ar0s5 /win98 msdos rw 0 0 This appears to have been fixed in NetBSD (the bug says revision 1.9): http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/fsck_msdos/boot.c DOSBOOTBLOCKSIZE was replaced with 79? Oh well, at least the /*XXX*/ is self-documenting ;-). A diff of the current FreeBSD boot.c versus the NetBSD version shows one other change (made in revision 1.8). I know we're doing a Darwin merge of msdosfs stuff, but I didn't see fsck_msdosfs in a quick browse of the Darwin 7.3 source. Perhaps we should merge NetBSD's fsck_msdosfs... Jon Noack