fun with SD cards

Arnd Bergmann arnd at arndb.de
Wed Dec 6 17:17:59 EST 2006


On Wednesday 06 December 2006 18:41, Owen Williams wrote:
> Dec  6 17:11:10 localhost kernel: mmcblk0: mmc0:b368 SDC   4020224KiB 
> Dec  6 17:11:10 localhost kernel:  mmcblk0:<3>mmcblk0: error 1 transferring data
> Dec  6 17:11:10 localhost kernel: end_request: I/O error, dev mmcblk0, sector 0
> Dec  6 17:11:10 localhost kernel: Buffer I/O error on device mmcblk0, logical block 0
> Dec  6 17:11:10 localhost kernel:  unable to read partition table
> 
> but then I ejected and reinserted and noticed /dev/mmcblk0
> and /dev/mmcblk0p1.  I mounted, and there it was:
> 
> /dev/mmcblk0p1   3.8G   7.7M 3.6G 1% /media/4GSD
> 
> Right now it's an ext2 drive,

One interesting feature of the SD card standard (unlike e.g. mmc, cf or
smartmedia) is that it requires the disk format to be FAT. I don't know
if cards in production rely on this, but it's actually a valid thing
for them to assume that clusters marked as free in the FAT can be
erased and reused for wear-leveling, and that the first block in on the
medium has a fixed format.

	Arnd <><



More information about the Devel mailing list