For three years I have been trying to find an easy way to correctly format SD cards for optimal use on the Arduino.
I finally decided to write a sketch to format SD cards. It is included as one of the examples, SdFormatter.pde, in the 20110414 beta of SdFat:
http://code.google.com/p/beta-lib/downloads/list
I decided to write SdFormatter.pde since the only program I know that complies with the SD File System Specification is here:
http://www.sdcard.org/consumers/formatter_3/
It only runs on PCs and formats small SD cards as FAT12. PC/Mac/Linux format utilities do not comply with the above standard and do not produce optimal file system structures for the Arduino.
For SD/SDHC cards larger than 64 MB this sketch attempts to match the format generated by the sdcard.org formatter. For smaller cards, 16 - 64 MB, it use FAT16 instead of FAT12.
It chooses the best file system, FAT16/FAT32, the optimum cluster size, and aligns file system structures on the card's flash erase boundaries.
This version has the chip select pin hard coded as the SPI SS pin. This will be a menu option in the future.
To change chip select to pin 4 replace line 439
if (!card.init()) sdError("card.init failed");
with
if (!card.init(SPI_HALF_SPEED, 4)) sdError("card.init failed");
Please let me know how it works.