newbie's question

Greg Freemyer greg.freemyer at gmail.com
Mon Feb 4 15:50:31 EST 2013


On Sun, Feb 3, 2013 at 3:34 AM, horseriver <horserivers at gmail.com> wrote:
> hi:)
>
>   I use fdisk to add a new partion on a image file.
>   I find the start of partion 1 is alwayes set to 63 by default.
>   That means partion 1 start at 63*512=32256 byte.

You are using old generation partitions.  As of Vista, the default is
to align partitions on 1MB boundaries, so sector 2048 for the first
partition to start is very common.  1MB alignment is also the default
for current generation linux partitioning tools.

>   Here is my question:
>
>       1.  The region from 512th bytes to 32256th bytes will do what ?
>           Why partion 1 don't follow MSR's location ?

Performance optimization.  Historically, the 1st partition started at
cylinder 0, head, 1, sector 0.   For drives made in the last 15 years,
that turned out to be sector 63 in LBA terms.

>       2.  The image's magic number is at which offset ?

There is a partition type identifier maintained in the MBR (or GPT),
You can find exactly where that is maintained.  Then each filesystem
type keeps its own magic number identifiers wherever they feel like.
It is filesystem type specific.

> Thanks!

Greg



More information about the Kernelnewbies mailing list