Está en la página 1de 11

31/12/2020 crouton / README.

md en master · dnschneid / crouton · GitHub

dnschneid / cuscurro

Código Cuestiones 788 Solicitudes de extracción 20 Discusiones Comportamiento Wiki Se

Maestro cuscurro / README.md Ir al archivo

Instrucciones de instalación de la actualización dnschneid ... Última confirmación 6cfaf07 on 4 Apr 2019 Historia

13 colaboradores +1

373 líneas (278 sloc) 17,7 KB Crudo Culpa

crouton: Chromium OS Universal Chroot Environment


crouton es un conjunto de scripts que se agrupan en un generador de chroot centrado en Chromium OS y fácil de usar.
Actualmente, Ubuntu y Debian son compatibles (usando debootstrap detrás de escena), pero "Chromium OS Debian, Ubuntu y
probablemente otras distribuciones eventualmente Chroot Environment" no se acrónimo también (aunque es cierto que
crodupodece es bastante divertido de decir).

Pero primero...

⚠ ¡Los pasos para instalar crouton han cambiado! ⚠


https://github.com/dnschneid/crouton/blob/master/README.md 1/11
31/12/2020 crouton / README.md en master · dnschneid / crouton · GitHub

Debido a la seguridad mejorada dentro de Chromium OS ( ¡yay! ), Los pasos necesarios para iniciar el instalador de crouton y los
pasos para ejecutar crouton desde tarjetas SD tienen que cambiar un poco.

Lea atentamente las secciones relevantes de este README y comuníquese con su weblogger / tutor / videotuber favorito para
actualizar sus guías si están retrasados. Si tiene éxito, presuma de sus logros en el rastreador de problemas y gane la gratitud
personal de los autores de crouton *.

* límite de una (1) gratitud por comentarista

Whoa

Ok, volvamos a los negocios.

"crouton" ... ¿un acrónimo?

Significa entorno de chroot universal de ChRomium Os ... o algo por el estilo. ¿Importan realmente las mayúsculas si el bloqueo de
mayúsculas se ha desterrado (en su mayoría) y las teclas son minúsculas?

Hacia adelante...

Para quien es esto

Cualquiera que quiera ejecutar Linux directamente en su dispositivo Chromium OS y no se preocupe por la seguridad física.
También es mejor tener algún conocimiento de las herramientas de Linux y la línea de comandos en caso de que las cosas salgan
mal, pero no es estrictamente necesario.

¿Qué es un chroot?

https://github.com/dnschneid/crouton/blob/master/README.md 2/11
31/12/2020 crouton / README.md en master · dnschneid / crouton · GitHub

Al igual que la virtualización, los chroots proporcionan al sistema operativo invitado su propio sistema de archivos segregado para
ejecutar, lo que permite que las aplicaciones se ejecuten en un entorno binario diferente al del sistema operativo host. A diferencia
de la virtualización, que está no arrancando un segundo sistema operativo; en su lugar, el sistema operativo invitado se ejecuta
mediante el sistema Chromium OS. El beneficio de esto es que hay una penalización de velocidad cero, ya que todo se ejecuta de
forma nativa y no está desperdiciando RAM para arrancar dos sistemas operativos al mismo tiempo. La desventaja es que debe
ejecutar el chroot correcto para su hardware, el software debe ser compatible con el kernel de Chromium OS y los recursos de la
máquina están inextricablemente vinculados entre el host Chromium OS y el invitado. Lo que esto significa es que aunque el chroot
no puede acceder directamente a los archivos fuera de su vista, puedeacceder a todos sus dispositivos de hardware, incluido todo
el contenido de la memoria. Una vulnerabilidad de root en su sistema operativo invitado esencialmente tendrá acceso sin
restricciones al resto del sistema operativo Chromium.

... pero bueno, ¡puedes ejecutar TuxRacer !

¿Qué hay de dem crostinis?

Crostini es un proyecto oficial dentro de Chromium OS para llevar el shell de Linux y las aplicaciones a la plataforma en modo
verificado con una integración limpia, seguridad de múltiples capas y todo el pulido que espera de Chromium OS propiamente
dicho.

Eso significa que, en comparación con el crouton, Crostini tiene soporte oficial, ingenieros competentes y un código que se parece
un poco menos al ramen. Crouton, en su defensa, tiene una compatibilidad de dispositivo más amplia, permite el acceso directo al
hardware y lleva el nombre de un alimento a base de pan objetivamente más sabroso.

Hay una comunidad sólida en Reddit si desea probar Crostini. Si funciona para ti, ¡genial! Sin resentimientos. Si al final decides
que el crouton te queda mejor, ¡sigue leyendo!

Nota: no puede obtener lo mejor de ambos mundos instalando crouton dentro de Crostini. La tecnología (y la vida misma)
simplemente no funciona de esa manera. Sin mencionar que un crutón Crostini se vería ridículo y sería imposible de comer sin
tener trozos por todas partes.

Prerrequisitos
https://github.com/dnschneid/crouton/blob/master/README.md 3/11
31/12/2020 crouton / README.md en master · dnschneid / crouton · GitHub

Necesita un dispositivo que ejecute Chromium OS que se haya cambiado al modo de desarrollador.

Para obtener instrucciones sobre cómo hacer eso, vaya a esta página wiki de Chromium OS , haga clic en el modelo de su
dispositivo y siga los pasos en la sección Ingresar al modo de desarrollador .

Tenga en cuenta que el modo de desarrollador, en su configuración predeterminada, es completamente inseguro , así que no
espere que una contraseña en su chroot mantenga a nadie alejado de sus datos. crouton admite el cifrado de chroots, pero el
cifrado es tan fuerte como la calidad de su frase de contraseña. Considere esta su advertencia.

También se recomienda encarecidamente que instale la extensión crouton que, cuando se combina con los objetivos
extension o xiwi , proporciona una integración mucho mejor con Chromium OS.

¡Eso es! ¿Sorprendido?

Uso

crouton es una herramienta poderosa, y hay muchas características, pero el uso básico es lo más simple posible por diseño.

Si solo está aquí para usar crouton, puede obtener la última versión de https://goo.gl/fd3zc . Descárguelo, abra un shell (Ctrl + Alt +
T, escriba shell y presione enter), haga que el instalador sea ejecutable con sudo install -Dt /usr/local/bin -m
755 ~/Downloads/crouton , luego ejecútelo con sudo crouton para ver el texto de ayuda. Consulte la sección
"ejemplos" para ver algunos ejemplos de uso.

Si está modificando el crouton, probablemente desee clonar o descargar el repositorio en un subdirectorio de /usr/local y
luego ejecutarlo installer/main.sh directamente o usarlo make para crear el suyo propio crouton . También puede
descargar la última versión, instalarla como se indicó anteriormente y ejecutarla crouton -x para extraer los jugosos scripts que
contiene, pero le faltarán cosas en tiempo de compilación como el Makefile. También debe recordar colocar los scripts
desagregados en algún lugar /usr/local para poder ejecutarlos.

https://github.com/dnschneid/crouton/blob/master/README.md 4/11
31/12/2020 crouton / README.md en master · dnschneid / crouton · GitHub

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.

Examples

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
4. Now that it's executable, run the installer itself: sudo crouton -t xfce
5. Wait patiently and answer the prompts like a good person.
6. Done! You can jump straight to your Xfce session by running sudo enter-chroot startxfce4 or, as a special shortcut,
sudo startxfce4
7. Cycle through Chromium OS and your running graphical chroots using Ctrl+Alt+Shift+Back and Ctrl+Alt+Shift+Forward.
8. Exit the chroot by logging out of Xfce.

With encryption!
1. Add the -e parameter when you run crouton to create an encrypted chroot or encrypt a non-encrypted chroot.
2. You can get some extra protection on your chroot by storing the decryption key separately from the place the chroot is stored.
Use the -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
https://github.com/dnschneid/crouton/blob/master/README.md 5/11
31/12/2020 crouton / README.md en master · dnschneid / crouton · GitHub

chroot. Beware that if you lose this file, your chroot will not be decryptable. That's kind of the point, of course.

Hey now, Ubuntu 16.04 is pretty old; I'm young and hip

1. The -r parameter specifies which distro release you want to use.


2. Run crouton -r list to list the recognized releases and which distros they belong to.

Wasteful redundancies are wasteful: one clipboard, one browser, one window

1. Install the crouton extension into Chromium OS.


2. Add the extension or xiwi version to your chroot.
3. Try some copy-pasta, or uninstall all your web browsers from the 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.

I don't always use Linux, but when I do, I use CLI

1. You can save a chunk of space by ditching X and just installing command-line tools using -t core or -t cli-extra
2. Enter the chroot in as many crosh shells as you want simultaneously using sudo enter-chroot
3. Use the Crosh Window extension to keep Chromium OS from eating standard keyboard shortcuts.
4. If you installed cli-extra, startcli will launch a new VT right into the chroot.

A new version of crouton came out; my chroot is therefore obsolete and sad
1. Exit the chroot if you have it open.
2. If you haven't already, download crouton , and copy it so it works: sudo install -Dt /usr/local/bin -m 755
~/Downloads/crouton
3. Update your chroot with sudo crouton -u -n chrootname . It will update all installed targets.

https://github.com/dnschneid/crouton/blob/master/README.md 6/11
31/12/2020 crouton / README.md en master · dnschneid / crouton · GitHub

I want to open my desktop in a window or a tab but I don't have the 'xiwi' target/xmethod.

1. 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.

2. If you want to keep the 'xorg' xmethod as the default then pick it first: sudo sh crouton -t xorg,xiwi -u -n
chrootname

A backup a day keeps the price-gouging data restoration services away

1. 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.
2. sudo edit-chroot -r chrootname restores the chroot from the most recent timestamped tarball. You can explicitly
specify the tarball with -f
3. If your machine is new, powerwashed, or held upside-down and shaken, you can use the crouton installer to restore a chroot
and relevant scripts: sudo crouton -f mybackup.tar.gz

Unlike with Chromium OS, the data in your chroot isn't synced to the cloud.

This chroot's name/location/password/existence sucks. How to fix?


1. Check out the edit-chroot command; it likely does what you need it to do.
2. If you set a Chromium OS root password, you can change it with sudo chromeos-setdevpasswd
3. You can change the password inside your chroot with passwd

I want to install the chroot to another location

1. Use -p to specify the directory in which to install the chroot and scripts. Be sure to quote or escape spaces.

https://github.com/dnschneid/crouton/blob/master/README.md 7/11
31/12/2020 crouton / README.md en master · dnschneid / crouton · GitHub

2. When entering the chroot for the first time each boot, you will first need to ensure the place you've installed the scripts is in a
place that allows executables to run. Determine the mountpoint by running df --output=target /path/to/enter-
chroot , then mark the mount exec with sudo mount -o remount,exec /path/to/mountpoint .
3. You can then launch the chroot by specifying the full path of any of the enter-chroot or start* scripts (i.e. 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.

Downloading bootstrap files over and over again is a waste of time


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
4. Now that it's executable, use the installer to build a bootstrap tarball: sudo crouton -d -f
~/Downloads/mybootstrap.tar.bz2
5. Include the -r parameter if you want to specify for which release to prepare a bootstrap.
6. You can then create chroots using the tarball by running 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.

Targets are cool. Abusing them for fun and profit is even cooler
1. You can make your own target files (start by copying one of the existing ones) and then use them with any version of crouton via
the -T parameter.
https://github.com/dnschneid/crouton/blob/master/README.md 8/11
31/12/2020 crouton / README.md en master · dnschneid / crouton · GitHub

This is great for automating common tasks when creating chroots.

Help! I've created a monster that must be slain!

1. The delete-chroot command is your sword, shield, and only true friend. sudo delete-chroot evilchroot
2. It's actually just a shortcut to sudo edit-chroot -d evilchroot , which I suppose makes it a bit of a deceptive Swiss
Army knife friend...still good?

Tips

Chroots are cheap! Create multiple ones using -n , break them, then make new, better ones!
You can change the distro mirror from the default by using -m
Want to use a proxy? -P lets you specify one (or disable it).
A script is installed in your chroot called 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 ).
Multiple monitors will work fine in the chroot, but you may have to switch to Chromium OS and back to enable them.
You can make commands run in the background so that you can close the terminal. This is particularly useful for desktop
environments: try running sudo startxfce4 -b
Want to disable Chromium OS's power management? Run croutonpowerd -i
Only want power management disabled for the duration of a command? croutonpowerd -i command and
arguments will automatically stop inhibiting power management when the command exits.
Have a Pixel or two or 4.352 million? -t touch improves touch support.
Want to share some files and/or folders between ChromeOS and your chroot?
Check out the /etc/crouton/shares file, or read all about it in the wiki.
Want more tips? Check the wiki.

Issues?
https://github.com/dnschneid/crouton/blob/master/README.md 9/11
31/12/2020 crouton / README.md en master · dnschneid / crouton · GitHub

Running another OS in a chroot is a pretty messy technique (although it's hidden behind very pretty scripts), and these scripts are
relatively new, 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.

I want to be a Contributor!

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, here's some suggestions:

Really like a certain desktop environment? Fork crouton, add the target, and create a pull request.
Feel like hacking around with Chromium OS integration? Fork crouton, improve integration, and create a pull request.
Is your distro underrepresented? Want to contribute to the elusive and mythical beast known as "croagh"? Fork crouton, add the
distro, and create a pull request.
Discovered a bug lurking within the scripts, or a papercut that bothers you just enough to make you want to actually do
something about it? You guessed it: fork crouton, fix everything, and create a pull request.
Are most bugs too high-level for you to defeat? Grind up some EXP by using your fork to eat pie.

Are there other, non-Contributory ways I can help?

Yes!

But how?

There's a way For Everyone to help!


https://github.com/dnschneid/crouton/blob/master/README.md 10/11
31/12/2020 crouton / README.md en master · dnschneid / crouton · GitHub

Something broken? File a bug! Bonus points if you try to fix it. It helps if you provide the output of croutonversion (or the
output of cat /etc/lsb-release from Crosh) when you submit the bug.
Want to try and break something? Look through requests for testing and then do your best to brutally rip the author's work to
shreds.
Look through open issues and see if there's a topic or application you happen to have experience with. And then, preferably,
share that experience with others.
Encuentre problemas que necesiten entradas de wiki y agregue la información relevante a la wiki . O simplemente agregue o
mejore cosas en el wiki en general, pero trate de mantenerlo relevante y organizado.
¿Realmente le gusta un determinado entorno de escritorio, pero no está preparado para la codificación? Abra o comente un
error con pasos para que todo funcione bien.
¡Pasa el rato en el canal de IRC #crouton en freenode.net!

Licencia

crouton (incluido este README escrito elocuentemente) tiene derechos de autor © 2016 The crouton Authors. Todos los derechos
reservados. El uso del código fuente incluido aquí se rige por una licencia de estilo BSD que se puede encontrar en el archivo
LICENCIA en el árbol de fuentes.

https://github.com/dnschneid/crouton/blob/master/README.md 11/11

También podría gustarte