The man page and online help shows "--force":
# sfdisk --help
...
-f, --force disable all consistency checking
but it doesn't do what it says.
Create some space:
# dd if=/dev/zero of=/tmp/partition count=1
1+0 records in
1+0 records out
512 bytes copied, 3.4976e-05 s, 14.6 MB/s
(Try to) create a partition:
# echo 1 2 7 - | sfdisk --force /tmp/partition
Checking that no-one is using this disk right now ... OK
Disk /tmp/partition: 512 B, 512 bytes, 1 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
>>> Created a new DOS (MBR) disklabel with disk identifier
0xc81d61b0.
/tmp/partition1: All space for primary partitions is in use.
Failed to add #1 partition: Invalid argument
Leaving.
Verify that nothing was written:
# hd /tmp/partition
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|................|
*
00000200
Please make --force work as expected -- "just do what I say".
Thanks!