Re: How to align partitions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxx> 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


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux