script: rework partitioning

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>