I finally got to buy an SSD for my desktop, and I’m now trying to optimize it under Ubuntu 9.10 (next to Windows 7).


The most vital part (due to the fact that it cannot be easily changed after installation) is alignment. I will not clarify this in depth, let’s just say you need to let the OS know how huge the drive’s chunks (sectors) are.

By the instructions from the OCZ forum, info from the Ubuntu forums and some experience I had, I followed these steps:
  • install windows 7 normally (it needed to make an additional 100mb partition in the commencement of the drive :( )
  • boot ubuntu live cd, use fdisk (in a terminal) with the special options: “$ sudo fdisk -H 32 -S 32 /dev/sda” (if sda is the SSD. Exchange accordingly if not)
  • make a partition by the “n” option, leaving a few GB of space in the end for swap (usually equal to your ram). Note that if the windows partition does not end exactly on a cylinder (fdisk will complain about that) you should leave one or two “units” after it.
  • make the swap partition by the same option
  • “$ sudo fdisk -lu /dev/sda” and divide every partition’s start with 512. If the result is integer you’re fine! My windows partitions seemed aligned, too!
  • Install Ubuntu by the defaulting installation wizard, but without changing the partition table!

Next, we got some boot options that need to be changed. Based on estimations many review-site people did, and modern SSDs’ TRIM capabilities, and my high hopes for this technology, I don’t consider wear to be a problem, so I don’t disable hibernation, logging, I don’t use ramdisk etc.

What I did was what I got from here:
1. enable noatime in grub (kernel booting option) ($ sudo gedit /etc/fstab and exchange the the option “relatime” to “noatime” (or exchange “errors=remount-ro” to “noatime,errors=remount-ro”)

2. use the noop scheduler
Now, the way to do this changed in Grub2, so here it is:
  • $ sudo gedit /etc/defaulting/grub
  • find the line `GRUB_CMDLINE_LINUX_DEFAULT=”silent splash”` and add `elevator=noop` inside the double quotes (without my single quotes, and along with a space, so that it becomes: `GRUB_CMDLINE_LINUX_DEFAULT=”silent splash elevator=noop”`)
  • $ sudo update-grub

Lastly, I installed the diskTRIM tool, which monitors disk writes and TRIMs the SSD accordingly.

Turned out to be not as simple as it sounds:
  • $ sudo apt-get install gawk
  • download disktrim
  • download the latest wiper.sh and hdparm from here and place wiper.sh in the directory shown by /etc/disktrim/wiper-location (if you have an intel SSD look for the patched wiper.sh (aka wiper-intel.sh)
  • untar the hdparm tools, open terminal, cd to the directory, type “make” then “sudo make install”
  • open disktrim, set up a new drive, and try manual trim. if it seems ok, use the commit option to do it for real… be sure to backup first!

Check it out:DIY is the way