Saturday, July 6, 2013

How to Install Ubuntu Linux on Your Chromebook with Crouton

linux-installed-on-chromebook
Chromebooks aren’t “just a browser” — they’re Linux laptops. You can easily install a full Linux desktop alongside Chrome OS and instantly switch between the two with a hotkey — no rebooting necessary.
We performed this process with the $249 Samsung Chromebook, also known as the Samsung Series 3 Chromebook. If you have another Chromebook, read on anyway — it’s the same process.

Crouton vs. ChrUbuntu

Installing Ubuntu Linux on your Chromebook isn’t as simple as installing the standard Ubuntu system — at least not at the moment. You’ll need to choose a project developed specially for your Chromebook. There are two popular options:
  • ChrUbuntuChrUbuntu is a Ubuntu system built for Chromebooks. It works like a traditional dual-boot system. You can restart your Chromebook and choose between Chrome OS and Ubuntu at boot time. ChrUbuntu can be installed on your Chromebook’s internal storage or on a USB device or SD card.
  • CroutonCrouton actually uses a “chroot” environment to run both Chrome OS and Ubuntu at the same time. Ubuntu runs alongside Chrome OS, so you can switch between Chrome OS and your standard Linux desktop environment with a keyboard shortcut. This gives you the ability to take advantage of both environments without any rebooting needed. Crouton allows you to use Chrome OS while having a standard Linux environment with all its command-line tools and desktop applications a few keystrokes away.
We’ll be using Crouton for this. It takes advantage the Linux system underlying Chrome OS to run both environments at once and is a much slicker experience than traditional dual-booting. Crouton uses Chrome OS’s standard drivers for your Chromebook’s hardware, so you shouldn’t run into issues with your touchpad or other hardware. Crouton was actually created by Google employee Dave Schneider.
When you use Crouton, you’re actually just running one operating system — Linux. However, you’re running two environments on top of the OS — Chrome OS and a traditional Linux desktop.

Enabling Developer Mode

Before you do any sort of hacking, you’ll need to enable “Developer Mode” on your Chromebook. Chromebooks are normally locked down for security, only booting properly signed operating systems, checking them for tampering, and preventing users and applications from modifying the underlying OS. Developer Mode allows you to disable all these security features, giving you a laptop you can tweak and play with to your heart’s content.
After enabling Developer Mode, you’ll be able to access a Linux terminal from within Chrome OS and do whatever you like.
To enable developer mode on the Samsung Chromebook or Chromebook Pixel, hold down the ESC and Refresh keys and tap the Power button. You’ll enter recovery mode. Older Chromebooks have physical developer switches that you’ll need to toggle instead.
At the recovery screen, press Ctrl+D, agree to the prompt, and you’ll boot into developer mode.
When you transition to developer mode, your Chromebook’s local data will be erased (just like when you unlock a Nexus Android device). This process took about 15 minutes on our system.
Whenever you boot your Chromebook, you’ll see a warning screen. You’ll need to press Ctrl+D or wait 30 seconds to continue booting.
This warning screen exists to alert you that a Chromebook is in developer mode and the normal security precautions don’t apply. For example, if you were using someone else’s Chromebook, you could normally log in with your Google account without fear. If it was in developer mode, it’s possible that software running in the background could be recording your keystrokes and monitoring your usage. That’s why Google makes it easy to tell if a Chromebook is in Developer Mode and doesn’t allow you to permanently disable this warning screen.

Installing Crouton

First, you’ll need to download Crouton. Click the following link to download the latest release of Crouton to your Chromebook: http://goo.gl/fd3zc
Once you have Crouton downloaded, press Ctrl+Alt+T in Chrome OS to open the crosh terminal.
Type shell into the terminal and press Enter to enter Linux shell mode. This command only works if Developer Mode is enabled.
To install Crouton the easy way, all you need to do is run the command below. This installs Crouton with the Xfce desktop and an encrypted chroot for security.
sudo sh -e ~/Downloads/crouton -t xfce
The actual installation process will take some time as the appropriate software is downloaded and installed — it took about half an hour on our system — but the process is largely automatic.
If you’d rather install Ubuntu’s Unity desktop instead, use -t unity instead of -t xfce in the command above. You can run the following command to see a list of installation types, including installations without a graphical desktop:
sh -e ~/Downloads/crouton
After going through the installation process, you can run either of the following commands to enter your Crouton session (assuming you installed Crouton with Xfce):
sudo enter-chroot startxfce4
sudo startxfce4
Switching Between Environments
To go switch back and forth between Chrome OS and your Linux desktop environment, use the following keyboard shortcuts:
  • ARM (like the Samsung Series 3 Chromebook): Ctrl+Alt+Shift+Back and Ctrl+Alt+Shift+Forward
  • Intel x86/AMD64 (like the Chromebook Pixel and $200 Acer Chromebook): Ctrl+Alt+Back and Ctrl+Alt+Forward plus Ctrl+Alt+Refresh
If you want to exit the chroot, just log out of the Xfce desktop (or the Unity desktop, if you’re using that). You’ll then need to run the startxfce4 command above to enter the chroot again.

What You Can Do With Linux

You now have a traditional Linux desktop running alongside Chrome OS. All that traditional Linux software is just an apt-get away in Ubuntu’s software repositories. Graphical utilities like local image editors, text editors, office suites, development tools, all the Linux terminal utilities you would want — they’re all easy to isntall.
You can even easily share files between Chrome OS and your Linux system. Just use the Downloads directory in your home folder. All files in the Downloads directory appear in the Files app on Chrome OS.
On an ARM Chromebook like the Samsung Chromebook, you’re a bit limited in what you can do. Some programs don’t run on ARM, so you can’t run Minecraft and other closed-source applications that haven’t been compiled for ARM Linux. You have access to a variety of open source tools and desktop applications that can be recompiled for ARM, but most closed-source applications won’t work on ARM.
On an Intel Chromebook, you have much more freedom. You could install Steam for Linux, Minecraft, Dropbox, and all the typical applications that work on the Linux desktop, using them alongside Chrome OS. This means that you could install Steam for Linux on a Chromebook Pixel and gain access to a whole other ecosystem of games — if you were crazy enough to buy a Chromebook Pixel, of course.
One last tip if you’re using Xfce — you’ll probably want to disable the screensaver from the Screensaver tool in Xfce’s settings menu. It appears to cause graphical glitches in Chrome OS while running in the background.

Removing Crouton and Restoring Your Chromebook

If you decide you’re done with Linux, you can easily get rid of the scary boot screen and get your internal storage space back.
Just reboot your Chromebook normally to get back to the scary warning screen at boot-up. Follow the prompts on your screen (tap the Space bar and then press Enter) to disable Developer Mode. When you disable Developer Mode, your Chromebook will clean everything up, restoring you to a clean, safe locked-down Chrome OS system and overwriting all the changes you’ve made to your Chromebook’s software.
Retweet this story

No comments:

Post a Comment