You are not logged in.

#1 2012-02-29 18:33:12

blazek
Member
Registered: 2012-02-29
Posts: 2

SSD : Where should I make my first partition begin ?

Hello,

recently I bought an SSD on which I would like to install a multiboot Windows/Linux. To do so I must first properly align the partitions.

Usually one of the things that is advised is to make sure that the first partition begins on the 2048th sector (or after 1MiB). Besides when you install Windows 7 (or create a partition with GParted to prepare the installation of a Linux distro) the system partition begins on the 2048th sector.

Finally on a page coming from ArchWiki I read this :

The GPT-able tool equivalent to fdisk, gdisk, can perform partitions alignment automatically on a 2048 sectors (or 1024KiB) block size base which should be compatible with the vast majority of SSD if not all.

So if I make my first partition begin on the 2048th sector I should be aligned.

However I'm not sure.

I tried to find some information about the EBS (erase block size) of my SSD and while I didn't find a lot I stumbled upon this article which says among other things :

The other major change to the 25nm NAND is an increase in the page size. At 50nm and 34nm, IMFT’s page size was 4KB. At 25nm on the 8GB device the page size is now 8KB. Block size has also gone up from 128 pages to 256 pages.

This 25nm NAND built by IMFT joint venture is the one which is used in my SSD.
Thus my EBS equals 256 x 8KiB = 2MiB which corresponds to 4096 sectors of 512 bytes, not 2048.

So should I make my first partition begin on the 2048th sector like a lot of links that I found tell you to do (including ArchWiki) or on the 4096th sector ?

Thank you in advance for your help.

Edit: sorry if I posted in the wrong section, but since it concerns an SSD I thougt it would be the most appropriate one.

Last edited by blazek (2012-02-29 19:36:20)

Offline

#2 2012-03-01 05:14:22

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: SSD : Where should I make my first partition begin ?

You put the wrong text in bold tongue :

The GPT-able tool equivalent to fdisk, gdisk, can perform partitions alignment automatically on a 2048 sectors (or 1024KiB) block size base which should be compatible with the vast majority of SSD if not all.

I used Gparted to partition my Intel 310, and it aligned partitions automatically; correct me if I'm wrong, but 256, 512, 2048 and 4096 are all factors of 8 and each consecutive integer is divisible by the former, so using any of those sectors as a starting point will properly align the partition physically. 2048 is simply recommended for the 1Mb space GPT requires at both the beginning and end of the partition table, or for the MBR.

Offline

#3 2012-03-01 10:08:53

blazek
Member
Registered: 2012-02-29
Posts: 2

Re: SSD : Where should I make my first partition begin ?

Hello and thank you very much for your answer. smile

ANOKNUSA wrote:

correct me if I'm wrong, but 256, 512, 2048 and 4096 are all factors of 8 and each consecutive integer is divisible by the former,

Yes, you are right. But why do you speak about 8 ? My NAND uses pages of 8Kio which corresponds to 16 sectors not 8.
Anyway, you're right, be it 8 or 16 it doesn't matter since 256 (2⁸), 512 (2⁹), 2048 (2¹⁰), 4096 (2¹¹) and all following powers of two are all divisible by 8 and 16.

ANOKNUSA wrote:

so using any of those sectors as a starting point will properly align the partition physically.

Well yes and no, that's the problem.

I've read some linux tutorials on how to properly align your partitions and they all tell you that you have to make 2 alignments : EBS (erase block size) alignment and page alignment.

In fact it's even 3 alignments, there's also the file system alignment. Here for example you will find a tool that checks for you if your partition is aligned to begin at multiples of EBS, at multiples of the page size and at multiples of the file allocation unit size (Windows term to designate the blocks of your file system).

However I think that you can forget the file system alignment because it should be ok as long as your partition is aligned to begin at multiples of the page size. So as I said earlier there are 2 alignments you have to worry : page alignment and EBS alignment.

What you said about 256, 512, etc. being divisible by 8 (and 16) is true and addresses the issue of page alignment but not necessarily the issue of EBS alignment.

In my case EBS equals 2MiB so if I make my first partition begin on the 2048th sector (1MiB), yes the page alignment will be ok but not the EBS alignment. Therefore I should make my first partition begin on the 4096th sector.

However this is not what a lot of tutorials say, this is not what ArchWiki says, this is not what GParted does by default, and this is not what Windows 7 does by default when you install it. They all make (or tell you to make) the partition begin on the 2048th sector not the 4096th sector, and they tell you "Don't worry it will be aligned with the vast majority of SSD if not all."

So either they're all wrong which I highly doubt, or aligning your partition to begin at multiples of EBS which a lot of tutorials tell you to do including ArchWiki :

If the partitions are not aligned to begin at multiples of the EBS (512 KiB for example), aligning the file system is a pointless exercise because everything is skewed by the start offset of the partition.

... is useless. You just have to worry about page alignment and nothing else.

I incline towards the last option but I'm not sure that's why I opened this topic in order to have your opinion.

Last edited by blazek (2012-03-01 13:53:24)

Offline

#4 2013-01-05 11:16:03

rexb
Member
Registered: 2013-01-05
Posts: 1

Re: SSD : Where should I make my first partition begin ?

This one was also an open question for me. I would recommend to take a look at the following discussion as well:
http://communities.intel.com/thread/22001

Offline

#5 2013-01-05 12:49:42

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: SSD : Where should I make my first partition begin ?

Both gdisk and fdisk align partitions automatically.  Why can't you just use one of them to partition your drive, then install to the partitions?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB