Arch Linux on ThinkPad T440s



Arch-linux-on-thinkpad-t440s I recently got the opportunity to choose a new laptop and after some intensive research I choosed a ThinkPad T440s, mainly due to the combination of a strong i7 CPU, 12 GB RAM, 512 GB SSD and 1.6 kg weight. It might not be as pretty as a ZenBook, but it's looks way better than the old IBM ThinkPads anyhow.

Of course I wanted to run Arch Linux on this baby so after some dribbling with Windows 8 freeing up enough space to install Linux I gave it a shot.
As always stuff changes and things like BIOS and MBR have been replaced by UEFI and GPT which made me spend more time than I expected on the initial steps of the installation process.

After having that sorted out the next hurdle to overcome was to successfully install dm-crypt + LUKS. That also required a bit of head banging until I stumble upon this great guide.

After that installing the rest of the software, including the best desktop environment out there: Cinnamon, went pretty smoothly. Much thanks to the fact that I'm having all my essential config files on Dropbox, which just meant creating a bunch of symlinks.

Another big issue was that the WiFi connection dropped every now and then. After talking to a friend with the same model he recommended disabling the n band, which made the connection much more stable.

A final issue was the notorious ClickPad which's kind of useless out of the box in Arch Linux. This nice blog post have a good Xorg config to make it a whole lot better.

I must admit that there was a weak moment during the installation process where I jealously glanced over at the people around me running OS X triumphing that everything "just worked". However, I know that this was an investment I will get back many times over now that I'm running a kick ass configuration that will take my productivity to even higher levels. I just hope I don't have to install a new Linux machine any time soon ;)

No more creations... here


The website

So I've decided to move my previously hosted creations to the one and only GitHub since it's such a brilliant site.
On that note, I'll not host any more stuff here, but have them all on external services (the cloud, baby).

P.S I've also added some new stuff on GitHub, be sure to check it out.

Syncing custom commands with Dropbox



Anybody that have used Linux for more than a while knows about the power of shell scripting.
I have currently 97 custom scripts in my bin folder. Most of these are just small combination of commands that I frequently use, but I've also have some more complicated scripts such as a script for switching the display to my TV screen and starting various HTPC services, increasing fonts on terminals and editors and so on.

As I'm running Arch Linux on several machines I looked for a way to sync my scripts and also have them always available.

The way I solved this was very simple. First I created a folder in my Dropbox called bin, then I added that folder to my $PATH variable.
You can do this either locally by adding

to your .bashrc file or you could add it globally by creating a new script in the /etc/profiles.d folder containing
export PATH=$PATH:/home/username/Dropbox/bin

where username is the name of the user that has Dropbox configured.

On track once more


Heroku Rails The website

On-track-once-more After having my HTPC running this website for couple of years it was time for a hardware upgrade. I'd just upgraded my main computer and was faced with two choices: either buy a new set of hardware or scrap the HTPC in favor of just using the main computer. I decided to go with the second choice since I always use the HTPC and my main computer mutually exclusive and then I only had one set of hardware and software to maintain.
One problem was what to to with the website. I could ether move it to my main computer and have it running 24/7 to my wife's big despair) or find some kind of online hosting solution.

After looking at solutions such as Google App Engine (no support for Rails 3 yet) and VPS (expensive) I finally found Heroku.

Heroku is super easy to get started with and offers awesome support for Rails 3. So after a bit of adjustments like porting from the current mySQL database to PostgrSQL I got the website up and running by just typing

$ git push heroku master

No more spinning



No-more-spinning One of my christmas presents this year was a gift certificate for one of our local computer stores. So I decided to upgrade my relatively new computer with a SSD drive. As always, finding new hardware is a bit like going through a jungle, with all the new standards and metrics of performance. So after a bit of researching I found a nice Corsair Force 3 240 GB.

So let's see here, the SSD supports Sata III with up to 550 MB/s read performance. Wow! But wait! My motherboard, which is only one and a half years old and was one of the more expensive ones with a promise to be somewhat future proof, does only support Sata II with a maximum speed of 285 MB/s. Damn you technology evolution! Oh well, I guess when the day comes for my motherboard to be upgraded to Sata III, at least my SSD disk won't be outdated just yet.

At first I actually thought about buying two disks, one 60 GB and one 128 GB, and installing Arch Linux on the small one and Windows 7 on the larger one. However, for a couple of hundreds more I were able to get ~50 GB more space and also be able to choose the exact distribution of the space used by Windows and Linux. It felt like a natural choise.

I created a 170 GB partion for Windows 7, which I thought would be enought for the operating system and all the programs and games I usally use. The rest, 53 GB, was dedicated to Arch Linux and this should also be more than enought based om my previous experiences. So now my old magnetic hard drive, together with a couple of equals, serve as data storage device for large files such as pictures and videos.

Finaly I ran some benchmark tests, using CrystalDiskMark, to justify spending a decent amount of money and going through the hassle of migrating system disk. These are the results:

Magnetic hard drive

4000 MB [C: 83.6% (100.0/119.7 GB)] (x5)

Sequential Read : 55.062 MB/s
Sequential Write : 61.470 MB/s
Random Read 512KB : 25.938 MB/s
Random Write 512KB : 29.118 MB/s
Random Read 4KB (QD=1) : 0.405 MB/s [98.9 IOPS]
Random Write 4KB (QD=1) : 0.863 MB/s [210.7 IOPS]
Random Read 4KB (QD=32) : 0.572 MB/s [139.5 IOPS]
Random Write 4KB (QD=32) : 0.774 MB/s [189.0 IOPS]

Solid state disk

4000 MB [C: 12.4% (21.3/170.9 GB)] (x5)

Sequential Read : 172.293 MB/s
Sequential Write : 205.633 MB/s
Random Read 512KB : 167.758 MB/s
Random Write 512KB : 206.796 MB/s
Random Read 4KB (QD=1) : 19.969 MB/s [4875.1 IOPS]
Random Write 4KB (QD=1) : 61.136 MB/s [14925.9 IOPS]
Random Read 4KB (QD=32) : 17.147 MB/s [4186.2 IOPS]
Random Write 4KB (QD=32) : 73.291 MB/s [7893.3 IOPS]

Clearly you can conclude that both read and write times has been improved significantly, especially when it comes ot random acces of small files where the new SSD is around 60 times faster than the old magnetic one.

So in summary, it was surely worth upgrading and you can really feel the performance boost in both applications and the overall performance of the operating system.