[arch-general] How to align partitions?

C Anthony Risinger anthony at xtfx.me
Tue Sep 4 00:34:34 EDT 2012


On Mon, Sep 3, 2012 at 11:19 PM, C Anthony Risinger <anthony at xtfx.me> wrote:
>
> Yuk! :-) I'd only change the unit setting:
>
> u mib
>
> ... much simpler than bytes, and then +1 and -1 are always aligned (and
> appropriate for MBR)
>
> I simply leave ~1mib gap between partitions ... something like:
>
> mkpart pri ... 1 129
> mkpart pri ... 130 1154
> mkpart pri ... 1155 -1
>
> ... seems to work universally.

er, my mistake ... i *used* to leave a 1MiB gap, but as long as the
default unit is MiB, and you specify offsets using simple integers,
parted will automatically start/end on the correct byte:

(parted) u mib
(parted) mkpart pri 1 129
(parted) mkpart pri 129 641
(parted) p
[...]
Number  Start    End     Size    File system  Name  Flags
 1      1.00MiB  129MiB  128MiB
 2      129MiB   641MiB  512MiB

(parted) u b
(parted) p
Number  Start       End         Size        File system  Name  Flags
 1      1048576B    135266303B  134217728B
 2      135266304B  672137215B  536870912B

-- 

C Anthony


More information about the arch-general mailing list