I'm building a p2v script for work, and in order to make it work I need a noninteractive command that will create a partition out of all the remaining space on a disk.
Example, with a drive that ends with 8552:
parted /dev/sda mkpart primary 102 8552
Only, it's going to depend every time, what that 8552 is. What I really want is a wildcard to tell parted(or whatever noninteractive partitioning tool I'm using) just to allocate all the remaining free space. Something like:
parted /dev/sda mkpart primary 102 *
parted /dev/sda mkpart primary 102 -1
Except, of course, one that will work, as these do not.
Am I up the creek here? Has anyone here ever dealt with this?