I just bought a Lenovo x121e (E-350 version). I was able to successfully install ubuntu 11.04 and everything is running fine (for the system to boot an efi partition seems to be necessary however). The laptop has a Seagate Disk with a physical sector size of 4096 bytes.
After ubuntu is installed Disk Utility reports that my partitions are not properly aligned:
I have tried both fully automatic install wiping the disk (as shown on the screenshot) and setting the partions manually during install. Both variants show misaligned partitions.
- Is this this a bug when creating the partitions or is Disk utility giving wrong information?
- If the alignment is wrong and negatively affecting performance, how can I correct it (either now or with a fresh install)?
I own the TP X121e (AMD E 350), too and ran into the same results that you reported. I found a workaround. It requires a fresh install, although there might be alternatives that don't require this -- well, I haven't tried anything, but at least the following works:
A useful prerequisite was the article http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/ and especially the first comment posted by JLockard on 19 November 2010.
My TP X121e has a 320GB Seagate Harddrive that uses a physical sector size of 4096byte and a logical sector size of 512byte and that's where the misalignment comes from (see mentioned article).
I haven't found any way to correctly align partitions to the 4096byte scheme neither with disk utility nor with gparted (there's an "align to MiB" option in gparted but that resulted in misaligned partitions, too).
So I reverted to the command line and used parted (that's the solution the commenter JLockard mentions, see above). And that's what I did:
I booted from my ubuntu-live-usb-flashdrive and used gparted to set up a gpt partition table (that should be possible from command line with parted, too, but I didn't want to dive any deeper in the man pages).
Then I switched to command line and set up the partitions with parted:
The -a optimal option stands for optimal alignment and that's the thing we need. The command starts an interactive mode where you can just type in the following commands: Units to align to should be Mebibytes showed me that the harddrive is 305245MiBs large Later on, that will be my efi boot partition (an efi partition is required to boot into ubuntu at all, as you correctly pointed out) later on (roughly 20MB, as the automatic ubuntu installation suggested in my earlier installation attempts). That will be a 25000MiB / partition. will be my 272225MiB /home partition. The rest of available space will be my swap partition (roughly 8GB -> 8GB RAM): Before proceeding, one can check if alignment is correct with where N is the partition number.Then I started the Ubuntu installer again and chose the "something different"/manual install option. Now I assigned the filesystems and mount points to the previously created partitions (1=efi-boot, 2=ext4 /, 3=ext4 /home, 4=swap). Disc utility shows a 1MB free space before the first partition and a ~375KB free space behind swap. That's due to the optimal alignment.
Installation went on... and: Nicely --or better: optimally-- aligned partitions! I don't know if that really made any difference but at least my system "feels" a little snappier.
Any suggestions for improvement appreciated.
My suggestion for Ubuntu: The disc utility of the installer should get a gui option that sets the optimal alignment for 4096byte-drives. That would be the easiest solution.