I have created new partition through Gparted in linux mint and now have used up all 4 primary partitions. Gparted directly created primary partition, the logical option was disabled.
So I cannot create any more partitions even though there is lot of free space on my disk.
How can I convert the data partition(non system related) to a logical partition, so that it frees up a primary one?
I would prefer a Linux solution, since I have recently switched to Mint 19.1 from Windows 10 though it is still present as dual boot.
Output of sfdisk:
sudo sfdisk -d /dev/sda
label: dos
label-id: 0xfc515ad7
device: /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size= 1124352, type=7, bootable
/dev/sda2 : start= 1126400, size= 408475648, type=7
/dev/sda3 : start= 409602048, size= 1000001528, type=f
/dev/sda4 : start= 1409605632, size= 40960000, type=83
/dev/sda5 : start= 409602056, size= 409599984, type=7
/dev/sda6 : start= 819204096, size= 78123008, type=83
/dev/sda7 : start= 897329152, size= 9762816, type=82
/dev/sda8 : start= 907094016, size= 195309568, type=83
/dev/sda9 : start= 1102403592, size= 307199984, type=7
Best Answer
The partitions are spaced well enough, and you could transform the primary partitition
sda4
into a logical onesda10
, if you first resize the extended partitionsda3
.See below for a modified table that you could use with
sfdisk /dev/sda < new_partition
, and for a diff showing the modifications made. After this, you should have a free slot for another primary partition (a newsda4
).However I strongly advice you to first try it on a dummy file that you could create with
Then, as root:
The last step will let the kernel attach a loop device (
/dev/loop0
if it isn't already in use) to/tmp/dummy
and scan all the partitions that you have created on it. Then you could check with partitioning tools likefdisk
orgparted
if they're able to parse the partitioning of/dev/loop0
fine. Only after all that proceed with thefollowed by a reboot.
You should also change any references to
sda4
tosda10
(and(hd0,msdos4)
to(hd0,msdos10)
) in/etc/fstab
and/etc/grub.d/*
(the latter followed by anupdate-grub
).By all means, do not accuse me of anything if you're hosing your system ;-)
It may be better to wait for another answer, there are probably automated tools that could convert your partition table to GPT or such things, or more friendly partitioning programs that let you do it in a guided way.
new_partition:
diff: