Wasted space for fdisk partitions on Compact Flash

One of our customer is trying to maximize the partition sizes on small flash drives for an embedded system. However, the linux fdisk utility is extremely wasteful, since it insists on cylinder boundaries.

For the following, the first line is the orginal partition of a compact flash FAT16 file system. The second line is the partition from fdisk. For a 4M drive, up to 26% are unusable. Is anyone aware of a work around? Is there a better tools available? Thanks.

| BOOT | SYS | START | END | WASTED MB | FLAG | TYPE | CL HD ST LBA | CL HD ST LBA | SPACE

--------------------------------------------------------------------- 4 | 80 | 1 | 0 1 1 32 | 122 1 32 7840 | 352 4% 4 | 80 | 83 | 0 1 1 63 | 2 31 63 5985 | 2207 26%

--------------------------------------------------------------------- 8 | 80 | 1 | 0 1 1 1 | 240 15 193 16143 | 241 1% 8 | 80 | 83 | 0 1 1 63 | 6 31 63 14049 | 2335 14%

--------------------------------------------------------------------- 16 | 80 | 1 | 0 1 1 2 | 230 15 194 31966 | 802 2% 16 | 80 | 83 | 0 1 1 63 | 14 31 63 30177 | 2591 7% =====================================================================

Compact Flash Drive at

formatting link

Reply to
Tech Support for IDE-CF
Loading thread data ...

PS: we are tempted to write our own partition table instead of fdisk. We would simply allocate 95% of expected values (4096, 8192, etc) in logical sectors. We would zero out the confusing C/H/S table so that a smart loader always look for the logical sectors. Any comments on this approach?

Reply to
Tech Support for IDE-CF

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.