Sunday, December 26, 2010

Easy way to install Ubuntu on your Cr-48

Update: You should probably use the new ChrUbuntu 12.04 Install Guide instead of this one. This guide will not work on Chromebooks updated to Chrome OS version 19 or higher which will be virtually all Chromebooks by June of 2012.

Google has made it clear from day one that the Cr-48 is an open laptop. In fact, a Google Engineer has posted instructions on getting Ubuntu 10.10 running on the Cr-48. But while the process is described in great detail, it's not exactly easy. Thus I've made a much simpler install process that carries out the same steps via an automated script:

Update: This process WILL DESTROY all data on your Cr-48 and set it back to Factory defaults. Additionally, if something goes wrong, your Cr-48 may be left in an unusable state until you recover. I strongly suggest that you create a recovery drive before trying this so that you're prepared in case of failure or if you just want to go back to regular Chrome OS. You and you alone are responsible for any issues, damage or nuclear warfare that results from following this process.
  1. Get root. (also known as Developer mode)
  2. Reboot your Cr-48 but don't login. Make sure you have a WiFi or USB Ethernet connection at this point. 3G is not recommended. Press CTRL+ALT+=> (=> is the forward arrow where the F2 key used to be). We can't use the normal CTRL+ALT+T method to get a shell because can't have any users logged in while we repartition and make room for Ubuntu.
  3. Login as user chronos, no password is needed.
  4. Run "sudo su -" to get a root shell prompt.
  5. Run "wget -O - http://goo.gl/DlmZS | sh -". Most people having issues aren't typing this command *EXACTLY* as it needs to be. The command needs to be exactly "wget<space>dashO(uppercase letter o, not number zero)<space><dash><space>http://goo.gl/DlmZS(case sensitive)<space>|(shift and the key above the Enter key)<space>sh<space>dash". If you get a "not found" error, make sure you have Internet connectivity.
  6. The first time through, the script will resize your partitions to make room for Ubuntu. It may look like the Cr-48 is doing nothing for 10-15 minutes but let it be, after awhile it will reboot and re-initialize the stateful partiiton (told you it was going to wipe your data). This process takes about 5 minutes and then the Cr-48 reboots again and shows you the Welcome screen you got when you first turned on your Cr-48 out of the box.
  7. Go through the setup process until you get to the Google login page. You'll need to have a WiFi or Ethernet Connection again at this point. 3G is not recommended. Now follow steps 2 through 5 again (minus the reboot). This time the script will see that you've already made room for Ubuntu and will start downloading the Ubuntu image and copying it to the SSD.
  8. There are 52 100mb files to be downloaded. Each is compressed so the actual download size ranges from less than 1mb in size to 90mb in size. The total size of all the files is about 1.2gb compressed and 5gb uncompressed so the download and install will take awhile. The files are named ubuntu.binXX.bz2 (where XX is aa, ab, ac, ad, ae, af... ba, bb, bc... all the way to bz). If you want to see how big each piece is, take a look here.
  9. The script keeps track of which of the 52 files have been successfully installed so if you lose Internet connectivity, or the battery dies (you should be plugged in BTW), etc, just re-run Step 5 and it should resume where it left off.
  10. After all 52 files have been downloaded and copied to the SSD, the script will make a few more updates to your Cr-48 and then reboot.
  11. You'll see Ubuntu 10.10 start up! The 1st run it'll complain about an unclean shutdown, check the filesystem and reboot. This is normal. On the 2nd boot, you should see the Ubuntu 10.10 desktop autologin! The username is "user" and the password is "user" if you need to make changes.
  12. Right now, you're in Ubuntu but if you reboot, you'll be back in Chrome OS. To make Ubuntu the default, run "sudo cgpt add -i 6 -P 5 -S 1 /dev/sda" (password is "user"). It should be possible to run this from Ubuntu or Chrome OS.
  13. To make Chrome OS the default again, either pull the battery and turn off Developer Mode, or run "sudo cgpt add -i 6 -P 0 -S 1 /dev/sda".
Update: If you're seeing very slow download speeds (10-15k/sec), check your WiFi settings, if you're using WPA or WPA2 encryption, make sure your router is set to use AES, not TKIP (should be the default for WPA2, might not be possible with WPA). There is currently a bug that causes very slow WiFi speeds with WPA TKIP.