codestarterorg / ubuntu-chromebook-installer

Codestarter installer for Ubuntu on Chromebooks
GNU Lesser General Public License v3.0
340 stars 32 forks source link

Codestarter installer for Ubuntu on Chromebooks

This script will install everything necessary to transform an Acer C720 into a Codestarter laptop. Primarily this involves partitioning the built-in SSD and installing Ubuntu along with various patches and Codestarter customizations.

Upon completion, you will be able to boot into both ChromeOS (ctrl + d) or Ubuntu (ctrl + l) from the developer mode boot screen.

For more back story on why we chose the Acer C720 and some of the Codestarter customizations, see our blog post at http://blog.codestarter.org/how-we-turn-199-chromebooks-into-ubuntu-based/.

Supported device(s)

Prerequisites

Install

ATTENTION: This will wipe everything on your device

Copy the Installer to a USB Drive

  1. Download the latest version of this installer and extract it to your USB drive.

Enable Developer Mode

  1. Brand new Chromebooks need to be plugged in the first time they are used, so go ahead an do that now. Then open up the laptop.
  2. As soon as you see the ChromeOS boot screen, hit esc + refresh + power (all three buttons are on the top row of keys; refresh is the 4th button from the left). Laptop will reboot.
  3. You will see a scary white screen. Hit ctrl + d.
  4. The text on the screen will change. Hit enter. Laptop will reboot.
  5. Hit ctrl + d again. It will now transition to developer mode, which takes about a minute. When done, it will reboot.
  6. On boot, your laptop will now always show a scary white screen that says "OS verification is OFF". Hit ctrl + d to boot to ChromeOS (or wait 30 seconds and it will boot to ChromeOS by default).

Read more about developer mode.

Run the Codestarter Script (Stage One)

  1. Once ChromeOS boots, connect to your wireless network and select Continue.
  2. Select Accept and continue.
  3. On the login screen, select browse as Guest in the right sidebar.
  4. Open a crosh shell by hitting ctrl + alt + t. A black browser window should open.
  5. Type shell and hit enter. The prompt should turn green.
  6. Insert the Codestarter USB drive. A window should pop up with the contents.
  7. Switch back to the shell window.
  8. Go to the location of the script on the removable media by typing: cd /media/removable/, then press tab tab on your keyboard to show and auto-complete your removable media path automatically, then type ubuntu-chromebook-installer-master/. In all, it should look something like this: cd /media/removable/USBDRIVE/ubuntu-chromebook-installer-master/. Hit enter.
  9. Type sudo bash main.sh and hit enter.
  10. You will be asked how much storage space you want to dedicate to Ubuntu. We suggest entering 10 if you don't plan to use ChromeOS much. Hit enter.
  11. The script will partition your drive and reboot after ten seconds.
  12. After reboot, you'll see a white screen with: "Your system is repairing itself". This is normal, and should only last a few seconds. Then your laptop will reboot again. Once it does, hit ctrl + d to boot to ChromeOS.

Run the Codestarter Script (Stage Two)

NOTE: Most of this step will look the same as the previous, as we are just re-running the installation script. It knows how to finish the job.

  1. Once ChromeOS boots, connect to your wireless network and select Continue.
  2. Select Accept and continue.
  3. On the login screen, select browse as Guest in the right sidebar.
  4. Open a crosh shell by hitting ctrl + alt + t. A black browser window should open.
  5. Type shell and hit enter. The prompt should turn green.
  6. Go to the location of the script on the removable media by typing: cd /media/removable/, then press tab tab on your keyboard to show and auto-complete your removable media path automatically, then type ubuntu-chromebook-installer-master/. In all, it should look something like this: cd /media/removable/USBDRIVE/ubuntu-chromebook-installer-master/. Hit enter.
  7. Type sudo bash main.sh and hit enter.
  8. Now would be a good time to plug in your laptop, if it isn't already.
  9. The script will finish the installation, which may take up to an hour (or more if you have a slow internet connection). It is fully automated, and you can safely step away while it installs. If your network drops out during the installation, you will need to reboot your laptop and redo this stage, except run sudo bash main.sh -n instead of the previously stated command (this will skip the partition phase, as that has already been done).
  10. When the script finishes, it will ask you to hit [ENTER], so hit enter.

Use your new Codestarter laptop!

  1. When your laptop reboots, hit ctrl + l to boot into Linux. You can also hit ctrl + d to boot into ChromeOS (or wait 30 seconds and it will boot to ChromeOS by default).
  2. On your first boot to Linux you will be asked to complete your system configuration (language, time zone, computer name) and create a user account.
  3. Congrats, you're done!
  4. BONUS: For a nicer experience, you can set up your machine to boot to Ubuntu by default.

Optional Stuff

Under the Input Devices tab, change Port to "Microphone (unplugged)".

Reinstall

If you need to reinstall Ubuntu on your Codestarter laptop, these instructions will get you there.

ATTENTION: This will wipe everything on your device

Copy the Installer to a USB Drive

  1. Download the latest version of this installer and extract it to your USB drive (with at least 1GB of free space).

Run the Codestarter Script

  1. Reboot your laptop and as soon as you see the white screen, hit ctrl + d.
  2. Once ChromeOS boots, login and make sure you're connected to the internet. It's ok to select browse as Guest in the right sidebar if you don't want to login with your Google account.
  3. Open a crosh shell by hitting ctrl + alt + t. A black browser window should open.
  4. Type shell and hit enter. The prompt should turn green.
  5. Go to the location of the script on the removable media by typing: cd /media/removable/, then press tab tab on your keyboard to show and auto-complete your removable media path automatically, then type ubuntu-chromebook-installer-master/. In all, it should look something like this: cd /media/removable/USBDRIVE/ubuntu-chromebook-installer-master/. Hit enter.
  6. Now would be a good time to plug in your laptop, if it isn't already.
  7. You may be asked to confirm that you want to write to an existing partition. If so, answer yes.
  8. The script will finish the installation, which may take up to an hour (or more if you have a slow internet connection). It is fully automated, and you can safely step away while it installs. If your network drops out during the installation, you will need to reboot your laptop and redo the reinstallation.
  9. When the script finishes, it will ask you to hit [ENTER], so hit enter.

Use your new Codestarter laptop!

  1. When your laptop reboots, hit ctrl + l to boot into Linux.
  2. On your first boot to Linux you will be asked to complete your system configuration (language, time zone, computer name) and create a user account.
  3. Congrats, you're done!

If by chance you hit the space bar on the OS verification screen

  1. Don't panic, you have reverted only your Chrome OS. The linux partition is still intact!
  2. Re-enable developer mode as before (instructions above)
  3. Reboot and instead of logging on with your password instead press ctl + alt + -> (the forward button)
  4. logon as chronos
  5. type the following to re-enable linux boot sudo crossystem dev_boot_usb=1 dev_boot_legacy=1 press enter
  6. type sudo reboot (you should now be able to press ctrl + l to boot into Linux.)

Credit(s)