John R Pierce wrote:
On 6/5/2014 12:07 PM, Timothy Murphy wrote:
<snip>
That doesn't really answer my question; I know (roughly) what the MBR, ie the first 512 bytes, contains. But I notice that my laptop, for example, leaves 64 sectors for something at the start of the disk; and when I get the first 2048 bytes with sudo dd if=/dev/sda of=sda.mbr bs=2048 count=1 I see that there is plenty on the disk after the first 512 bytes. (Admittedly Windows might have written that, as I have a Windows partition.) But does Linux ever write anything in bytest 513-1024, for example?
traditional PC partitioning tools, dating back to MSDOS, put partitions on 'cylinder' boundaries. this is a bad idea on modern disks, whether they be SSD's that often have 128K physical write blocks, or newer HD's with 4096 byte physical sectors, or raids where there's several of the above striped together.
the rest of the space between the sector 0 MBR and the first primary partition is completely empty, nothing puts anything there.
I always start my first partition at a round number SECTOR, like 128s (which is 64k bytes assuming 512B sectors) so everything is aligned on a power-of-two boundary.... I use parted, rather than fdisk, to do this. something like...
parted -a min /dev/sdb mklabel gpt mkpart pri 128s -1s quit
<snip> I find mkpart pri 0.0GB x.GB *always* gives me aligned partions (and parted - talk about user hostile programs! "Not aligned", with not a clue as to what it actually wants....)
mark