[parted-devel] mkpart: use same end and start value for two partitions?

Phillip Susi phill at thesusis.net
Fri Jul 22 01:14:00 BST 2022


Oliver Smith <ollieparanoid at postmarketos.org> writes:

> Hi,
>
> I wonder if I'm using "parted mkpart" right. As I understand, one
> should be able to use the same end value and start value for two
> partitions that follow each other.
>
> In an automated job that has built over 1000 images, this worked every
> time until recently where I found:
>
> $ parted -s /dev/install mkpart primary ext2 4096s 256M
> $ parted -s /dev/install mkpart primary 256M 3313M
> $ parted -s /dev/install mkpart primary 3313M 100%
> Error: You requested a partition from 3313MB to 7207MB (sectors
> 6470703..14075903).
> The closest location we can manage is 3314MB to 7207MB (sectors
> 6471680..14075903).

Have you recently upgraded from an ancient version of parted, or changed
the script to use M instead of m?  iirc, M stands for MebiByte which
requires an exact power of two size.  m is for megabyte and leaves a
little room for rounding and so the two values can be the same and will
be rounded slightly to fit.



More information about the parted-devel mailing list