I'm trying to figure out how to partition a disk in a programmatic way so that my disk will have three "msdos" primary partitions: one for /boot, one for swap and the last for logical volumes. I can't use puppet or ansible or suchlike because of our customer's policies.
All the systems are configured with a single, 1TB disk.
- sda1 = /boot should be 512MB
- sda2 = swap should be 16GB
- sda4 = the rest of the disk, extended partition for logical volumes.
I'd like to have these partitions aligned properly and I keep getting errors regarding the last partition not starting on a physical sector boundary.
Which type of unit should I use with parted? Would sfdisk be easier? I see posts where folks are using mebibytes and sectors in the same mkpart command and wonder why.