1

Topic: Error: Unable to satisfy all constraints on the partition.

I have tried searching but unable to find an exact solution to this issue.

I have input as many command outputs as I can. Although pc is working for me, I do not want to get into trouble later because of this issue. And i don't want to format my disk either. Gparted shows unallocated. From my Windows 7, I have no issues, and with MINI partition tool as well.

sudo parted /dev/sda unit s print
Error: Unable to satisfy all constraints on the partition.

fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5b774cd5

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   146309119    73051136    7  HPFS/NTFS/exFAT
/dev/sda3       146309120   945027071   399358976    7  HPFS/NTFS/exFAT
/dev/sda4       945031105   976771071    15869983+   f  W95 Ext'd (LBA)
/dev/sda5       945031168   968386559    11677696   83  Linux
/dev/sda6       968386560   976771071     4192256   82  Linux swap / Solaris


fixparts /dev/sda
FixParts 0.8.8

Loading MBR data from /dev/sda

Warning: 0xEE partition doesn't start on sector 1. This can cause problems
in some OSes.

MBR partitions:

                                                   Can Be   Can Be
Number  Boot  Start Sector   End Sector   Status   Logical  Primary   Code
   1      *           2048       206847   primary              Y      0x07
   2                206848    146309119   primary              Y      0x07
   3             146309120    945027071   primary              Y      0x07
   5             945031168    968386559   logical     Y        Y      0x83
   6             968386560    976771071   omitted                     0x82

gdisk -l
GPT fdisk (gdisk) version 0.8.8

Problem opening -l for reading! Error is 2.
The specified file does not exist!

parted /dev/sda unit s print
Error: Unable to satisfy all constraints on the partition.

TEST DISK output

Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors

1 * HPFS - NTFS              0  32 33    12 223 19     204800
2 P HPFS - NTFS             12 223 20  9107  81 62  146102272 [Windows]
3 P HPFS - NTFS           9107  81 63 58825  54 45  798717952 [DATA]
4 E extended LBA         58825 118 47 60801  47 46   31739967
5 L Linux                58825 119 47 60279  70 15   23355392 [Ubuntu]
   X extended             60279  69 16 60801  47 46    8384575
6 L Linux Swap           60279  70 16 60801  47 46    8384512

2

Re: Error: Unable to satisfy all constraints on the partition.

The problem appears to be that there is only one sector between the end of sda5 and the start of the sda6 logical partition.  The bare minimum required for an msdos partition table is 1 sector to hold the Extended Boot Record.  However in Linux one additional sector is normally reserved for LILO (LInux LOader).

Note that your computer will continue to run properly.  However you will not be able to use Linux partition editors that use the libparted library to alter the partitions.

rajitoor wrote:

sudo parted /dev/sda unit s print
Error: Unable to satisfy all constraints on the partition.

fdisk -l
<snip>
   Device Boot      Start         End      Blocks   Id  System
<snip>
/dev/sda5       945031168   968386559    11677696   83  Linux
/dev/sda6       968386560   976771071     4192256   82  Linux swap / Solaris

If you wish to fix the problem, you might consider deleting the sda6 linux-swap partition using fdisk.  Then use GParted to create a new linux-swap partition.  Note that this will change the UUID of the linux-swap partition.  Since the UUID is often used in the /etc/fstab file to automatically enable linux-swap, you will need to perform one additional step to edit the /etc/fstab file and update it with the new UUID.

3

Re: Error: Unable to satisfy all constraints on the partition.

can you help me with commands to do that. Much appreciated.

4

Re: Error: Unable to satisfy all constraints on the partition.

The commands you will need are:

fdisk - to delete the 6th partition (sda6 - linux-swap)
gparted - to create a new linux-swap partition
blkid - to learn the UUID of the new linux-swap partition
your-favourite-editor /etc/fstab - to replace the old UUID with the new UUID of the linux-swap partition

5

Re: Error: Unable to satisfy all constraints on the partition.

gedakc wrote:

The commands you will need are:

fdisk - to delete the 6th partition (sda6 - linux-swap)
gparted - to create a new linux-swap partition
blkid - to learn the UUID of the new linux-swap partition
your-favourite-editor /etc/fstab - to replace the old UUID with the new UUID of the linux-swap partition

Thanks I will try that later today. But I want to add gparted shows entire disk as unallocated.

6

Re: Error: Unable to satisfy all constraints on the partition.

That is listed in the FAQ.  See GParted shows entire disk device unallocated, but I know the device has data. How can I fix this?

7

Re: Error: Unable to satisfy all constraints on the partition.

Thanks gedakc commands worked for me...but that is strange i had used gparted multiple times before also on the same system and never had any issues.

8

Re: Error: Unable to satisfy all constraints on the partition.

That is strange indeed.  If you do discover how the issue is reproduced, then please report back with the steps to make it happen.

If the issue is currently resolved, you can help others searching for answers to similar problems by editing the initial post and prefixing SOLVED in front of the title.