Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have windows 8/Ubuntu 12.10 dual boot and i have 300 GB unallocated space in my HDD but whe i try to create a new partition it tells me that i have reached the maximum number of partitions(in both systems). My swap partition and unallocated space are contiguous, any ideas how can i solve this ?

share|improve this question

2 Answers 2

up vote 7 down vote accepted

If you use MBR then you can only have:

  • Either up to four primary partitions, or
  • Up to three primary partitions and an extended partition.
    You can create several new partitions in an extended partition.

Thus you have three options:

  1. Delete an unneeded primary partition
  2. Backup data and temporarily delete one partition.
    Create an extended partition.
    Create multiple new partitions in the extended partition (including the one you just erased).
  3. Stop using MBR and switch to something which allows more partitions (e.g. GPT).


As Justin mentioned, option 2 is very easy if your swap is on one one the primary partitions. In that case:

  • Turn swap off (swapoff -a) and uncomment swap in /etc/fstab by placing a # in front of it.
  • Delete the swap partition.
  • Create the extended partition on the remaining free disk space.
  • Recreate the swap partition, run mkswap on it and edit /etc/fstab.
  • Finally create you new partition.
share|improve this answer
    
Since he has a swap partition, best way would be to swapoff and then delete it, create extended partition and remake the swap partition in there along with whatever partitions he needs. –  Justin Feb 12 '13 at 22:23
    
creating a swap file instead may be an option. I have no idea why no one does this, its supposed to be just as fast, and dosen't waste a partition. –  Journeyman Geek Feb 12 '13 at 22:52
    
Thanks for the answer .. I'll try and use option 2 and see what happens.. i'll use Gparted .. but i didn't get the mkswap command.. what does it do ? –  Kmelkon Feb 13 '13 at 10:14
    
If you delete a partition with files, then you need to 1) Backup those files. 2) Later recreate the partition, format it (using mkfs) and then copy the files back. If you delete a swap partition then there are no files on it, but you still need to format it. For swap you do this with the mkswap command. –  Hennes Feb 13 '13 at 12:10
    
option 2 didn't work for me and i tried deleting the /home sda but didn't work as well .. says it can't be unmounter because it is busy .. guess i have to format it again :( –  Kmelkon Feb 13 '13 at 14:41

In general when it comes to "PC" (MBR - master boot record) partitioning, only four root partition entries are allowed. This can be either 4 primary partitions or 3 primary partitions and one extended partition.

Within an extended partition you can create many more logical partitions.

If that's what you're running into, then you'll need to replace one of your existing Primary partitions with an Extended partition and then start (re)creating logical partitions inside the Extended.

More info here on Wikipedia.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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