Thursday, June 30, 2016

Chromebook (+ Crouton) - first impression

I have been considering whether to buy an Android tablet with a keyboard or a Chromebook. While most of what I need to do at home on a daily basis can be done inside a browser on either a tablet or a Chromebook, two interesting Chromebook "features" swayed my decision: 1) one can supposedly run Linux on Chromebooks 2) one will soon be able to run Android apps inside ChromeOS. So I went and bought an ACER CB5-311 Chromebook. At £140, it is certainly very competitively priced.


During the first two days, I

  • used the browser heavily for GMail, GDocs, Slack, and Evernote
  • published my first Medium post
  • used Pixlr Web to do a fair amount of image editing
  • installed Ubuntu via Crouton
  • installed Heroku CLI inside Ubuntu to create a Git clone of my website
  • used Zed Code Editor for editing some of these HTML and JS files inside ChromeOS
  • pushed these changes live using Git inside Ubuntu

The physical experience of using the Acer Chromebook is a far cry from that of using a MacBook Air. E.g. the touch-pad action isn't great and why is it that only Apple can design a light-weight laptop that can be opened with one hand?! But at this low price, I am actually quite impressed.

Installing Ubuntu (without a Desktop Environment)


I will write a bit about my experience installing Ubuntu using Crouton, which is a script to generate Ubuntu/Debian chroot inside ChromeOS. I was reading quite a bit about Crouton before buying the Chromebook, and initially it all seemed a bit confusing. But as it turned out, the installation was plain sailing.

First of all, I read that 1) x86 processor 2) 32Gb storage and 3) 4Gb RAM are what are required to run Linux on Chromebooks. I understand that the x86 requirement is an architectural one. My Chromebook came proudly with a "Intel Inside" sticker, so I should be fine. On the other hand, my budget machine only had 16Gb of storage and 2Gb of RAM. But it should at least cope fine with a bare-bone installation of Ubuntu? For what I have to do, I don't really need a graphical interface.

Enable ChromeOS Developer mode


The first thing one needs to do is enable Developer mode. Refer to this page to see how to do it on various machines. Warning: switching between normal and developer modes will erase your ChromeOS account setting! One thing I found was that after pressing Ctrl-D in Recovery mode to enter Developer mode, my machine appeared to be doing nothing for up to half a minute before it finally rebooted. Just wait until it reboots by itself!

Note that, once you have committed to Developer mode, every time you boot up the machine, you will be presented with the "scary" warning message and a delay. You can bypass the delay by again pressing Ctrl-D at this point.

Download Crouton


Get it from https://github.com/dnschneid/crouton.

Open a shell


Inside ChromeOS,
  1. Ctrl-Alt-T
  2. type shell
  3. press ENTER

Install Ubuntu without a desktop environment


Inside the shell, run sudo sh ~/Downloads/crouton -t cli-extra

Instead of specifying xfce as the target to install the Xfce Desktop Environment, I chose to install Ubuntu with the cli-extra target to keep the installation small.

When asked for a new username and password, pick something sensible. You will need the password when you do sudo in Ubuntu in the future.

Log into Ubuntu


Once the installation has completed, just sudo enter-chroot to log into Ubuntu!

Proof that it has worked :)

When you are done, just type exit inside Ubuntu to log out. Your Ubuntu installation is safely saved inside your machine storage.

Final words


I am impressed with how Ubuntu runs on my Chromebook so far. I am able to have the Ubuntu session open, alongside a number of Chrome tabs, and see no noticeable performance issues. I like the fact that the ChromeOS Downloads folder is automatically mapped to ~/Downloads inside Ubuntu, and that copy-and-pasting works well between the two OS's.

However, there is one thing I still wish for, and it is the ability to run Docker. From what I have read so far, this is not going to be an easy task, as it would involve some serious kernel customisation...