2

When I was practicing with fdisk, unfortunately, two partitions added with same start and end sectors. When I mount them individually I can see the same data on both partitions. Is it a flaw in fdisk? How can I fix it?<code>fdisk -l</code> listing, showing /dev/sdb1 and sdb2 occupying the same blocks

  • 1
    I didn't mount /dev/sdb3, I know it's an extended partition and I mounted sdb1 and sdb2. – Chava Koteswara Rao Jul 5 at 4:53
  • 1
    Will you please look into the screenshot? /dev/sdb1 and /dev/sdb2 are two primary partitions and they both had the same start and end sectors? How is it possible? – Chava Koteswara Rao Jul 5 at 5:30
  • And you fix it by deleting the sdb2 partition, because the way you set it up, your extended partition starts after sdb1. BTW, today everyone uses a GUID partition table, but your 8 GB harddisk is sufficiently retro that the old method may make sense. – dirkt Jul 5 at 7:03
  • 2
    You should unmount /dev/sdb2 and delete the partition using fdisk. This will remove the entry in the partition table. Apparently the version of fdisk you were using didn't warn about the overlap. Programs like fdisk are admin tools and let you do things like this, because they trust users know what they are doing. – Johan Myréen Jul 5 at 7:06
  • @icarus, "How is it possible": IMHO that's a good question. For example: aside from dd, what specific command or util is even able to set two partitions to occupy the same block numbers? It's not obvious to me how fdisk can do that. It might indicate a bug or a hack. – agc Jul 5 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.