Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize & create new recovery partition that is 4096 byte sector aligned #3

Open
jgstew opened this issue Sep 28, 2012 · 0 comments
Open
Assignees

Comments

@jgstew
Copy link
Contributor

jgstew commented Sep 28, 2012

Almost all hard drives have had 512 byte sectors, but new Advanced Format hard drives (many over 2TB) and all SSDs have 4096 byte sectors. It is important that new partitions are created on 4096 byte sector boundaries to maximize performance and minimize wear and tear. Any partition that is 4096 byte aligned will also be 512 byte aligned because 4096 is evenly divisible by 512. (4096 mod 512 = 0)

This issue is relevant to the "createNewAppleBootPartition" subroutine, but a subroutine could be created to check partition alignment in both cases. It could be used to guide the creation of a new recovery partition that is 4096 byte aligned, but it could also be used to warn if an existing recovery partition is not 4096 byte aligned.

A partition is 4096 byte aligned if the partition starting offset is evenly divisible by 4096. (PartitionStartingOffset mod 4096 = 0) The partition starting offset is the number of bytes between the beginning of the drive and the beginning of the partition in question.

SSD Partition alignment references:

@ghost ghost assigned justindelliott May 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants