Ubuntu – Gparted Error “Unable to satisfy all the constraints on the partition”


I have dual booted Windows 7 & Ubuntu 14.04 with EasyBCD, i.e. I have installed grub on the Ubuntu root partition & added entry of linux to Windows bootloader using EasyBCD.
So effectively i am using Windows Bootloader to boot into either of them. Working perfectly.

As i already had 4 primary partition on HDD, i converted one of that (NTFS-Windows 500 GB) to Logical using EaseUs Partition, so that around 70GB of uncollected space on HDD could be used.

NOTE: Before that the 500 GB partition was Primary & i was able to see all partition in Gparted. "What i mean to say is all was working properly".

The problem (i.e. after conv. of primary to logical) is i am getting this message after starting Gparted & shows entire partition as Unallocated.

Unable to satisfy all the constraints on the partition

$ sudo fdisk -l 
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors 
Units = sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xe6bfc2a4
    Device Boot       Start         End      Blocks   Id  System
  /dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
  /dev/sda2          206848   427624447   213708800    7  HPFS/NTFS/exFAT
  /dev/sda3       427624449  1805438975   688907263+   f  W95 Ext'd (LBA)
  Partition 3 does not start on physical sector boundary.
  /dev/sda5       427624512  1532823551   552599520    7  HPFS/NTFS/exFAT
  /dev/sda6      1532825600  1780301823   123738112   83  Linux
  /dev/sda7      1780301824  1805438975    12568576   82  Linux swap / Solaris

So what is the cause of this problem.
I know there might be duplicate for this at "Gparted Error" (that was bug probably & was for old version of Ubuntu 13.04) & "fdisk error"
Also, if there is any chance that both errors are related or complementary to each other?

So, is this problem caused because of Sector Size (512 bytes/4096 bytes) or my mistake of converting a Primary partition to logical using EaseUs rather than some of the Ubuntu Tools.
How can i rectify this?

If any further info needed, feel free to ask.


@psusi, sudo parted -l says same as what gparted said. (Unable to satisfy..)

@oldfred, i have started chkdsk, will update you with the same.

(Thanks to both)

@rod smith, I will try your suggestion after i done with chkdsk.Thanks !

Best Answer

  • I'm not 100% positive, but I suspect this is your problem:

    /dev/sda6      1532825600  1780301823   123738112   83  Linux
    /dev/sda7      1780301824  1805438975    12568576   82  Linux swap / Solaris

    Most partitioning tools put at least one empty sector between logical partitions and use that space to store the Extended Boot Record (EBR) that describes the following logical partition. In the case of your /dev/sda6 and /dev/sda7, though, there's no gap between those two partition. This is legal, provided the EBR can be tucked away somewhere else. (sfdisk can do this, for instance.) It's possible that libparted (upon which parted, GParted, and several other tools are based) is becoming confused by this. I've not tested how libparted reacts to such disks, though, so I can't be sure that my guess is right.

    If this is the problem, then I can think of at least two solutions:

    • Using any tool that will enable you to do so, delete /dev/sda7. It's swap space, so it doesn't hold any critical data. You can re-create it later, with a gap between it and /dev/sda6. When you re-create your swap partition, you'll probably have to edit /etc/fstab to point to the new swap space.
    • You've got one free primary partition, so you can use FixParts (part of the gdisk package in Ubuntu) or the EaseUS tool you used initially to convert /dev/sda7 into a primary partition. Primary partitions don't need EBRs, so the problem should then go away. This method has the advantage that you won't need to edit /etc/fstab, but you'll also have no free primary partitions. If you really want your swap to be on a logical partition, you can shrink either partition by 1MiB, which will open up enough of a gap that you'll be able to convert back and have it work.