Chromebook, Ubuntu, Crostini and other containers
ChromeOS has nice support for running your own Linux distro in an LXC container. By default it installs Debian in a container named “penguin” and there’s a Terminal app to connect to a shell in it. I’d rather use Ubuntu. There’s lots of instructions on how to do this online but most of what you’ll find are using the outdated Crouton container environment.
The 2023 way of setting up Ubuntu on a Chromebook is with Crostini. This Reddit Wiki has thorough instructions. This article is also fairly good as is this outdated gist. It boils down to launching a special Termina shell to control containers. Then to install Ubuntu in a new container, then to install some Chromebook specific stuff, then to set up your user login.
All that being said I could easily set up a container with a different Linux distro but I couldn’t get it to connect nicely to the Terminal GUI app. This is all pretty complicated tinkerhacking. One reason I’m excited about ChromeOS is you don’t really need to do this kind of thing for an ordinary experience. But I’m being a little extra about a Linux environment.
Alternate distro support is a work in progress and there’s lots of notes about current development online. I stopped about here, which was instructions on telling Terminal how to connect to a different container. This is related to the crostini-multi-container flag in about:flags. That’s a feature that gives you a GUI for accessing multiple containers but is not complete. See also discussion here.
A failed Ubuntu install
Unfortunately the online instructions didn’t work for me with Ubuntu 23.04 and ChromeOS Beta 114.0.5735.18.
One problem is the Chromebook-specific stuff (cros-ui-config and friends) failed to install, either using the fancy script or just running “apt install” and hoping for the best. The Reddit Wiki has complicated instructions and a script for installing cros-ui-config. I guess the packages are still not working quite right but different hacks are needed than what that script did. These didn’t work for me with Ubuntu 23.04 and ChromeOS Beta 114.0.5735.18. Simply running apt install cros-ui-config got fairly far but failed in the end.
Worse, even a vanilla Ubuntu 23.04 install (without cros-tools) didn’t work right for me. It seemed to be fine, I could get a working shell with lxc exec. But then I couldn’t connect to it via the Terminal app, the little spinning progress thing ran and stalled without giving me a shell. It’s like whatever connects the ChromeOS UI to the containers wasn’t working. I couldn’t even completely wipe the Linux development environment from the Settings app, it also hung, although the wipe did work after a reboot. At least I didn’t have to powerwash the whole system and start over.
For now I’m just going to settle for Debian. When I feel like tinkering again I’ll revisit Ubuntu, maybe update this blog post.
Other containers and VMs in ChromeOS
It’s not just a Linux environment that uses a container on a Chromebook.
Modern Chromebooks run android apps in a container called ARCVM. I don’t know much about how this works, it’s all pretty opaque. Folks complained it uses more resources than the old method but it seems fine to me.
ChromeOS 108 got the ability to run Steam games. It does this with a VM environment called Borealis. From what I’ve read this is Ubuntu 18.10 and using Valve’s Proton stuff to emulate enough Windows API to run a lot of games. Ie: similar to what a SteamDeck is doing.
This is all a lot like what Windows does, btw; WSL is the Windows equivalent of Crostini, and Windows can run Android apps in a VM too.