Giter Site home page Giter Site logo

Comments (3)

pali avatar pali commented on June 8, 2024

Beware that there are logical errors in Microsoft FAT32 specifications, specially in clusters formulas. Project mtools documented some of those errors. So before change I would suggest to check if this calculated number in Microsoft documentation is correct or not.

from dosfstools.

zhangyoufu avatar zhangyoufu commented on June 8, 2024

comment for calc_fat_bits2 in mformat.c

/*
 * According to Microsoft "Hardware White Paper", "Microsoft
 * Extensible Formware Initiative", "FAT32 File System Specification",
 * Version 1.03, December 6, 2000:
 * If (CountofClusters < 4085) {
 *  // Volume is FAT12
 * } else if (CountofClusters < 65525) {
 *  // Volume is FAT16
 * } else {
 *  //Volume is FAT32
 * }
 *
 * This document can be found at the following URL
 * http://www.microsoft.com/hwdev/download/hardware/fatgen103.pdf
 * The relevant passus is on page 15.
 *
 * Actually, experimentations with Windows NT 4 show that the
 * cutoff is 4087 rather than 4085... This is Microsoft after all.
 * Not sure what the other Microsoft OS'es do though...
 */

According to fastfat.sys, as long as SectorsPerFat equals 0, the partition will be treated as FAT32.

from dosfstools.

andreasbombe avatar andreasbombe commented on June 8, 2024

MIN_CLUST_32 was introduced in 2.11, which is unfortunately before the git repo was started. This is what CHANGES has to say:

mkdosfs: raised FAT12_THRESHOLD from 4078 to 4085, introduced MIN_CLUST_32

Also note that MAX_CLUST_16 and MIN_CLUST_32 are a bunch of clusters apart, so this appears to create a safety buffer between FAT16 and FAT32. Quite likely in response to one fragile implementation or other.

Lowering that value by a few clusters will gain us nothing (except FAT32 filesystems with 65525-65528 clusters) while decreasing the safety buffer.

from dosfstools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.