Don't Format SD cards with OS utilities!

Ok, ok, now what if you don't happen to be running Windoze or Max OS? And why should you trust that obscure company/organization, when they themselves declare:

Sadly this is the organization that all the big SD manufactures control and your SD card will be manufactured to their standards.

As I said before, the SD association specifies a specialized version of FAT16/FAT32 and now exFAT for SDXC cards that is optimal for the flash layout and chips used in SD cards.

What I don't understand is why Linux does not have a decent formatter for SD cards.

Linux has tables for handling quirks of USB flash keys and USB hard drives.

If you wish you can use my SdFormatter example in SdFat. It implements the SD associations standard which is specified in a 70 page Confidential document.

The document even specifies the MBR and uses it to control reserved space. You can't just decide on a partition size and location.

Here is an example of one algorithm for FAT12/FAT16 parameters from the standard with proprietary formulas and tables missing.

Annex: Format Parameter Computations

Data Area should be formatted by the following steps.

  1. Sectors per Cluster(SC) is determined from the area size.

  2. Number of Root-directory Entries(RDE) is 512.

  3. Sector Size(SS) is 512.

  4. Reserved Sector Count(RSC) is 1.

  5. Total Sectors(TS) is the number of all sectors of the area.

  6. FAT bits(12[FAT12], 16[FAT16]) is determined by SC and TS.

  7. Sectors per FAT(SF) is computed as following:
    (Standard has a proprietary formula)

  8. Number of sectors in the system area(SSA) is computed as following:
    (Standard has a proprietary formula)

  9. Number of Sectors in Master Boot Record(NOM) is computed as following:
    (Standard has a proprietary formula)

  10. If NOM isn’t equal to BU, NOM is added BU.

  11. Maximum Cluster Number(MAX) is computed as following:
    (Standard has a proprietary formula)

  12. Sectors per FAT(SF’) is recalculated as following:
    (Standard has a proprietary formula)

  13. If SF’ isn’t equal to SF, SF’ is used as SF. And recalculate from step 8.

  14. If SF’ is equal to SF, parameter computing is complete

1 Like