I'm trying to understand what are the rules for creating correctly aligned partitions.
For the moment I'm playing with
parted on a virtual machine, but I'm planning to move to a real hard disk when I feel more confident. I bought my laptop in 2008 so it doesn't have 4 KiB sectors, but 512 B ones. I'm going to use the EXT4 filesystem with 4 KiB blocks, so I suppose I need to align to 4 KiB anyway. As far as I know, sectors are numbered from zero and the first one is reserved for the MBR. So I conclude that I need to leave 7 sectors unused (4096 B / 512 B - 512 B) after the MBR, and the first partition could start at sector 8. The end of this partition could be any sector number that is one less than a number divisible by 8. For example 15, for an extremely small partition with just one EXT4 block.
The problem is that
parted says me that "The resulting partition is not properly aligned for best performance", but doesn't tell me what's wrong exactly. If I try to use
fdisk instead, I cannot even use a sector less than 2048 (1 MiB) for the start of the first partition. I searched for a rationale behind this, but I found nothing.
In the future I could be interested in partitioning rules that also take in consideration LVM, RAID and encryption, but this is not really important for the moment. I need to understand the basics first.