can not mount a large FAT32 filesystem

Peter Edwards peadar.edwards at gmail.com
Tue Sep 27 02:53:23 PDT 2005


On 9/27/05, Bruce Evans <bde at zeta.org.au> wrote:
> On Mon, 26 Sep 2005, Jim Rees wrote:
>
> >  Maybe a quick fsck_msdos would do the trick..
> >
> > I doubt it.  The message implies a problem with the partition table, not the
> > file system.  I suspect it's a geometry problem, especially since the CHS
> > values don't match the LBA.
>
> Except the eror is reading the partition table itself.  This cannot be a
> "geometry" problem, except possibly one involving the sector size, since
> the partition table is in sector 0 and contains the geometry.  This is
> a very strange error, since the kernel does the same read as fdisk to
> read the partition table, and fdisk seems to work.
>

I think I've seen this before: the validation of the boot sector is a
bit OTT. The description of the bootblock on the microsoft website at

http://support.microsoft.com/kb/q140418/

Gives no description at all of the BOOTSIG3 and BOOTSIG3 fields that
are validated: I don't think there's any reason to check them. Can you
try this patch?
-------------- next part --------------
Index: msdosfs_vfsops.c
===================================================================
RCS file: /nfs/dyson/export/home/petere/freebsd-cvs/cvs/FreeBSD/src/sys/fs/msdosfs/msdosfs_vfsops.c,v
retrieving revision 1.144
diff -u -r1.144 msdosfs_vfsops.c
--- msdosfs_vfsops.c	24 Mar 2005 07:36:13 -0000	1.144
+++ msdosfs_vfsops.c	27 Sep 2005 09:40:19 -0000
@@ -512,9 +512,7 @@
 #endif	/* !MSDOSFS_LARGE */
 
 	if (pmp->pm_RootDirEnts == 0) {
-		if (bsp->bs710.bsBootSectSig2 != BOOTSIG2
-		    || bsp->bs710.bsBootSectSig3 != BOOTSIG3
-		    || pmp->pm_Sectors
+		if (pmp->pm_Sectors
 		    || pmp->pm_FATsecs
 		    || getushort(b710->bpbFSVers)) {
 			error = EINVAL;


More information about the freebsd-fs mailing list