Ubuntu – Creating extended partition

bootgpartedpartitioning

this is my current hard disk status(Running linux Mint LIVE CD) HARD DISK STATUS

i have-

  1. Ubuntu 12.04 on 206 GB partition at dev/sda1.
  2. dev/sda2 system reserved.
  3. Windows 7 on 90GB partition at dev/sda3
  4. and linux swap in extended partition.

what i want to do
I want to install Linux mint KDE on my system for that i want to create a new partition of 30GB(by shrinking the free space available at dev/sda1), i can't create that because i can create only 4 Primary partitions which are already there.
so do i have to delete the Swap partition? and if i did how to force Mint KDE and Ubuntu 12.04 to use/share same swap space in new logical partition?

Best Answer

There are a number of possible solutions, but the one I recommend is as follows:

  1. Back up all your important data. Partition moving and resizing operations are inherently dangerous, so things occasionally go wrong when performing steps like the following. Having a backup ensures you won't lose irreplaceable data.
  2. Boot a Linux emergency disc, such as Parted Magic or the Ubuntu installer in its "try before installing" mode.
  3. Launch GParted.
  4. Using GParted, shrink /dev/sda1.
  5. Using GParted, delete both swap (/dev/sda5) and the extended partition that holds it (presumably /dev/sda4).
  6. Optionally, using GParted, expand /dev/sda3 into the space freed by the previous step. Alternatively, you can just leave blank space there.
  7. Create a new extended partition in the blank space left by step #4.
  8. Create a new swap partition inside the extended partition.
  9. Create new partition(s) for Linux Mint inside the extended partition. Alternatively, you could leave this to the Mint installer.

The result will be a legal, if somewhat odd, partition table. One drawback is that this procedure leaves your Windows installation the same size as or bigger than it is now. If you wanted to use some of the Windows space for Mint, you'd need to shrink and move the partition, which is the riskiest type of partitioning operation. It's also likely to leave Windows unbootable until repaired. Overall, it's best to avoid this if possible -- and given your stated goals, it seems to be possible to avoid it.

In theory, both Ubuntu and Windows should remain bootable after this procedure; however, it's conceivable that one or both OSes might be rendered unbootable. If so, you'll need to repair bootability with an emergency system. The details of how to do this depend on the details of the problem, so I won't address those details here; I just want you to be aware that there's a small but real risk of this happening, and that the problem can be overcome if you encounter it.