Recover SD after OS format?

I built the Adafruit data logger shield about 5 years ago to log temperature data to the SD card. Worked like a charm. I just pulled it out of the box for a different temperature logging effort and it still worked, but sampled temperature too frequently. I updated the sketch and loaded it to the Arduino (Atmega328 Duemillenove) but found that it was creating a bunch of zero byte log files. I formatted the SD card in my Win 7 box using the OS format (I now know not to do that), and while the card works fine in my PC it no longer initializes in the Arduino.

I downloaded SDFormatter v4.0 and formatted the SD card with the quick and also the overwrite options; neither option allows the 16MB SD card to initialize in the Arduino. I have a separate 1GB SD card that works fine in the Arduino and my PC...but I'd like to use the old 16MB card too.

Is there a process by which an OS-formatted SD card can be 'fixed' to work again in the Arduino?

Reformat it to FAT32 using windows and it should work.

Help me out here, how does one choose FAT32 when formatting? When I use the Windows 7 operating system format, I see these options:

When I choose the SDFormatter, I see these options for formatting:

Neither offers FAT32 as an option. Any advice on how to force FAT32 as the format?

I don't think you want to do that if you are using an SD card with SD.h or SDfat.h libraries.

I'll defer to crossroads here. I usually format them from Linux so I'm not sure what the Windows way is

You shouldn't trust any software that'll let you "easily and quickly" format any flash memory. They are rubbish.

You can use the Windows Utility: if your card supports FAT32 (as 99.99% of cards) you'll get a FAT32 SD card. Or you can use ANY device that support SD cards and FAT32 (most cameras, mp3 player, old phones, consoles)...if I remember correctly, linux OS will also let you choose the allocating bits: the number following FAT is the bits indicator (12, 16, 32, 64), and the newer exFAT is simply a FAT64.

Btw. You are formatting an SD card. If you format it again, it's not like you lose something: check the file system (right click, properties, file system), if you are unhappy with the result, format it again.

I understand that, generally speaking, I am not 'breaking' anything by formatting the SD card. However, this 16MB (yes, Megabyte) card used to work just fine in my Arduino but, after an OS format, is no longer able to be used by SD.h/SDfat.h libraries. The same circuit works fine with another 1GB SD card. The 16MB card works fine under Win7/XP/OSX

I have tried to format the SD card using OS formatters under Win7, WinXP (I know!!), and OSX and have also used the industry group tool SDFormatter (v4) and none will make my old 16MB card work in the Arduino. I tried to dual boot my old XP laptop to Ubuntu 11.4 (yes, it's ancient) but that OS is unaware of the SD card slot in the Toshiba laptop.

I'm going to give up on the 16MB card, spend $5 on another card, and call it good. I'm tired of futzing with this, but I am left with a unhappy conclusion: something changed on my SD card, and I don't know what, but the Arduino won't talk to it anymore and I don't know how to fix that.

Ok, this stems from me using a very small card -- I have a 16MB card. When I reformatted it using Win7, the OS formatted the card as FAT12 and the Arduino library likes to talk to FAT16 or FAT32 but not FAT12. When you ask Win7 to format a card you can specify the "allocation unit size" (same as 'cluster size'), and that inadvertently determines whether you get a FAT12/16/32 result.

This post shows the key bit from Microsoft:

if (CountOfClusters < 4085) {
// Volume is FAT12
}
else if (CountOfClusters < 65525) {
// Volume is FAT16
}
else {
// Volume is FAT32
}

Win7 shows the smallest allocation unit size of 4096 bytes, and with my 16MB card that gives ~3900 clusters, which puts me in FAT12 territory.

To select a smaller cluster size I referred to this post and used my Mac to format the SD card using a 512 byte allocation unit, giving me ~30k clusters, and voila, a FAT16 volume resulted.

I stuck this in the Arduino and things are working well again.