How to convert a logical partition to a primary partition

hard drivepartition

I had my primary partitions maxed out but I deleted some and now I want to make one of my logical partitions a primary. Can I do this with gparted or other free tools?

Thanks

Best Answer

Before you do anything, do a full metal backup as things do go wrong with these types of processes.

The "easy button" is Acronis Disk Director for $24.

The other way to do this is by editing your partition table.

NOTE: This procedure doesn't work (I don't think) on a system (like a Mac) that uses EFI.

To do that, boot off a linux live CD and run:

sudo sfdisk -d /dev/sda > partitions.txt

...in a folder you can write to. That will give you a file called partitions.txt that has your partition table. Then edit that file using your favorite text editor, and put your logical partition above your extended partition by changing the numbers and order.

For example, if your sda5 is the partition you want to make primary, change "sda5" to "sda1" (or 2/3/4) and push the rest of the numbers down. The main point is you want to make sure the start, size, and id are the same.

Then run:

sudo sfdisk --force /dev/sda < partitions.txt