[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dos filesystem check
dos filesystem check
Wed, 20 Mar 2002 10:40:36 +0000
If you create a file system with an odd number of sectors and then use
the linux mkdosfs to create a FAT filesystem on it, and then do a parted
check on that, you get:
> address@hidden:/build/dosfstools/dosfstools-2.8$ sudo parted -s /dev/sdc
> check 1
> Warning: Partition size (64197 sectors) and filesystem size (64196 sectors)
> do not match.
> You found a bug in GNU Parted. Please email a bug report to address@hidden
> containing the version (1.4.24), and the following message:
> There are no possible configurations for this FAT type.
> address@hidden:/build/dosfstools/dosfstools-2.8$ echo $?
mkdosfs actually does a binary search up the disk to find the highest
numbered sector it can read, and linux doesn't let you read the last odd
sector of a block device directly. So, mkdosfs concludes that the
partition size is one sector less than the real size. A bug in mkdosfs,
maybe; parted behaves like Microsoft s/w in this case.
Anyway, I didn't investigate whether it is just this that parted is
treating as a bug, or whether something else goes wrong as a result.
Also, having decided there is a bug, parted really shouldn't exit with
> (parted) p
> Disk geometry for /dev/sdc: 0.000-4095.856 megabytes
> Disk label type: msdos
> Minor Start End Type Filesystem Flags
> 1 0.031 31.376 primary FAT
> 2 101.975 196.105 primary FAT
> 3 298.081 902.087 primary FAT
> 4 996.218 4000.561 primary FAT
> (parted) mkfs 3 fat
> Warning: Would you like to use FAT32 for this filesystem? It is much more
> efficient with your disk space, but is not compatible with early versions of
> Windows 95 and Windows NT. Only select yes if you only use Linux, BSD, MS
> Windows 98 and/or MS Windows 95 B.
> Yes No Cancel ? y
> (parted) check 3
> Warning: File system is reporting the free space as 154493 clusters, not
> 154318 clusters.
> Ignore Cancel ?
So something seems amiss with it's creation/checking of FAT32. All this
with parted 1.4.
- dos filesystem check,
Richard Hirst <=