Friday, January 18, 2013

Ubuntu on Lenovo ThinkPad S430

Yay, a new laptop! Ubuntu runs fine on the S430 from a live USB stick, including suspend.

The hard part for me was to decide how to use the SSD. The machine comes with a hybrid disk: 500Gb of HDD and a 16Gb SDD. I ended up mounting /, /boot and /usr on the SSD, and the rest (most notably /home, /var and /tmp) on the HDD.

So in the install menu, i chose the "something else" option and manually partitioned the disks. Of course, first time i forgot to change the value for where to put the boot stuff and it ended up on the HDD, so when BIOS tried to boot from SSD it said "missing operating system".

This is my current partitioning scheme (HDD=sda, SSD=sdb):
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sdb3      ext4      4.6G  667M  3.7G  15% /
udev           devtmpfs  3.9G  4.0K  3.9G   1% /dev
tmpfs          tmpfs     1.6G  900K  1.6G   1% /run
none           tmpfs     5.0M     0  5.0M   0% /run/lock
none           tmpfs     3.9G   76K  3.9G   1% /run/shm
none           tmpfs     100M   36K  100M   1% /run/user
/dev/sdb2      ext4      185M   81M   96M  46% /boot
/dev/sdb4      ext4      9.9G  2.3G  7.2G  24% /usr
/dev/sdb1      vfat       37M  122K   37M   1% /boot/efi
/dev/sda2      ext4      9.2G  150M  8.6G   2% /tmp
/dev/sda1      ext4      184G  273M  174G   1% /home
/dev/sda4      ext4      9.2G  149M  8.6G   2% /srv
/dev/sda5      ext4      9.2G  149M  8.6G   2% /opt
/dev/sda3      ext4      9.2G  975M  7.8G  11% /var


It boots in 17 seconds, from BIOS splash screen to logged in and ready to work. Of course, i didn't measure how long it takes when everything is on the HDD :)

Then i changed the fstab mount options of SSD filesystems to include noatime, nodiratime and discard.

Update 24-01: The Thunderbolt interface also just works, at least when connecting an external monitor.

Update 24-02: The only thing that disappoints me is the internal battery. Only 2.5 hours of battery life and no spare.

Update 02-04: /boot tends to fill up, for each kernel update it adds a initrd.img-x, abi-x, config-x, Systen.map-x and vmlinuz-x (where x is the kernel version). Each update takes about 24Mb. So maybe it's wise to make /boot larger. (Googling for "clean /boot partition" is even wiser.)

Update 25-09: Tried out linrunner's tlp tools, but that didn't improve battery life. It's nice however that this offers configurability of battery charging settings. So you can start charging at 75% and stop at 80%, for battery longevity.

Update 29-09-2014: I now changed it to
Filesystem           Size  Used Avail Use% Mounted on
/dev/sdb2             15G  3,6G   11G  27% /
none                 4,0K     0  4,0K   0% /sys/fs/cgroup
udev                 3,7G  4,0K  3,7G   1% /dev
tmpfs                757M  1,2M  756M   1% /run
none                 5,0M     0  5,0M   0% /run/lock
none                 3,7G  156K  3,7G   1% /run/shm
none                 100M   68K  100M   1% /run/user
/dev/sda2             92G   64M   87G   1% /home
/home/kees/.Private   92G   64M   87G   1% /home/kees

with a 16Gb swap space on the HDD. sda = HD, sdb = SSD.