I want to write a script to automate partitioning for some project that I'm working on. I tried using fdisk but it was too painful... so, turned to sfdisk but now I'm getting strange results...or at least I think so.
What I want to do is, to get the disk size to be created from another script and create a partition of that size on the specific disk (also sent by the same script).
i.e. I want to create a partition with size of 5GB on /dev/hda.
First of all, do I need to convert GB to cylinders or blocks or sfdisk supports "GB" or "MB"?
Here's from my command prompt. Here's the strange thing that happens:
I have this:
and I want to add a new partition to /dev/hda:
What happens is, when I want to keep the same size and everything for the rest of the partitions (by entering ",,"), it allocates the entire space for hda1...