How to check is Your disk correctly aligned:
Download diskpar.exe from here and save it in Windows\System32 folder.
Open Command Prompt (Win key + R, type "cmd" and hit Enter). Type diskpar -i # (# - number of your disk) and hit Enter and You should see something like this.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\DerleT>diskpar -i 1
---- Drive 1 Geometry Infomation ----
Cylinders = 486
TracksPerCylinder = 255
SectorsPerTrack = 63
BytesPerSector = 512
DiskSize = 3997486080 (Bytes) = 3812 (MB)
---- Drive Partition 0 Infomation ----
StatringOffset = 65536
PartitionLength = 3997171712
HiddenSectors = 128 (This number should be 2048 and You are fine, no matter which drive You use)
PartitionNumber = 1
PartitionType = b
End of partition information. Total existing partitions: 1
!!! MAKE A BACKUP OF YOUR HDD IN CASE THINGS GO WRONG !!!
USE AT YOUR OWN RISK
1. Download GParted Live (100 MB) from here and burn it to CD.
2. Boot into GParted GUI (just hit ENTER until screen like this one appears).
3. Select partition on disk You want align.
![]()
4. Select "Resize/Move" option and shrink partition (in my case "Minimum size" is 26574 MB, so I set it to 28000 MB) and set "Free Space Precedin" to 10 MB just to make some free space "in front" of partition so we can set larger offset then 63 sectors.
![]()
5. Left CLICK on "Resize/Move", then on "Apply", again on "Apply" and wait few minutes (I hope You made a backup just in case...). Once everything is over is should look something like this.
![]()
6. Open "Terminal" (third icon on top of screen):
- type "parted /dev/sda" and hit ENTER ("/dev/sda" is name of my drive, maybe You have something else)
- type "mkpart" and hit ENTER
- type "primary" and hit ENTER
- hit ENTER
- type "63s" and hit ENTER
- type "127s" and hit ENTER
- type "quit" and hit ENTER
- type "exit" and hit ENTER
![]()
7. Now restart GParted GUI (red icon labeled "Exit" on top of screen, select "Reboot" and "OK")
8. When GUI starts again GParted screen should look like this one.
![]()
9. Now select partition with data on it, select "Resize/Move" option and set "Free space preceding" to 0 MB, "New Size" to maximum (in my case "Maximum size" was 61052 MB so I set that for "New Size") and uncheck "Round to cylinders".
![]()
10. Left CLICK on "Resize/Move", then on "Apply", again on "Apply" and wait few minutes.
11. Once everything is over, select that small partition we created earlier (it should be one with size of 32.50 KiB) and choose "Delete", then "Apply" and again "Apply".
12. Close GParted application and turn off Your PC (red icon labeled "Exit" on top of screen, select "Shutdown" and "OK").
13. Boot into Your main OS and that's it!
All info for making this guide is from this site.
-
FruitSaladExtreme Notebook Consultant
Thanks, time to use my 60gb OEM -.-
-
Thanx! I've seen this guide in the Ocz forums again, tried it once with no success, but it's really great that you have given more detailed instructions and screenshots...I'll try it again using your guide.
-
I hope it will work this time!
Let us know how it ended.
BTW: on OCZ forum all You have is link to page I added at and of this guide. -
). Thank you for your effort & time spent to do this!
-
Aren't you supposed to check for any disk errors with chkdsk on reboot (5 step process) and then defrag that disk before you start any partitioning?
-
Can't say will it do any difference if You run chkdsk and defragmentation before whole process (for SSD it's good not to run defragmetation).
I done it exactly as I wrote it.
On XP it'll automatically run check disk after 13th step (5 step process with blue background). -
Well I only used gparted like once and the video was FUBAR (the top part of the screen displayed popped up from the bottom of the screen and I had some extra artifacts on the screen). However everything worked fine. That program does need some extra testing on different machines, it's far from perfect.
-
Good think Vista and Win7 align your partitions in setup.
-
ViciousXUSMC Master Viking NBR Reviewer
-
Is there a case that an aligned disk will not be recognized by the system ,meaning that the system will try to find the boot parameters in the default place not in the rearranged (after alignment) ?
-
The reason for aligning a partition is mostly due to performance reasons. I don't remember the specifics, but I just know this was a bigger concern on servers hosting disk intensive programs, like databases. -
-
My conclusion is that it doesn't matter that much if it is aligned to 64 KB, 128 KB, 256 KB, 512 KB, 1024 KB == 1 MB and so on, it's important just to align it.
I don't prefer neither B, neither sectors, but when I look to numbers in B and numbers in sectors I'll stick to sectors.
And I think it's easier to work with sectors then B, just because 2 sectors == 1 KB, an 1024 B == 1 KB, so 64 KB == 65536 B == 128 sectors. -
Alignment calculator
Referenced from this thread. I thought this would complement your thread well, Tomy. -
Sorry to post in an old thread, but this is the first I've heard of aligning partitions.
1) If my EEEPC 901 4gb XP boot SSD has no partitions (i.e. just one formatted section with nothing unallocated), is there any "aligning" to do? I'm not seeing any problems with speed, frankly, but if there is something I can do to improve performance, hey, I just might try it.
2) And then, if I don't align, what exactly are the consequences?
Thanks. -
84CubsFan, I aligned the C: partition on my eeePC 901 with this method (the 4 gb SSD). It worked great and diskpar reports the correct offset.
I tried to align the second SSD (8 gb) in the eeePC and parted at the terminal would not let me do it. It kept reporting too many primary partitions. I cannot figure out why because there are only three primary partitions: two on the 4 gb ssd and one on the 8gb ssd.
I thought perhaps the USB drive I was booting from was causing problems because it would then be the fourth primary partition. So I booted GParted to RAM and removed the USB drive and I still got the error of too many primary partitions.
So what I finally did was resize the partition using GParted and leave 1 MiB at the front. 1 MiB = 1024 kb, so my partition should be aligned. diskpar seems to report that it is aligned, so I think I'm good:
StartingOffset = 1048576
HiddenSectors = 2048 -
84CubsFan: it's always good to align partitions
stangbat: it's only important to align 1st partition, because You set size in MBs so all other partitions will be aligned
Happy new year!
BTW: if I'm wrong please correct me -
You are right Tomy B., but I'm trying to align a second SSD in the EeePC. The 901 model has two. I got the first one aligned fine thanks to your guide. The second one was causing me trouble, but I believe it is now aligned as I described in my previous post.
-
HiddenSectors = 2048 == Aligned!
-
Hey, Tomy B.
So, right, 31K - BAD. No idea how this happened because I did a fresh install with Windows 7. I tried DiskPar (run as administrator as well), but this is what happens:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>diskpar -i 1
Open Drive Failed
C:\Windows\system32>
Could this diskpar.exe issue and the initial 31K misalignment be caused because this is a full-disk encryption drive with hardware encryption?
Thanks,
~Ibrahim~ -
There is no need to use diskpar.exe, AS SSD Benchmark already told You that disk is unaligned, now You just need to align it. So backup all data and follow steps, one by one.
Good luck! -
OK, sounds good.
-
Any success ikjadoon?
Maybe some numbers before and after? -
I will be trying tomorrow or Wednesday. I'll run CDI and AS SSD benches.
~Ibrahim~ -
Thanks!
BTW: don't forget to backup first, just in case something goes wrong! -
~Ibrahim~ -
Just about to start. Made an image last night, so all should be well.
11. Once everything is over select that small partition we created earlier and choose "Delete", then "Apply" and again "Apply".
Which "small partition" we created earlier?
The 7.78MiB one, right? Or the 32.50KiB one? -
OK, nearly finished.
A few things about the guide:
1. In the picture, it shows you typed 63s and 127swhich is correct. 63 and 127 make it think you want to create an offset of 50MB! But you need the "s". Everything is write, but your guide says just "63" which isn't right.
2. I answered my question above. It's the 32.50Kib one because you have already deleted the 7.78MiB one!
3. Some people might not (like me, lol) see the "apply" button. It kept telling me it had pending actions, but I was like, NO, I just clicked it. Issue was on my screen, the window was too small horizontally and so I couldn't see the "Apply " button.
4. When in terminal, there is a SPACE between "parted" and the first slash. Didn't see that the first time, lol.
Will bench soon. -
davepermen Notebook Nobel Laureate
hm should try this on my xp machine with the old samsung. it shows in AS SSD that i have bad alignment.
when i get some time, i'll test that out. -
@ ikjadoon: "s" and "s" added and note for 32.50 KiB partition too.
@ davepermen: please, just benchmark it before and after, or some real-world test to see is there any real improvement.
Thanks! -
davepermen Notebook Nobel Laureate
that is non-reliability i never get from an intel...
/runs away
but i saved the numbers. -
Not reliable drive during benchmarks, sorry but :laugh:
You can run, but You can't hide!
Can we see those numbers? Is there any difference before and after? -
davepermen Notebook Nobel Laureate
there's no after, yet. well, it's quite unreliable if the os freezes for minutes while you try to work with it
happened before but it's hard to determine who's at fault. now, as in the bench, it happened in a worse way, i'm now sure it's the ssds fault.
so i have a samsung that can stutter. lets see if i can fix it with the alignment laters (tomorrow or friday, i guess).
oh, and btw, the write bench (random parallel writes) took about 15 minutes to run.. really much meh. -
Yes, parallel writes, only thing I don't like at my SSD.
-
davepermen Notebook Nobel Laureate
-
Aight, so there was a reason I didn't reply again last night.
So, I deleted the 32.50KiB partition and I tried to boot to Windows. Got an error telling me the boot device couldn't be found. Checked in the BIOS, hard drive was there, booted GParted, hard drive was still there.
Got a little freaked out and just went to bed. This morning, popped in my Win7 DVD, clicked Repair Computer, it saw that my boot settings were messed up ('Show Details' said "Partition can not be found"). It repaired that removing some registry entries and adding some, rebooted, ran chkdsk, and whatever it did fixed it!Note: these were the instructions on the error screen; thank you Microsoft!
Was a bit afraid that this Windows Repair might have botched the whole partition alignment, but it didn't.
AS SSD Bench
Before
After
CDI Bench (x64) - 500MB
Before
After
It helped everywhere!I think one access time went up a bit, but I assume that test is highly variable to what I'm doing at that very second and still it wasn't much higher.
w00t!
However, this whole experience has at least shown me one flaw in my backup theory. I just realized that to get into Windows Recovery Environment, I have to have my Win7 DVD in the drive. Issue is that my image backup is also on a DVD! I wonder if Win7 is loaded into the RAM or if I eject the Win7 disk to put in the image, it'll just fail. Checking now.
~Ibrahim~ -
Well, FUDGE CRACKERS. The eject button for the laptop requires a stupid driver and obviously it isn't loaded when you're in the recovery environment. So I can't even eject the Win7 DVD.
Which brings me to my on-topic question: Windows has a built-in recovery environment built into the hard drive ("Repair My Computer" when you hit F8). However, trying to boot to that, it gives me the same error that I used to have when booting to Windows (pre-startup repair). How can I repair the recovery environment? Any way?
Thanks,
~Ibrahim~ -
All right, guys, judging by all the crap I'm having to do to fix the Recovery Environment (which is pretty darn important), I'm gonna have to say:
Don't follow this guide. At least not in it's current form. It seems to remove the Recovery Environment (which is at the start of the hard drive).
Just a head's up. :/
~Ibrahim~ -
davepermen Notebook Nobel Laureate
but your win7 should NOT be unaligned by default. did you have a clean install on a drive that had NO partition on?
edit: gparted doesn't work here. it can't size the partition down -
@ davepermen: I done it few times on drive with XP installed and didn't have any issues, so actually I can't help a lot, maybe if You can post some screenshots.
@ ikjadoon: I didn't ever done it on drive with Vista or 7, but maybe I'll try it tonight, just to see how it works out -
@davepermen
Yup, all unallocated. :/
Well, long story short, I got my hard drive back to the way it was pre-alignment. I will make 3 different image backups this time.
@tomy
The guide is fine if you don't mind getting rid of that initial 100MB system recovery partition that some people have. 7 will only install this 100MB system recovery partition if you have it all unallocated during the install. If you created a partition yourself, it will NOT create this recovery partition and those people shouldn't be affected.
Maybe when 7 restores the image, it will re-align?!
~Ibrahim~ -
I tried GParted on HP dx7300 with Win 7 installed, but couldn't boot into GParted.
-
davepermen Notebook Nobel Laureate
very strange. -
I know!
I mean, the drive was brand-new and everything. I just don't get it.
Well, I'm going to try aligning them again. The image had my old alignment, 31K - BAD. I don't care about the Recovery Partition now, it's not working right now and I have backups.brb.
EDIT: Aligned. Recovery Partition botched, but it wasn't working anyways and it's useless. Just burn a system repair disc, much more effective (especially if your hard drive really is f'd up). Back where I was four days ago. Learned a lot, though, lol!
~Ibrahim~ -
Second time I've resurrected this thread...
So I've finally gotten around to trying this on my Asus 901, both the 4GB main drive and the 16GB storage drive (FYI: the Asus 901 came with two SSDs, not two partitions). On the 4GB drive, I keep getting errors when I try to resize the partition (perhaps because the drive is almost full -- only ~600mb free?). On the 16GB drive, I can resize the partition, but when I put in 63s and 127s, it gives me a warning saying that the drive will not be properly aligned.
Diskpar gives me 128 hidden sectors for the 4GB drive and 255 hidden sectors for the 16GB drive.
Any advice?
Thanks. -
4 GB one is fine and for 16 GB try with 128s and 255s. After that diskpar should show 256 hidden sector, which is fine too.
-
hi guys
I am using this for my Vmware project(multiples W2003 Virtual Machines) after P2V since some recommendations state to use 64Kb Offset = 128 Sectors
I am trying to set 64Kb as my default offset for P2V Virtual Machines
I've tried and tried and I am not able to get 64Kb
basically I am not able to move the data partition next to the 32.5Kb partition created I always get 1 MB between the 32.5 and the Data Partition
This happens because I am not able to set "Free space preceding" to "0" gparted will always set it to 1MiB....
any idea how to fix that?
thanks a lot -
I think it's fine if You get 64 kB (128 sectors) + 1 MB (2048 sectors) before first data partition.
What offset did You get in diskpar? -
I closest offset I can get is 2048 sectos = 1024 Kb
Guide: How to align boot partitions without losing data
Discussion in 'Hardware Components and Aftermarket Upgrades' started by Tomy B., Oct 11, 2009.