I tried to backup my partition using dd on another disk and I created a partition of the same size.

When I finished the copy I had problems mounting the partition since I got bad geometry: block count .

I noticed that in order to create a correct backup (avoid bad geometry error) not only the two partitions must have the same size in MB but also the same number of blocks (The number in blocks you can check using fdisk -l). I also noticed that the number of blocks varies if I create the partition starting from the beginning or starting from the end . Can someone explain me the behaviour and how to create two partition with the exact the same block size?

closed as unclear what you're asking by Karlson, Anthon, Michael Homer, Ramesh, bsd Jul 12 '14 at 19:38

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    The partition size is usually the only thing that matters. What filesystem is on the partition, where exactly did the error message appear, and was that really the complete message? – frostschutz Dec 24 '13 at 11:19
  • 1
    Please add the exact command you have used - my hunch is it hasn't been entirely correct. – peterph Dec 24 '13 at 13:16
  • 1
    It doesn't have to be the exact same size - it just has to be at least as big – Jonas Berlin Feb 22 '14 at 16:40
  • Please don't use dd for backups. – goldilocks Jul 12 '14 at 14:23

The partition size must be at least as big, not precisely as big, as before.

The problem you were encountering here is that the fdisk utility you used rounded the partition size to the next multiple of its units – these used to be cylinders (heads * sectors); in modern times, we ignore the old rotation units from MFM HDD age and just assign whole Mebibytes to partitions, but older utilities do not yet recognise that and try to be “helpful” and round to whole cylinders…

Which utility did you use to create the target partition? Linux command-line fdisk needs both the c and u commands to change between those behaviours; I think yours was just old.

Not the answer you're looking for? Browse other questions tagged or ask your own question.