Skip to contentSkip to conversation

newbie's question

DISCUSSION horseriver 3 participants 3 messages Feb 3, 2013 – Feb 4, 2013

lore
Share & tools
lore

horseriver

author
#0 lore raw

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.

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 ?

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

Thanks!

#1 lore raw

Ad.1 you need to keep partition table somewhere. I guess in MSDOS format that will be space right after MBR.

G.
3 lut 2013 19:18, "horseriver" <[email protected]> napisa?(a):

Quoted 11 lines

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.

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 ?

Quoted 9 lines

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

Thanks!

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130203/bb4b74e7/attachment.html

#2 lore raw
In reply to horseriver
Quoted 5 lines · horseriver

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.

Quoted 4 lines

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.

Quoted 1 line

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.

Quoted 1 line

Thanks!

Greg