crouton_Penguin is a set of scripts that bundle up into an easy-to-use, Chromium OS-centric chroot generator. Currently Ubuntu and Debian are supported (using debootstrap behind the scenes), but "Chromium OS Debian, Ubuntu, and Probably Other Distros Eventually Chroot Environment" doesn't acronymize as well (crodupodece is admittedly pretty fun to say, though).
:warning: Steps to install crouton have changed! :warning:
Due to improved security within Chromium OS (yay!), the steps needed to launch the crouton installer, and the steps to run crouton from SD cards have to change a little.
the mount point have to be exec mnt.sh
Please read the relevant sections of this README carefully, and reach out to your favorite weblogger/tutorialer/videotuber to update their guides if they're behind the times. If you're successful, brag about your accomplishments in the issue tracker and earn the personal gratitude of the crouton authors*!
* limit one (1) gratitude per commenter
WHOA
Ok, back to business.
It stands for ChRomium Os Universal chrooT envirONment ...or something like that. Do capitals really matter if caps-lock has been (mostly) banished, and the keycaps are all lower-case?
Moving on...
Anyone who wants to run straight Linux on their Chromium OS device, and doesn't care about physical security. You're also better off having some knowledge of Linux tools and the command line in case things go funny, but it's not strictly necessary.
Like virtualization, chroots provide the guest OS with their own, segregated file system to run in, allowing applications to run in a different binary environment from the host OS. Unlike virtualization, you are not booting a second OS; instead, the guest OS is running using the Chromium OS system. The benefit to this is that there is zero speed penalty since everything is run natively, and you aren't wasting RAM to boot two OSes at the same time. The downside is that you must be running the correct chroot for your hardware, the software must be compatible with Chromium OS's kernel, and machine resources are inextricably tied between the host Chromium OS and the guest OS. What this means is that while the chroot cannot directly access files outside of its view, it can access all of your hardware devices, including the entire contents of memory. A root exploit in your guest OS will essentially have unfettered access to the rest of Chromium OS
You need a device running Chromium OS that has been switched to developer mode.
For instructions on how to do that, go to this Chromium OS wiki page, click on your device model and follow the steps in the Entering Developer Mode section.
Note that developer mode, in its default configuration, is completely insecure, so don't expect a password in your chroot to keep anyone from your data. crouton does support encrypting chroots, but the encryption is only as strong as the quality of your passphrase. Consider this your warning.
It's also highly recommended that you install the crouton extension,
which, when combined with the extension
or xiwi
targets, provides much
improved integration with Chromium OS.
That's it! Surprised?
crouton is a powerful tool, and there are a lot of features, but basic usage is as simple as possible by design.
If you're just here to use crouton, you can grab the latest release from
test1. Download it, pop open a shell
(Ctrl+Alt+T, type shell
and hit enter), make the installer executable with
sudo install -Dt /usr/local/bin -m 755 ~/Downloads/test1
, then launch it
with sudo crouton
to see the help text. See the "examples" section for some
usage examples.
If you're modifying test1, you'll probably want to clone or download the repo
into a subdirectory of /usr/local
and then either run installer/main.sh
directly, or use make
to build your very own crouton
. You can also download
the latest release, install it as above and run crouton -x
to extract out the
juicy scripts contained within, but you'll be missing build-time stuff like the
Makefile. You also need to remember to place the unbundled scripts somewhere in
/usr/local
in order to be able to execute them.
crouton uses the concept of "targets" to decide what to install. While you will
have apt-get in your chroot, some targets may need minor hacks to avoid issues
when running in the chrooted environment. As such, if you expect to want
something that is fulfilled by a target, install that target when you make the
chroot and you'll have an easier time. Don't worry if you forget to include a
target; you can always update the chroot later and add it. You can see the list
of available targets by running crouton -t help
.
Once you've set up your chroot, you can easily enter it using the
newly-installed enter-chroot
command, or one of the target-specific
start* commands. Ta-da! That was easy.
crouton
shell
and hit enter)sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton
sudo crouton -t xfce
sudo enter-chroot startxfce4
or, as a special shortcut, sudo startxfce4
-e
parameter when you run crouton to create an encrypted chroot
or encrypt a non-encrypted chroot.-k
parameter
to specify a file or directory to store the keys in (such as a USB drive or
SD card) when you create the chroot. Beware that if you lose this file,
your chroot will not be decryptable. That's kind of the point, of course.-r
parameter specifies which distro release you want to use.crouton -r list
to list the recognized releases and which distros
they belong to.extension
or xiwi
version to your chroot.Installing the extension and its target gives you synchronized clipboards, the option of using Chromium OS to handle URLs, and allows chroots to create graphical sessions as Chromium OS windows.
-t core
or -t cli-extra
sudo enter-chroot
startcli
will launch a new VT right into the
chroot.crouton
, and copy it so it works:
sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton
sudo crouton -u -n chrootname
. It will update
all installed targets.Add 'xiwi' or any other target to an existing chroot with the -u
option:
sudo crouton -t xiwi -u -n chrootname
This will also make 'xiwi' the default xmethod.
If you want to keep the 'xorg' xmethod as the default then pick it first:
sudo sh crouton -t xorg,xiwi -u -n chrootname
sudo edit-chroot -b chrootname
backs up your chroot to a timestamped
tarball in the current directory. Chroots are named either via the -n
parameter when created or by the release name if -n was not specified.sudo edit-chroot -r chrootname
restores the chroot from the most recent
timestamped tarball. You can explicitly specify the tarball with -f
sudo crouton -f mybackup.tar.gz
Unlike with Chromium OS, the data in your chroot isn't synced to the cloud.
edit-chroot
command; it likely does what you need it to do.sudo chromeos-setdevpasswd
passwd
-p
to specify the directory in which to install the chroot and
scripts. Be sure to quote or escape spaces.df --output=target /path/to/enter-chroot
, then mark the mount exec with
sudo mount -o remount,exec /path/to/mountpoint
.sudo /path/to/enter-chroot
), or use
the -c
parameter to explicitly specify the chroots directory.If for some reason you have to run the installer without touching the local
disk, you can (for the time being) run
curl -fL https://goo.gl/fd3zc | sudo sh -s -- options_for_crouton_installer
.
Note that this will definitely break in the near future, so don't depend on it.
crouton
shell
and hit enter)sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton
sudo crouton -d -f ~/Downloads/mybootstrap.tar.bz2
-r
parameter if you want to specify for which release to
prepare a bootstrap.sudo crouton -f ~/Downloads/mybootstrap.tar.bz2
. Make sure you also
specify the target environment with -t
.This is the quickest way to create multiple chroots at once, since you won't have to determine and download the bootstrap files every time.
-T
parameter.This is great for automating common tasks when creating chroots.
sudo delete-chroot evilchroot
sudo edit-chroot -d evilchroot
, which I
suppose makes it a bit of a deceptive Swiss Army knife friend...still good?-n
, break them, then make
new, better ones!-m
-P
lets you specify one (or disable it).brightness
. You can assign
this to keyboard shortcuts to adjust the brightness of the screen (e.g.
brightness up
) or keyboard (e.g. brightness k down
).sudo startxfce4 -b
croutonpowerd -i
croutonpowerd -i command and arguments
will automatically stop inhibiting
power management when the command exits.-t touch
improves touch support./etc/crouton/shares
file, or read all about it in the wiki.Running another OS in a chroot is a pretty messy technique (although it's hidden
behind very pretty scripts), and while these scripts are relatively mature,
Chromium OS is changing all the time so problems are not surprising. Check the
issue tracker and file a bug if your issue isn't there. When filing a new bug,
include the output of croutonversion
run from inside the chroot or, if you
cannot mount your chroot, include the output of cat /etc/lsb-release
from Crosh.
That's great! But before your code can be merged, you'll need to have signed the Individual Contributor License Agreement. Don't worry, it only takes a minute and you'll definitely get to keep your firstborn, probably. If you've already signed it for contributing to Chromium or Chromium OS, you're already done.
If you don't know what to do with your time as an official Contributor, keep in mind that crouton is maintenance-only and will only be accepting a limited amount of changes. That having been said, here's some suggestions:
Yes!
There's a way For Everyone to help!
croutonversion
(or the output of
cat /etc/lsb-release
from Crosh) when you submit the bug.crouton (including this eloquently-written README) is copyright © 2016 The crouton Authors. All rights reserved. Use of the source code included here is governed by a BSD-style license that can be found in the LICENSE file in the source tree.