How to change partitioning - may involve conversion of a partition from primary to extended

Posted by george_k on Ask Ubuntu See other posts from Ask Ubuntu or by george_k
Published on 2011-07-31T03:48:39Z Indexed on 2012/04/06 11:41 UTC
Read the original article Hit count: 258

Filed under:

I am having trouble thinking through how I can achieve my partitioning goals.

Now my partitions are:

  • sda1 (winA) (primary)
  • sda2 (winB) (primary)
  • sda3 (/ for ubuntu) (primary)

What I want to migrate into is (obviously partition numbers need not be exactly like that)

  • sda1 (winA) (primary)
  • sda2 (winB) (primary)
  • sda3 (/boot) (primary)
  • sda4 - extended which will contain
    • sda5 (/home)
    • sda6 (/ for ubuntu)
    • sda7 (swap)

I know I may be asking too much, but what would a way to do it?

One way I have thought is

  1. Create a new primary partition for /boot and split it from the root partition into the new one. It shouldn't be too hard. Then the disk will have 4 primary partitions.
  2. Somehow convert the root ubuntu partition from primary to extended.
  3. Split that last partition in 3 extended partitions (root, /home, swap) and split the contents there.

I am obviously stuck on the 2nd part.

Another way could be (maybe easier):

  1. Create an extended partition (or two)
  2. Split /home there
  3. Somehow move everything except /boot to the extended partition. This way /boot will stay on the primary partition that exists now, and will be shrunk as needed, and everything else will end up to the extended partitions.

This may sound better, but I'm not too sure how to do the 3rd part.

Some details: The disk is almost empty, so I have space to move things around in it, shrink the ubuntu partition etc. I don't want to touch the windows partitions in any way. Reinstallation is not an option. Also using a different partitioning scheme with fewer partitions is not an option (for example not having a separate /boot)

Any ideas?

© Ask Ubuntu or respective owner

Related posts about partitioning