0

I have the following Disk partition setup-

https://i.stack.imgur.com/v6Tgy.jpg

I want to do the following-

  1. delete partitions sda1, sda2 and sda4 but keep sda3.
  2. create extended partition in place of sda4 and make 2 swap partitions in it.
  3. create two ext4 partitions - sda1 and sda2, and use the swap created in step 2 for each of them respectively.

My concern is whether is it possible to use logical partitions of the extended partition as swaps AND to keep the data of sda3 intact.

Will I run into any problem??

3
  • Maybe is better to add swap with swapfile. Swapfile you can hold on any partition.
    – 2707974
    Jan 13, 2015 at 12:06
  • alright, i can do that. Then, can I have multiple installations in the extended partition (each distro in each logical drive)?
    – goelakash
    Jan 13, 2015 at 12:19
  • Maybe. One grub, each OS on logical drive, for each OS swapfile on the same logical partition.
    – 2707974
    Jan 13, 2015 at 12:48

1 Answer 1

0

In my opinion, your plan should be able to work. I think, there can be only one extended partition containing logical volumes, but as you first delete the old one this should be fine. But from which environment do you want to perform this? You have to do it from the system on sda3 (the partition you want to keep), or from a live system. You have to unmount the partitions first, too. And you want to delete the boot partition! You have to mark a new partition as boot volume then. It should be the volume GRUB is installed on.

To later use the new partitions as swap in your fresh installed systems (Ubuntu?) on sda1 and sda2, you can chose them from within the installer to use as swap or later using gparted (right-click on partition -> use as swap(? only know the German title)). I hope this helps you, otherwise feel free to ask again...

edit: you can perform the repartitioning from within the Ubuntu installer. Just click on "something else..." when it asks whether you want to install it instead of/alongside of your old systems (remember I have the German version, so I don't know the exact inscriptions in English!)


Is this what you want to achieve?

sda1 (primary partition) Linux System 1
sda2 (primary) Linux System 2
sda3 (primary) your old system, "boot" (GRUB installed)
sda4 (extended) <container for logical volumes>
->sda5 (logical) Swap for Linux 1
->sda6 (logical) Swap for Linux 2

But what OS do you have on sda3? Ubuntu? Then you would need another Swap: sda7 (logical)

And you have to specify one boot partition where the BIOS looks for a boot loader (e.g. GRUB). This boot loader then loads an OS you can select in its menu from the partition. So you can have many OS on your hard disk, but only one active boot loader responsible for all of them.

1
  • So one of those partitions would become boot, meaning I will only have one partition to install a distro and one more (extended) to use as swap?
    – goelakash
    Jan 13, 2015 at 16:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .