I am trying to create a new partition in a free slot of an hard drive using the Gnome Disk utility (on 14.04). I always get the message below:

Error creating partition on /dev/sda: Command-line `parted --align optimal --script "/dev/sda" "mkpart logical ext2 119947MiB 225767517695b"' exited with non-zero exit status 1: Error: You requested a partition from 126GB to 226GB. The closest location we can manage is 126GB to 226GB. (udisks-error-quark, 0)

What can be the cause of this? And can it be solved?

Edit: A screen capture detailing the structure of this particular hard drive, with the partition at cause selected:

enter image description here

  • 1
    Have you tried partitioning with GParted? – CarrotIsland Aug 20 '14 at 18:33
  • I am trying to create an encrypted partition, as far as I know GParted does not have this functionality. – Luís de Sousa Aug 21 '14 at 16:34
up vote 0 down vote accepted

I was trying to create an encrypted partition in that unallocated space following these instructions at the Wiki, this being the reason why I was using the Disk Utility. But it was returning the error above, even when instructed to create a non-ecrypted partition (ext4).

Even though GParted seems to lack this functionality it succeeded in creating a non-encrypted partition in the allocated space. After that the Disk Utility itself was able to encrypt the partition. In all likelihood the Disk Utility version shipped with Ubuntu 14.04 has a bug that prevents it from creating new partitions.

The detailed steps were:

  1. In GParted select the unallocated space and select New, give it a label in the menu the opens and click Add.

  2. Click Apply all Operations and wait for the process to finish.

  3. Open the Disk Utility, select the newly created partition and click More Actions (the little icon with cogs) and then Format....

  4. In the menu that opens select "Encrypted, compatible with Linux systems (LUKS + Ext4)" in the Type drop down; create a Passphrase and click Format....

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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