Creating partition with parted
This examples shows how to add partition on top of existing partitions
parted) unit s
(parted) mkpart primary 524285952 534520703
# Create a new primary partition
# In this example, the new partition will start at sector 524285952 and
# end at sector 534520703, which should give you a partition size of
# around 5GB (assuming 512-byte sectors).
(parted) set 2 boot on
Marking a partition as bootable does not necessarily make it the active boot partition.
The grub needs to point to this partition for booting.
End sector = Start sector + ((Desired partition size in bytes) / (Sector size in bytes))
Here desired partition size is 5 GB
End sector = 524285952 + ((5 * 1024 * 1024 * 1024) / 512) End sector = 534520703