# insane block device notation!!

## _______0

hi,

I was trying to re-create exact size of a partition but I was faced with a huge problem about size conventions. They are anything but fsck,ed up.

to illustrate the problem.

   Device Boot      Start         End      Blocks   Id  System

/dev/sdXX   *        2048      206847      102400    

then fdisk ask to add numbers with K,M or G. I substracted 2048 from 206847 to get the value. I added M and resulted in out of range, added K and it was off. Then out of sheer luck I tried +100M just because I saw that number under gparted and resulted in the exact 206847 end range number.

This means that fdisk's 100M is exactly 204799 blocks!! wtf...

How on earth is possible to create accurate partitions with sane numbers???

Gparted, and kde's partition utility got the same darn problem. When adjusting is always some uneven numbers that don't correspond to the powers of 2.

I hate to have uneven partitions.

How to add the perfect numbers that always approximate multiple of 2?

thanks.

----------

## NeddySeagoon

_______0,

The partition you posted starts at block 2048 and ends at block 296847 (both numbers inclusive) so the partition contains a even number of blocks.

In this case, 204800

You have provided an example of the off by one error.  A block is 512B so the size is 102400k.

Its the wonders of mixed binary and decimal arithmetic.

If you use a +, the partition is set that far from the start e.g. +100M

If you omit the + them number is used at the absolute end, in whatever units have set in fdisk. Usually blocks but cylinders still work.

----------

