2

GParted shows that I have overlapping partitions. I don't understand much from partitions, but this is my output "fdisk -l -u":

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    72265727    36131840   83  Linux
/dev/sda2        72267774   488375999   208054113    f  W95 Ext'd (LBA)
/dev/sda3   *    81915498   286712054   102398278+   7  HPFS/NTFS/exFAT
/dev/sda5        72267776    77148159     2440192   82  Linux swap / Solaris
/dev/sda6       286712118   488375999   100831941    7  HPFS/NTFS/exFAT
lyubolp@lyubolp-PC:~$ ^C

If you can tell me what is the problem and what is the overlapping partition, I will follow this guide on how to fix my issue. http://gparted.org/h2-fix-msdos-pt.php#overlapping-partitions

/dev/sda2 is an extended partition. Its end number is 488375999. Should /dev/sda6 have the same end number?

My partitions are on 1 HDD. Here they are:

partitions

Red ones are NTFS, blue one is ext3. (Using Ext2 Volume Manager to get ext3 in Windows)

Additional info:

  • OS: Windows XP SP3 (on 90GB partition)/Ubuntu 13.10 (on 30 GB partition)
  • CPU: Intel Pentium e2160
  • RAM: 1GB DDR2;
  • Hard drive partitions:
    • 90 GB NTFS - Windows
    • 90 GB NTFS - other stuff
    • 30 GB ext3 - Ubuntu
5
  • The problem is that sda3 (a logical partition) should have a higher number (like sda7). Also, I believe that sda6 (a primary partition) should be sda4 (but I don't really know about that).
    – LDC3
    Jul 22, 2014 at 5:56
  • Windows wants to be in a primary partition for 2 reasons: it sets the boot flag on the partition and it would like to be the only OS on the drive (way to go Microsoft for making our life so easy). My advise, get a working copy of Clonzilla to clone the information on the drive (ensure you have a good copy) and then re-partition the drive properly. Then you can restore your partitions.
    – LDC3
    Jul 22, 2014 at 6:07
  • Which drive should I re-partition ? (And how should I do that ?)
    – lyubolp
    Jul 22, 2014 at 6:11
  • @user220258 Just fyi, you should post the physical HDs that you have in your machine, and what partitions they each contain. This will help immeasurably if you want advice on a new partition structure. Likewise, while cmd line output is fine, it might help to post links to Gparted gui screenshots to help us more easily confused. ;-) Note that Gparted has a live cd as well, since you may not want to have an OS booted when you do decide to update your partition sizes or repartition completely. gparted.org/livecd.php Jul 22, 2014 at 8:34
  • Added a screenshot of the partitions from Windows's point of view. GParted shows that the whole HDD is unparted and has the error "Cannot have overlapping partition".
    – lyubolp
    Jul 22, 2014 at 9:18

1 Answer 1

1

On a Master Boot Record (MBR) disk (which you have), there are three types of partitions:

  • Primary -- You can have only four primary partitions. They're the original type of partition. In Linux, they're numbered 1-4.
  • Extended -- This is a special type of primary partition that's intended to get around the 4-primary-partition limit of MBR. An extended partition serves as a placeholder for logical partitions; it essentially just marks out a block of space in which logical partitions reside. Extended partitions are identified by a type code of 0x05, 0x0f, or 0x85.
  • Logical -- These partitions are contained entirely inside an extended partition. In Linux, they're numbered 5 and up.

A disk can have only one extended partition. The problem is this:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda2        72267774   488375999   208054113    f  W95 Ext'd (LBA)
/dev/sda3   *    81915498   286712054   102398278+   7  HPFS/NTFS/exFAT

You have an extended partition (/dev/sda2; note the type code of f, short for 0x0f, in the Id column) and a primary partition (/dev/sda3) that resides entirely within the extended partition. This is illegal. Such problems can be created by buggy partitioning software. The standard Windows partitioning tools, through at least Windows Vista, are known to do this sometimes.

The solution is to use a tool that can repair the damage by adjusting the size of the extended partition and/or change the primary/logical status of certain partitions. In your case, you've got only four partitions (not counting your extended partition), so you could go with an all-primary setup; but that would leave you with no ability to create new partitions in the gaps that exist between some of your partitions. Thus, you may want to do something else. Windows must boot from a primary partition, so if your /dev/sda3 is a Windows boot partition, it must remain primary. If so, you could leave it as such and turn /dev/sda6 into a primary partition, leaving /dev/sda5 as the only logical partition; or you could do that and turn /dev/sda1 into a logical partition. This will give you more flexibility when it comes time to move and resize partitions.

You can do this with my FixParts program, which is installed with the gdisk package in Ubuntu. Be sure to read the instructions thoroughly. A mistake when using this program (or any partitioning program) can cause serious problems; you don't want to just jump in and try it like you would a drawing program!

5
  • Is it Ok if made my partition table like this ? i57.tinypic.com/5mk9ad.png
    – lyubolp
    Jul 25, 2014 at 9:36
  • That's a valid partition table; however, if Windows is booting from /dev/sda3 now, it will no longer be bootable with that partition converted to logical form. You should be able to convert it to primary and it should work fine.
    – Rod Smith
    Jul 25, 2014 at 12:58
  • So I should convert /dev/sda3 to primary ? What about /dev/sda6 - should it be primary or logical ?
    – lyubolp
    Jul 25, 2014 at 13:23
  • Assuming that /dev/sda3 is your Windows boot partition and /dev/sda6 is a data partition, /dev/sda6 could in principle be either primary or logical; however, given that the Windows boot partition resides between the Linux partitions and /dev/sda6, the latter can be logical only if the Linux partitions are primary. This has to do with the nature of logical partitions -- you cannot have a primary partition sandwiched between two logical partitions. Note that this is based on sector location, not partition number or the order in the FixParts list.
    – Rod Smith
    Jul 25, 2014 at 13:32
  • So, as far I understood I should do something like this: /dev/sda1 - logical /dev/sda3 - primary (?) /dev/sda5 - logical /dev/sda6 - logical (?) Sorry for asking too many questions, but I dont have enough knowledge about partitioning.
    – lyubolp
    Jul 25, 2014 at 14:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .