[arch-general] How to align partitions?
C Anthony Risinger
anthony at xtfx.me
Tue Sep 4 00:19:48 EDT 2012
On Sep 3, 2012 4:41 PM, "Paul Gideon Dann" <pdgiddie at gmail.com> wrote:
> On Friday 31 Aug 2012 01:45:40 Stayvoid wrote:
> > > Recent versions of fdiks, parted, gdisk do it for you.
> > I use parted.
> > AFAICT it can tell that partitions aren't aligned, but there is no
> > option to do it automatically.
> > Could you help me to do the math? All these bytes give me a headache.
> > Thanks
> This is what I do:
> In parted, enter "unit b" to switch to bytes, because then you know what
> you're working with.
> I like to start my first partition at 1048576, which is 1Mb into the
> end it at 104857599, which makes it 99Mb long. After that, I use a single
> partition spanning the rest of the disk, starting at 104857600 (100Mb),
> ending at a multiple of (1024*1024=1048576). I use LMV or RAID+LVM on
> Don't forget that the end point for each partition will be one byte
> Mb marker, so my first partition, ending at 104857599, is 1b before the
> mark. The size of the partition includes this end byte, so the partition
> full 99Mb's worth of bytes.
Yuk! :-) I'd only change the unit setting:
... 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.
More information about the arch-general