[arch-general] How to align partitions?

Paul Gideon Dann pdgiddie at gmail.com
Tue Sep 4 05:27:12 EDT 2012


On Monday 03 Sep 2012 23:34:34 C Anthony Risinger wrote:
> 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

Thanks, excellent tip.  I wasn't aware of the mib option.

Paul


More information about the arch-general mailing list