SD card geometry

Jump to: navigation, search

This article use the "255 heads/63 sectors" geometry, but doesn't explains why.

According to https://lwn.net/Articles/428584/ ,this is a bad idea because the partitions are unlikely to be aligned with segments.

Unfortunately, the fdisk and sfdisk tools from util-linux make it particularly hard to do this correctly, because they try to preserve an archaic geometry of 255 "heads" and 63 "sectors" and, by default, align partitions to "cylinder" boundaries. None of these units have any significance on today's hard drives or flash drives, but they are kept for backwards compatibility with existing software. The result is that most partitions are as misaligned as possible, they start on a odd-numbered 512-byte sector, which defeats all optimizations that a filesystem can do to align its accesses to logical blocks and segments inside of the partition.

So, Is there a reason to this geometry ? If not, we should replace all the "Formatting SD card" section. I guess the first partition should start at 4MB, and each partition should be aligned with that.

09:02, 18 June 2016