Install Ubuntu on a Chromebook

Key Value
Summary Learn how to install Ubuntu 16.04 LTS in a chroot on Chromebooks, using the third-party crouton tool.
Categories desktop
Difficulty 3
Author Canonical Web Team webteam@canonical.com

Overview

Duration: 2:00

Today we’ll be installing Ubuntu on your Chromebook, while preserving your original ChromeOS system.

We will use a third-party script called crouton to install Ubuntu using a chroot, giving Ubuntu its own “pretend” root directory system on your machine. This lets you run ChromeOS and Ubuntu side-by-side, being able to flip between the two on-the-fly.

What you’ll learn

  • How to put your Chromebook into developer mode
  • How to install Ubuntu in a chroot on it
  • Practical and entertaining uses for Ubuntu on Chromebooks

What you’ll need

  • A Chromebook (Intel/ARM CPU)
  • Some basic command-line knowledge
  • At least 1 GB of free storage space

crouton is not part of the Ubuntu project
While we love the value that crouton provides, please note that crouton is a third-party script. It is not provided by nor supported by Canonical nor by the Ubuntu project. Updates to Chrome OS may also make Ubuntu installations inaccessible, as has happened in the past. Use of crouton is at your own risk.

NVidia Tegra CPUs
The Tegra CPU needs additional drivers not covered in this tutorial. We will add a tutorial covering this in the future (or why not contribute one?).

Originally authored by Canonical Web Team

Enabling Developer Mode

Duration: 4:00

By default, Chromebooks don’t allow us to use chroots out-of-the-box. We will need to put our machine into Developer Mode to grant us this power.

Before Getting Started
Placing your device into Developer Mode will wipe all data and user information from it. Since ChromeOS is an online-centric operating system, the vast majority of your data will be stored remotely, but make sure you’ve backed up everything important that’s local to your machine before you begin. This could include important data like any files you’ve downloaded, or locally cached passwords. The use of Developer Mode may void your Chromebook’s warranty.

To get to Developer Mode, we need to first reboot into Recovery Mode. On most Chromebooks, you do so by turning the device off, then holding down the ESC and Refresh keys while you press the Power button.

Once in this mode, press Ctrl-D. You will be prompted with an opportunity to “turn OS verification OFF”. Press Enter to do so.

When you boot up your Chromebook, it will begin with a warning screen noting that “OS verification is OFF”. You will need to press Ctrl-D to continue. Your device will now transition to Developer Mode.

Every boot thereafter will also begin with that warning screen, and a need to press Ctrl-D to continue. Do not follow the onscreen instructions to turn OS verification on, or you risk wiping your machine’s data and turning Developer Mode off.

Installing Ubuntu with crouton

Duration: 4:00

Empowered with Developer Mode, we will download the crouton script at this link.

Then we will open up a shell by pressing Ctrl-Alt-T, and then typing shell. Now we have a full bash shell at our fingertips.

For a simple setup, we’re going to type sudo sh ~/Downloads/crouton -t unity. This will download the Ubuntu 16.04 packages with the default Unity desktop environment.

You’ll see your terminal processing these packages one by one. This will take some time, so feel free to browse the web on ChromeOS, have a snack, or browse the web while having a snack.

Alternative Installation Options
Depending on the specification of your device, the Unity desktop may be too demanding to work well for you. If you want a more lightweight system, you can install LXDE or XFCE by replacing -t unity with -t lxde or -t xfce. GNOME fans can also try -t gnome instead. You can also encrypt your chroot with a passphrase by adding -e to the end of the installation command before excuting it. This will require that you type in the encryption password you’ve chosen each time you enter the chroot environment.

Switching between OSes

Duration: 2:00

With the installation complete, you will be prompted to enter a username and a password. You will then be brought into a bare-bones Ubuntu setup.

Pressing Ctrl-Alt-Shift-Back and Ctrl-Alt-Shift-Forward will rotate you between ChromeOS and Ubuntu. Logging out of Ubuntu will drop you back into the ChromeOS terminal tab that ran the system.

You can get back to Ubuntu in future sessions by typing sudo startunity into your bash shell.

Practical and fun uses for your system

Duration: 3:00

Like playing games? sudo apt install steam in a terminal gets you Valve’s Steam gaming client for Linux-based desktop gaming on your Chromebook. If you’re not a previous Steam user, you’ll need to register an account.

Enjoy irony? sudo apt install firefox. Have fun running Firefox on ChromeOS!

Want to browse for other ideas? sudo apt install gnome-software ubuntu-software gets you the Software tool for access to a wide variety of useful applications. Install LibreOffice for full office productivity, GIMP for desktop image editing, Audacity for audio editng, or Kodi for your multimedia enjoyment. If you’re a developer, install your IDE of choice and hack away!

Really, practically anything you could run on a “real Ubuntu laptop” could be run here. Have fun!

Conclusion

Duration: 1:30

Next steps

  • The crouton project is active on GitHub. More documentation is available there to use the tool in additional ways.
  • If you need support, Reddit’s ChromeOS community at r/chromeos is helpful, with many crouton users active there.

Further readings

  • Read more about the project on its GitHub page.
  • Look up how to get your particular device into Developer Mode here.
1 Like

I proposed an edit to the warning that crouton is a third-party project stating that some users lost data after some Chrome OS updates. I did not care about this and thought these users must have done something wrong until I saw one of my Chromebooks stating that it has applied an update and that it will clean some things up—I’m paraphrasing here—to ensure everything is safe, tidy and fast.

Also the title should clarify that this is about crouton.

Alternatives are:

  • Crostini
    This is the official Linux Apps (Beta) feature building up on a locked down VM in Chrome OS which runs LXD which runs a Debian Container. It can also run Ubuntu images quite well, see instructions in the subreddit.
    Developer mode not required.

  • chrx.org
    This installs Ubuntu or other Linux Distributions to a separate disk partition with the respective OS kernel provided by the distributor. Some hardware is missing support, usually audio.
    Developer mode required.

Page 2 - suggest at the end you make it clear that you’ll be logging back into chromeOS to download the crouton script. I was expecting a terminal and that might put some users off

how to install crouton has changed.

1 Like

I think you should explain how to install crouton with newer versions of ubuntu ex: 18.04, 20.o4.

1 Like

what do you put into the password thingy

The github instructions list out the new installation method.

after Downloading you need to
sudo install -Dt /user/local/bin -m 755 ~/Downloads/crouton

then

sudo crouton -t “interface of your choosing”

I find that this procedure does not work for a ChromeBox, only because it has a standard computer keyboard, so it it is not possible to hold the Refresh key to put the system into developer mode. My Chromebox is a Dell 3010, and there is no useful information I can find that is specific to this model from the manufacturer. It is likely that all Chromeboxes will have this same problem, so the workaround needs to be included in the procedure. Thank you.

1 Like

unity-unsupported
unity is unsupported on ARM for releases after precise.

/Downloads/ is a noexec mount. To get around this please use the following:
mv ~/Downloads/crouton /usr/local/
sudo sh /usr/local/crouton -t unity

1 Like

The crouton README.md is even 1 better, would be good to use that here: https://github.com/dnschneid/crouton#the-easy-way-assuming-you-want-an-ubuntu-lts-with-xfce

  1. Download crouton
  2. Open a shell (Ctrl+Alt+T, type shell and hit enter)
  3. Copy the installer to an executable location by running sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton
1 Like

This tutorial is outdated.

1 Like

Unable to make this work. [Acer CXI4-C54G ChromeOS 111.0.5563.71]

Used paperclip method of getting to recovery screen as described in Youtube video by LonTV. Attained developer mode, script download and shell as described herein. Then…

chronos@localhost / $ ls -l ~/Downloads/crouton
-rw-r--r--. 1 chronos chronos 4040 Mar 19 19:54 /home/chronos/user/Downloads/crouton

chronos@localhost / $ sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton

chronos@localhost / $ ls -l /usr/local/bin/crouton
-rwxr-xr-x. 1 root root 4040 Mar 19 19:56 /usr/local/bin/crouton

chronos@localhost / $ sudo crouton -t xfce
Downloading latest crouton installer...
curl: (28) Resolving timed out after 60002 milliseconds  #   #  #       
Warning: Problem : timeout. Will retry in 1 seconds. 2 retries left.
curl: (28) Resolving timed out after 60002 milliseconds                 
Warning: Problem : timeout. Will retry in 2 seconds. 1 retries left.
curl: (28) Resolving timed out after 60001 milliseconds                 

Failed to download crouton installer.
Check your internet connection or proxy settings (-P) and try again.
chronos@localhost / $ 

I have tried this several different ways with the same result each time. I’m pretty sure there is nothing wrong with my internet connection as it is working fine for several other applications.

As neither my recovery mode screen nor my developer mode screen look or act as in all the videos I’ve watched and pictures I’ve seen, I am suspecting that my latest update from Google is the source of the problem.

If anyone can see what I am doing wrong or offer a workaround to my problem, I would be greatly appreciative.

I’ve discovered the problem, (through hours of trial and error, research and code examination).

In analyzing the code of the crouton installer as properly installed to my /usr/local/bin folder, I determined that all the messages I was getting came from, immediately before or immediately following the script’s ‘curl’ command. I checked the version of ‘curl’ on my Chromebox and found it to have been released in October of 2022. I was running the lastest ChromeOS, (111), which had come out in March of 2023 and included the recently updated ‘curl’.

I backed my Chromebox up to release 103, checked the release date of ‘curl’ and found it to be about a year earlier. I ran crouton on that release and it operated as expected. (Crouton should probably be updated to test the version of ‘curl’ being run and change the calling sequence as required.)

That, however, presented me with new problems. With any -t of anything other than ‘xfce’, I was not able to get a graphical screen at all, and the ‘xfce’ screen was, in my opinion, totally inadequate for use with a 32", 720p, smart TV as monitor).

After trying many different things, I have given up on ‘crouton’. I have tried ‘chrx’ and although I seem to be able to install anything, (and by hand coding ‘grub’, can even get a semblance of a boot). However, my recovery screen and developer screen look nothing like the examples in the many tutorials I have tried, and most significantly, ctrl-L, instead of launching the alternate OS, brings up a Tianacore menu with none of the five options on it containing anything even vaguely close to what is needed.

I only launched on this campaign in order to avoid Google’s constant changing of ChromeOS over what they call ‘security’ matters, which have locked out several apps that I use regularly. Most of what I run are linux only apps that I run on the Crostini virtual engine, (Blender, Gimp and Libre Office), so turning my machine into a more Linux like box seemed the right direction.

It appears, however, that Google saw me, (and many others), going in this direction, away from the way they make their money, and have been changing their system in ways that make it difficult if not impossible to do so.

I am on my second Chrome device, but because of the difficulties I have recently had, there will not be a third. (And I’m probably using my last Pixel phone for the same reason.)

1 Like

@winger another option is to replace ChromeOS and the depthcharge bootloader on the device with the MrChromebox full UEFI firmware and use the machine however you set fit without worrying about Google’s updates.

I’ve had good luck with Crouton even when there have been hiccups, and several times I’ve had to fire it up to work around limitations in Crostini like you mentioned, but the capabilities of Crostini within the security boundaries of ChromeOS are definitely mind blowing when I see how far they’ve come.

The tutorial needs to be updated for newer versions of Chrome OS (i.e. after Sept 19, 2023). I got this from Google’s chromeOS support forum:

If you’re using verson M117+ then you will no longer have the ’sudo ’ command to gain root permissions.

As you have already discovered this, when you attempt to run sudo in the crosh shell, you get this message:

sudo: The "no new privileges" flag is set, which prevents sudo from running as root.
sudo: If sudo is running in a container, you may need to adjust the container configuration to disable the flag.

You will now have to use VT-2 the Developer Console as root or chronos with ‘sudo’ to gain root permissions (or rebuild the image) as the message below shows when you open a crosh shell session:

crosh> shell
Sudo commands will not succeed by default.
If you want to use sudo commands, use the VT-2 shell
(Ctrl-Alt-{F2/Right arrow/Refresh}) or build the image with the
login_enable_crosh_sudo USE flag:

$ USE=login_enable_crosh_sudo emerge-$BOARD chromeos-login
or
$ USE=login_enable_crosh_sudo cros build-packages --board=$BOARD

In other words, you’ll have to run crouton and other apps requiring root or chronos with ‘sudo’ from a VT-2 Console which is really not recommended.

Hopefully this is useful. :slight_smile:

-Ryan