On Sep 3, 2012 4:41 PM, "Paul Gideon Dann" <pdgiddie@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
disk, and
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), and ending at a multiple of (1024*1024=1048576). I use LMV or RAID+LVM on top of that.
Don't forget that the end point for each partition will be one byte before a Mb marker, so my first partition, ending at 104857599, is 1b before the 99Mb mark. The size of the partition includes this end byte, so the partition is a full 99Mb's worth of bytes.
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. -- C Anthony