Table of Contents

DESCRIPTION

Notes on setting up Crostini Linux containers on ChromeOS.

See:

https://discuss.linuxcontainers.org/t/using-lxd-on-your-chromebook/3823

Crouton vs Crostini

Developer Mode

Resource Usage

Hardware Access

Crostini restricts hardware access.

The design of crostini protects the host OS (ChromeOS acting as a hypervisor) from the guest containers. Guest containers run arbitrary code. If this code can escape the container, it may be able to interfere with the web browser.

The downside of the crostini security controls is that USB devices must be explicitly whitelisted for use.

USB Serial

Serial Console

Serial ports can't be accessed directly from the container. A work around for using serial consoles is beagleterm.

Uploading Arduino/ESP8286 Firmware via USB Serial Interfaces

Some microcontrollers such as some of the arduinos are whitelisted. If not, firmware can't be uploaded.

The microcontroller code can still be written and compiled in the container.

A work around is connecting the microcontroller to a Raspberry Pi. A relatively portable setup is using a microcontroller attached to a Raspberry Pi Zero.

Attached Storage: Permissions

ext2 attached storage is mounted with root squash (root owned files on the file system are converted to the nobody/nogroup user). These files are not modifiable, even by the root user.

The permissions cause problems when burning Raspberry Pi OS images.

The boot partition is FAT and is writable:

Modifying the rootfs of a mounted partition on ChromeOS will fail due to permissions preventing customization of the image: hostname, headless installations, ...

Workaround: use another system such as another Raspberry Pi

Support of Multiple Linux Containers

Crostini installs a default Debian container named penguin. This container is assumed to exist by crostini and may cause problems if removed.

For example, after upgrading to a new Crostini release:

Both crouton and crostini support running multiple containers from different Linux images.

Setting Up A New Chromebook


(markdown)