Sunday, May 12, 2013

Ubuntu Linux on Chromebook: Crouton vs ChrUbuntu, or installing over Chrome OS or dual booting.

For the end of the term at the University, I've decided to bring with me my Chromebook (Samsung Series 5). I am on a computer science degree, so I must sometimes act like I am a power user or at least, have access to ssh, plus a X client. Therefore, it seemed obvious that I sometimes needed to have a desktop environment able to run native applications (e.g java), plus the X thing via ssh. Okay, Chrome OS is somehow able to do ssh and some sort of X server-client thing, because it's still a Linux operating system underneath, but it's not brilliant at that. 

Before starting anything, I need to say that I am not responsible for anything that happens to your computer by following what I will say. You are doing everything on your own responsibility. Everything is specifically designed for Samsung Chromebook Series 5. It might apply to other machines, or it might not. Please check the sources carefully before doing anything.

One vs. another.

Just to make everything clear: 
  • ChrUbuntu is installed on a removable storage, so it doesn't touch the internal storage or alter it.
  • crouton is installed on the internal storage, so it *might* touch the internal storage.

My recommendation is crouton, for a number of reasons I will enumerate in the section designed to it. ChrUbuntu is probably easier to install, and easier to use, but it has some fundamental drawbacks which make it a bit annoying. For crouton, you'll probably need to use the terminal a little bit, but it's really not that much to be afraid of.

However, because ChrUbuntu is installed on a removable storage, all you have to do in order to get rid of it is to format that storage. This is rather easy, and won't affect the existing Chrome OS installation from the internal storage at all. For crouton, there are some commands to run in Chrome OS in order to remove it, because it installed on the internal storage of the Chromebook. This can get risky sometimes, and if something goes wrong, the only way to recover is to get back to the original state of the storage, and that is to wipe everything and set-up as a new Chromebook.

Fortunately, on Samsung Series 5, there is a hardware switch which just turns off developer mode, and so it wipes the internal storage completely. It might be this easy on other Chromebooks also, but I am not sure about this matter. I advise you to search a little more on recovery for your Chromebook before doing anything.


First off, I tried to install ChrUbuntu. ChrUbuntu is a quite nice thing, it runs, as I have already told, on a USB flash drive or on a SD card, and you basically dual-boot in order to be able to get into Ubuntu. Yes, you need to reboot for that, so you don't have both running on the same time. 


Technically, to get anything working you need to follow everything from (this is the official ChrUbuntu website) (here), except that at point number 4, you MUST replace the command with the one you get from (here), according to your device and according to where you are installing it (USB flash or SD card). That is all.

Note: turning on developer mode will remove everything from the internal storage!

Luckily, it's not a very hard process (even though at first sight is seems so), and it should be easily reversible in most cases. Unfortunately, after a month, my USB drive stopped working (applications were reporting I/O errors when it happened), and after a reboot it failed to boot anymore in ChrUbuntu. I've seen some other people complaining about this, I don't know if it's only the flash drive which has been broken, if it's related to ChrUbuntu, or if something from the operating system got broken. Anyway, Chrome OS was just fine. 

Booting it up.

What I should mention here is how ChrUbuntu is supposed to start. When you first start the Chromebook, you'll get a warning screen with a "scary" face. At this point, you have three options:
  • Wait for about 30 seconds and it will beep two times, and boot Chrome OS.
  • Hit Ctrl + D -> instantly boot Chrome OS.
  • Hit Ctrl + U -> boot Ubuntu.
Nothing that complicated at all. If you hit Ctrl + U and the installation of Ubuntu is not present, than it will beep so that you know that it can't boot.

Good and bad points.

+ Ubuntu runs exactly like on a regular computer.
+ so you can do (almost, look below) anything you would do on any other machine running Ubuntu.
+ the guy who created ChrUbuntu took care of the drivers, everything is working fine (on my machine at least).
+ little or no maintenance to involved, so might be suitable for people not willing to touch the terminal at all.
+ nothing really altered on the internal storage (except when you first turn on developer mode).

- it's only Ubuntu 12.04, not one of the latest versions.
- because it's installed on a USB drive (2.0 is supported only), or on a SD card, it's deadly slow.
- limited to the maximum speed of the medium it's installed on.
- requires a medium of at least 8 GB, about 2 GB will be free after installation.
- has no swap partition, so when you get out RAM...well, Chrome and other applications will eventually crash, or lag being very bad.


It's a bit more complicated, but the huge advantage is that it runs on top of Chrome OS, and in the same time with Chrome OS. Therefore, it uses the kernel provided by Chrome OS, all the drivers from Chrome OS, and everything else that is provided by Chrome OS, and so everything should be working just fine and it's extremely fast. When I say extremely fast, I mean that it's one of the fastest experiences I've seen to date on a computer running Ubuntu (this is on just 2 GB of RAM and a dual-core Intel Atom processor running at just 1.6GHz!). 

Important here: just don't do the silly thing of installing Xfce instead of Unity. Xfce is just awful. It has the worst interface I've seen, it's not attractive at all, half of the icons are broken etc etc etc. Go for Unity from the beginning. I did the silly thing, and it seems that there are some "traces" from Xfce on my installation of Unity, and it's sometimes annoying, but I can still do whatever I want because I have the terminal available. 

Actually, forget what I said above. Xfce works actually quite well, and it is worth to give it a try. It will be significantly faster than with Unity, but I still think that Unity will give higher productivity. It's really up to you. Please note that you must use "xfce" wherever you see "unity" in this guide, and start it using "sudo startxfce4" after installation.


For the installation, follow the first point from ChrUbuntu for your own Chromebook, that is, just to turn on developer mode. I repeat, from (here), follow just the first point!

Then, from (here), download the package provided. 

Afterwards, follow the guide from (here, same as before but at another heading), but for the point 2, type "unity" instead of "xfce". This will install Unity. For point 4), type "sudo startunity", and Unity will start. Everything else is the same.

Note: logging off does not work for me, for some reason. If this is the case for you, to close Unity, just hit Ctrl + Alt + Back to get back to Chrome OS, and then, in the crosh window in which Unity is running, hit Ctrl + C. This is not a very elegant way of closing it, but it should kill it pretty okay.

Starting it up.

Just as with ChrUbuntu, when you power up your Chromebook, you will get the "scary" face warning. But now, you can wait for 30 seconds and Chrome OS will boot automatically, or you can hit Ctrl + D and it will boot Chrome OS at that moment.

When you want to start unity from now on, hit Ctrl + Alt + T. This will open a crosh window on Chrome OS. There, type "shell". Afterwards, type "sudo startunity", just as before, and it should start.

To close it, try to click logoff. If it doesn't work, then go to Chrome OS, and in the crosh window, hit Ctrl + C.

Good points and bad points of this method.

+ it runs on top of Chrome OS, in the same time with it.
+ easily switch between them.
+ everything is guaranteed to work.
+ performance is absolutely astonishing, as everything is optimized for Chrome OS.
+ Unity + my apps apps add up to about 2 GB, leaving around 8 GB of free storage.
+ unified storage, so each OS can easily manage the files.

- it's only Ubuntu 12.04.
- can be a bit too technical for some users.
- in my experience, I had to use the terminal quite a little bit.
- uses internal storage (not excessively much).
- resources are shared, but I could not notice any difference.


I've seen a lot of people complaining about the Chrome OS not being a complete operating system, about not knowing to do that and that, about being too minimalist and so on. With the possibility of having Linux working on a Chromebook, this completely vanishes. It's definitely not a solution which satisfies anyone, at least not on my machine. I am expecting it to work much better on the Series 5 550, the newer generation of Chromebooks that has the Celeron processor and double the amount of RAM.

However, it transforms the Chromebook into a computer that is capable of handling almost all the tasks a home or a power user would need to perform.

If you have any kind of questions, I will answer them here. I will try to look regularly for this on this particular post. I think that almost anything you would need can be found just by searching on Google, but if you still need help, I am here and I will try to provide it.