I have just bought a new laptop. And I have been setting up new partitions. I generally insert a Linux liveboot OS, create partitions and then install the OS to the hard-drive.
But after the OS is installed, and I open 'Disk Utility', the warning :
The partition is misaligned by ###bytes. This may result in very poor performance. Repartitioning is suggested
appears for each selected partition in the drive. Even though I have partitioned and repartitioned the whole disk around 2-3 times, the warnings still remain.
Initially I thought it was due to some error. But the misalignment refuses to go away. The last time I partitioned, one partition ended up without any misalignment. All others are misaligned.
This is how I generally partition my drive :
|--Part1--|--Part2--|--Part3--|----Extended Partition----| |---------|---------|---------|---swap---part5---part6---|
On my earlier laptop, I have used this scheme many times. But it does not work well on this new hard-drive. I have tried both Mint and Ubuntu. I am currently using Mint, whose partition is not misaligned
sudo fdisk -l /dev/sda this is the output :
/dev/sda1 63 80276804 40138371 83 Linux Partition 1 does not start on physical sector boundary. /dev/sda2 80277504 136921087 28321792 83 Linux /dev/sda3 * 136921995 215046089 39062047+ 7 HPFS/NTFS/exFAT Partition 3 does not start on physical sector boundary. /dev/sda4 215046151 976768064 380860957 5 Extended Partition 4 does not start on physical sector boundary. /dev/sda5 215046153 220909814 2931831 82 Linux swap / Solaris Partition 5 does not start on physical sector boundary. /dev/sda6 220909878 390829319 84959721 b W95 FAT32 Partition 6 does not start on physical sector boundary. /dev/sda7 390829383 976768064 292969341 b W95 FAT32 Partition 7 does not start on physical sector boundary.
The /sys/block/sda/queue/physical_block_size says 4096.
The hard drive is a Hitachi HTS5 on my Asus X55C. So i'm guessing it is a post-2009 build.
I partitioned this drive when installing the OS using a Linux Mint Cinnamon live boot USB. On seeing the warnings, I totally partitioned the drive again with an Ubuntu 12.04 live boot USB. I had both Linux Mint and Ubuntu 12.04 for some time. Then I removed Ubuntu.
UPDATE 3 - Solution to the problem
As observed before only one partition was rightly aligned. So, I ran
GParted, deleted the misaligned partitions, and created them again. Some things I noticed :
- If I tried creating the partition in
Disk Utility, misalignment occurs. But if I created the partition in
GParted, it forcefully puts in a minimum
preceding 1 MiB freespace. And now there is no misalignment.
- I had an
NTFSpartition where I had installed windows. But it was misaligned by around 2000 bytes. So, I tried to move it with a 1 MiB preceding freespace. All was well, but GParted crashed when I was not watching the screen. But I was almost sure that had the process completed, the error would have been rectified.
I deleted all previous partitions, except /dev/sda2 and recreated them with
GParted. This is now the output of
sudo fdisk -l /dev/sda :
Device Boot Start End Blocks Id System /dev/sda1 2048 80277503 40137728 83 Linux /dev/sda2 80277504 136921087 28321792 83 Linux /dev/sda3 136921088 200579071 31828992 83 Linux /dev/sda4 200579072 976773119 388097024 5 Extended /dev/sda5 200581120 206725119 3072000 82 Linux swap / Solaris /dev/sda6 206727168 413573119 103422976 7 HPFS/NTFS/exFAT /dev/sda7 413575168 620421119 103422976 7 HPFS/NTFS/exFAT /dev/sda8 620423168 976773119 178174976 7 HPFS/NTFS/exFAT
Please help me understand this problem. Since I have not yet received a complete answer, these are my questions :
- I have used the tools I used this time before also. Then why is the partition misaligned?
- Could this be due to physical problems in the hard drive?
- Do such problems occur with partition tools in the Ubuntu and Linux Mint live-boot installers?
It was impossible to partition the drives with Disk Utility, but worked with GParted with
1 MiB freespace preceding aligned to MiB.