# Crouton Install and Management Also see notes in corresponding Google Keep. * * * ## Table of Content 1. [Manuals](#manuals) 2. [Installation](#intallation) 1. [Chrome OS Channel](#channel) 2. [Developer Mode](#developer_mode) 3. [Chrome Extension](#chrome_extension) 4. [Install Crouton](#crouton_install) 5. [Useful Helper Commands](#helper_commands) 6. [Color Scheme](#colorscheme) 7. [Setup in user accounts of UCR's HPCC](#ucrhpcc) 3. [Usage and configuration](#usage) 4. [Config files](#configfiles) * * *
## Manuals + Manuals by developer David Schneider on GitHub + [Main Manual](https://github.com/dnschneid/crouton/blob/master/README.md) + [Cheat Sheet](https://github.com/dnschneid/crouton/wiki/Crouton-Command-Cheat-Sheet) + [Tricks](https://github.com/dnschneid/crouton/wiki) + Various simplified install intros: + [Install by Whitson Gordon](https://lifehacker.com/how-to-install-linux-on-a-chromebook-and-unlock-its-ful-509039343) + [Install by Chris Hoffman](https://www.howtogeek.com/162120/how-to-install-ubuntu-linux-on-your-chromebook-with-crouton/) + [Manage by Chris Hoffman](https://www.howtogeek.com/210047/how-to-manage-the-crouton-linux-system-on-your-chromebook/) + [Video Tutorial](https://chromeunboxed.com/install-native-apps-on-your-chromebook-with-ubuntu-linux/) by Robby Payne + [What to do after install](http://www.webupd8.org/2013/12/things-to-do-after-installing-ubuntu-on.html) by Andrew
## Installation
### Check Chrome OS channel What Chrome OS channel is running on a Chromebook is not essentail for the Crouton install. However, it can become important later since things may be less stable if the developer channel is running. The Chrome OS channel can be checked and changed as follows: go to settings under Chrome OS (bottom right corner of main screen) -> select menu in the top left corner -> about Chrome OS -> detailed build information -> change channel. The resulting change channel window shows which channel is currently active. For more details see [here](https://www.androidcentral.com/how-switch-your-chromebook-developer-channel).
### Enable developer mode Note this will erase all local data. So back things up first. Instructions for enabling developer mode are [here](https://lifehacker.com/how-to-install-linux-on-a-chromebook-and-unlock-its-ful-509039343), and the details for specific Chromebooks are given [here](https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices).
### Install Chrome extension For better integraton with Chrome OS install [Crouton Integraton extension](https://chrome.google.com/webstore/detail/crouton-integration/gcpneefbbnfalgjniomfjknbcgkbijom). It is need to run crouton within a Chrome OS session rather than in parallel.
### Install Crouton 1. Download latest Crouton release from here [https://goo.gl/fd3zc](https://goo.gl/fd3zc) which comes form developer's repository [here](https://github.com/dnschneid/crouton/blob/master/README.md). For simplicity leave downloaded `crouton` file in Downloads folder. 2. Open in Chrome browser crosh shell with `CTRL + ALT + T` and then type ```sh shell ``` 3. Now install crouton for the proper linux release specified under `-r` argument (xenial is the Ubuntu 16.04) along with proper targets. The latter are selected under the `-t` argument. The chroot name can be specified with the `-n` option (default is name is chosen release, e.g. xenial). If the `-e` argument is added then the chroot will be encrypted. ```sh sudo sh ~/Downloads/crouton -r xenial -t x11,chrome,xorg,xiwi,keyboard,touch,unity,xfce -e # These are your most current targets; in the past you used unity,xfce,xiwi,keyboard,touch ```
### Useful helper commands List available linux releases ```sh sh ~/Downloads/crouton -r list ``` List all available targets ```sh sh ~/Downloads/crouton -t help ``` Add target to an existing chroot with `-u` option ```sh sudo sh ~/Downloads/crouton -t xiwi -u -n xenial ``` ## Run Crouton Run chroot in same Chrome OS session. This requires the Crouton Integraton extension (see above) along with the xiwi target. ```sh sudo startxfce4 -X xiwi ``` or run in parallel mode ```sh sudo startxfce4 or startunity # shortcuts for enter-chroot startxfce4 ``` ## Switch between chroot and Chrome OS To switch between chroot and ChromeOS use `Ctrl+Alt+Shift+Back` and `Ctrl+Alt+Shift+Forward`; or `Alt+Tab` when in same session. ## Shutdown chroot To shutdown choot, log out or shut down on the Ubuntu side as usual or issue `Ctrl+c` in crosh tab where you started chroot session. ## Update chroot Check if there is a newer crouton version, run on Ubuntu side: ```sh croutonversion -u -c # list installed and latest available version ``` Then shutdown Ubuntu and run in crosh shell the following command. This will update/upgrade all installed targets. ```sh sudo sh ~/Downloads/crouton -u -n xenial # add -e for encryption ``` ## Delete target Currently, not easily possible due to complicated interdendencies/histories of packages across targets!!! ## Delete choot To remove a chroot, one can use the following command(s). ```sh sudo delete-chroot # sudo edit-chroot -d # Does the same; delete-chroot is just a shortcut ``` ## Backup chroot Back up your chroot to a timestamped tarball in the current directory. ```sh sudo edit-chroot -b xenial ``` Restore chroot from the most recent timestamped tarball. One can explicitly specify the tarball with -f. ```sh sudo edit-chroot -r chrootname ``` If your machine is new or powerwashed, one can use the crouton installer to restore a chroot and relevant scripts. ```sh sudo sh ~/Downloads/crouton -f mybackup.tar.gz ``` ## Install software within Chroot Within a Chroot one should update and install software packages via `apt-get`, see example below. Detailed instructions for using `apt-get` are available on Ubuntu's [AptGet/Howto](https://help.ubuntu.com/community/AptGet/Howto). Installing software via Ubuntu's Software manager should be avoided since it creates often problems. The GDebi Package installer seems to work fine as an alternative. ```sh sudo apt-get update && sudo apt-get install ``` ## Additional useful commands ### Enter chroot from crosh shell ```sh sudo enter-chroot ``` ### List targets installed in a chroot ```sh sudo edit-chroot -al # Execute in Chrome OS after Ctrl+alt+t and then shell ``` ### Location of chroots ```sh ls -al /usr/local/chroots/ ``` ## Troubleshooting #### `apt-get` broken If `apt-get update` and/or `apt-get install` is not working then try the follwing troubleshooting steps. The `autoclean` command might fix the problem. Sometimes it may only work in a freshly started chroot session. So try restarting it if it fails, or start temporarily a chroot from crosh shell within chrome browser tab with `sudo enter-chroot`, and then run update/install from there. ```sh sudo apt-get autoclean # This might fix things sudo apt-get update # or with && sudo apt-get upgrade ``` After running `update` also try this ```sh sudo apt-get -f install ``` There are also reports that using more RAM on the Chrome OS side might help. For this just open a few data/process intensive tabs in Chrome. Also check if there are any broken PPAs in `/etc/apt/sources.list.d`.