Friday, 28 October 2011

Installing Ubuntu on Samsung Series 5 Chromebook

Chromebook is a nice concept coupled with a sleek, fast, compact but yet capable OS, the ChromeOS. Both Samsung and Acer had released Chromebook models which are relatively cheap but still has good design, quite portable with great battery life. Google also gave away Samsung Series 5 Chromebooks to all attendees of Google I/O 2011 which I also qualified to receive one.

For those who had tried ChromeOS before would already know that it is just a browser built on top of a slimmed linux. It does not let you install apps other than chrome apps and not even has a desktop. However you can still save files and access the file system through the browser. Although in the era of the tablets it might seem a little weird, very soon I realized Chromebook is not a device to replace your laptop or your tablet. It is much lighter and portable than a laptop with great battery life but does not allow you wide variety of apps. Meanwhile it is heavier and chunkier than a tablet and lacks of a touch display but it does have a real browser, an accesible file system and a real keyboard.

So Chromebook is unique concept which can be placed between your laptop and your tablet.

However using ChromeOS for a while, I started feeling the need of using an IDE and since I would be having a trip to Antwerp for Devoxx, I thought it is time to install Ubuntu on my Series 5.

If you google to find out how to install ubuntu on chromebook you will end up with great articles describing how to do it for CR-48. Although most of the procedures will be the same, there are still some differences which may cause some troubles. Instead of using a CR48 tutorial and google for the problems follow this post and the links for a smoother experience.

I will mainly follow this tutorial which is a great but for CR48.

1. First you need to get root! Unless most CR48 tutorials will guide you to remove battery actually it is much simpler on Samsung Series 5 Chromebooks. On the right side of the device while the display is facing you, you will find a cover just next to the usb port. You will find a tiny switch just next to the sim slot. Find a needle and gently push the switch towards the sim slot. Be careful since the switch is very gentle and tiny, you may easily break it which I did :). 
2. Reboot the device. Press Ctrl+D but do not login. Press CTRL+ALT+F2 (the right arrow on top where F2 should be).
3. Login as user chronos, without any password.
4. Run "sudo bash" and "chromeos-firmwareupdate --mode=todev"
5. Run "wget http://goo.gl/hnkxo; sudo sh hnkxo". This script will ask you how you want to shrink the partition of ChromeOS for installing Ubuntu. The default and recommended option is 9gbs. I am not sure if CR48 has same ssd size with the series 5 but I still used the default value. You may choose any size in increments of 1 at your own risk. After you choose the size the script will repartion the drive. It might take up to 15 minutes so do not turn off your device even there is no activity.
6.  Go through the setup process until you get to the login page. Be sure you are connected to wifi and follow the steps 2 and 3 again. Once again run "wget http://goo.gl/hnkxo; sudo sh hnkxo". This time the script will start downloading Ubuntu 11.04 image which was prepared by Jay Lee.
7. The script will download 52 files at total of 1.1gb. If you lose connectivity or run out of battery, just re run the script and it will find out where its left.
8. The script will make few more updates and your device will restart.
9. If you do not see Ubuntu running follow steps 2,3,4 again.
10. Login to ubuntu using user "user" and password "user".
11. Open a terminal window and run "sudo resize2fs -p /dev/sda7" to finalize resizing your partitions.
12. Although you are in Ubuntu, it is not the default OS for the boot. To enable an easy switch between Ubuntu and Chrome OS, we will follow this steps.
13. In ubuntu, navigate to home folder and press ctrl+h.
14. Double click .bashrc and add "alias chromeos='sudo cgpt add -i 6 -P 0 -S 0 /dev/sda;sudo reboot' " to the bottom of the file.
15. Save the file. Open a terminal and type "chromeos".
16. When device boots into ChromeOS, press CTRL+ALT+F2 and login as chronos.
17. Run "sudo vim .profile" and press letter 'i'.
18. Type "alias ubuntu='sudo cgpt add -i 6 -P 5 -S 1 /dev/sda;sudo reboot' ". Then press esc and press shift+z twice. You should be in the console and saved the file.
19. Type "exit" and type "chronos" to login again.
20. Type "ubuntu" to boot in ubuntu again!

If you have any problems you can contact me and check the original links:
http://chromeos-cr48.blogspot.com/2011/04/ubuntu-1104-for-cr-48-is-ready.html
http://cr-48.wikispaces.com/Dual+Boot+Shortcuts