crouton的代码库及官方详细说明github-crouton,有能力的朋友请直接参考这里。

crouton的下载及使用:

  1. 下载crouton并存放于 Downloads 文件夹中
  2. 参照基本的 Linux 命令工具打开 shell (注意crouton无法通过 在系统之外打开 的方式使用,推荐通过在浏览器窗口中打开的方式)
  3. 输入 cd /home/chronos/user/Downloads 进入 Downloads 文件夹中
  4. 输入 sudo sh -e ./crouton 可以查看 crouton 的帮助信息

当前版本的帮助信息如下所示:

crouton [options] -t targets
crouton [options] -f backup_tarball
crouton [options] -d -f bootstrap_tarball

Constructs a chroot for running a more standard userspace alongside Chromium OS.

If run with -f, where the tarball is a backup previously made using edit-chroot,
the chroot is restored and relevant scripts installed.

If run with -d, a bootstrap tarball is created to speed up chroot creation in
the future. You can use bootstrap tarballs generated this way by passing them
to -f the next time you create a chroot with the same architecture and release.

crouton must be run as root unless -d is specified AND fakeroot is
installed AND /tmp is mounted exec and dev.

It is highly recommended to run this from a crosh shell (Ctrl+Alt+T), not VT2.

Options:
    -a ARCH     The architecture to prepare a new chroot or bootstrap for.
                Default: autodetected for the current chroot or system.
    -b          Restore crouton scripts in PREFIX/bin, as required by the
                chroots currently installed in PREFIX/chroots.
    -d          Downloads the bootstrap tarball but does not prepare the chroot.
    -e          Encrypt the chroot with ecryptfs using a passphrase.
                If specified twice, prompt to change the encryption passphrase.
    -f TARBALL  The bootstrap or backup tarball to use, or to download to (-d).
                When using an existing tarball, -a and -r are ignored.
    -k KEYFILE  File or directory to store the (encrypted) encryption keys in.
                If unspecified, the keys will be stored in the chroot if doing a
                first encryption, or auto-detected on existing chroots.
    -m MIRROR   Mirror to use for bootstrapping and package installation.
                Default depends on the release chosen.
                Can only be specified during chroot creation and forced updates
                (-u -u). After installation, the mirror can be modified using
                the distribution's recommended way.
    -M MIRROR2  A secondary mirror, often used for security updates.
                Can only be specified alongside -m.
    -n NAME     Name of the chroot. Default is the release name.
                Cannot contain any slash (/).
    -p PREFIX   The root directory in which to install the bin and chroot
                subdirectories and data.
                Default: /usr/local, with /usr/local/chroots linked to
                /mnt/stateful_partition/crouton/chroots.
    -P PROXY    Set an HTTP proxy for the chroot; effectively sets http_proxy.
                Specify an empty string to remove a proxy when updating.
    -r RELEASE  Name of the distribution release. Default: xenial,
                or auto-detected if upgrading a chroot and -n is specified.
                Specify 'help' or 'list' to print out recognized releases.
    -t TARGETS  Comma-separated list of environment targets to install.
                Specify 'help' or 'list' to print out potential targets.
    -T TARGETFILE  Path to a custom target definition file that gets applied to
                the chroot as if it were a target in the crouton bundle.
    -u          If the chroot exists, runs the preparation step again.
                You can use this to install new targets or update old ones.
                Passing this parameter twice will force an update even if the
                specified release does not match the one already installed.
    -V          Prints the version of the installer to stdout.

Be aware that dev mode is inherently insecure, even if you have a strong
password in your chroot! Anyone can simply switch VTs and gain root access
unless you've permanently assigned a Chromium OS root password. Encrypted
chroots require you to set a Chromium OS root password, but are still only as
secure as the passphrases you assign to them.

在相关方面有基础知识或者英语还不错的朋友可以直接参照帮助信息完成 Linux 系统的安装。

对于这方面不太了解的小白,在完成上述步骤后直接执行如下命令:

sudo sh -e ./crouton -r xenial -t core

完成 Ubuntu 16.04 (xenial)基本内核的安装,安装完成后会提示输入用户名和密码,按照提示输入即可(注意,输入密码时密码是隐藏的,需要盲打)

完成上述步骤后可以通过

sudo enter-chroot

命令进入 Ubuntu 16.04 (xenial)的终端。

在进入 Ubuntu 16.04 (xenial)之后可以通过输入

logout

来退出 Ubuntu 16.04 (xenial)终端环境。

如果想要使用完整的桌面环境,接下来可以输入

sudo sh -e ./crouton -r xenial -t core,audio,cli-extra,core,touch,,x11,xorg,gtk-extra,keyboard,unity,unity-desktop -u

下载安装完整的 Ubuntu 16.04 (xenial) 桌面环境,其中unity,unity-desktop可以根据需要换成gnome,gnome-desktopkde,kde-desktoplxde,lxde-desktopxfce,xfce-desktop,分别表示不同的桌面环境(推荐使用gnome)

桌面环境安装完成后,根据所安装的桌面环境使用如下命令之一进入桌面环境:

sudo startunity
sudo startgnome
sudo startkde
sudo startlxde
sudo startxfce4

进入以后可以使用Ctrl+Alt+Shift+刷新键随时在 Ubuntu 系统中与 Chrome OS 系统间切换。

标签: none

已有 9 条评论

  1. 武行空 武行空

    crouton安装linux的时间好长啊

    1. 应该是网络连接的问题,建议在安装的时候尝试使用-m修改源或者使用-P添加代理

  2. 呼呼呼 呼呼呼

    官方文档中的xfce4的图形界面与gnome有什么区别吗

    1. 你实际实验一下就知道了。
      实际上是两个不同的桌面环境,在我的电脑上xfce4看起来太小了,因此推荐gnome,可以缩放成合适的大小。

      1. 五行空 五行空

        发现每次安装到末尾的时候,会发现连接不上google的资源导致界面下载失败

        1. 请尝试使用代理

          1. lr lr

            代理后前面的就无法完成

  3. hunk hunk

    大神我刚如坑,2017 版本的笔记本,按你教程安装了 gnome的 图形化,显示大小是正常的,但是运行下来的整体感觉,和显卡没有驱动起来一样,一卡一卡的,点各设置,都是一点一点的缩回去的。。怎么解决啊

    1. 我上一次尝试使用crouton已经是半年前因此以下回答可能不适用于现在的情况
      按照当时的体验,对于unity桌面环境的效果很不好,非常卡,而gnome也仅仅只有xenial不卡。
      即xenial配合gnome是我尝试过后效果比较好一点的组合(但依然发热严重),总体来说较为流畅,没有遇到你说的情况。我觉得你可能使用的是unity或者bionic(也可能是现在更新后和当时情况不一样了)。
      既然使用的是2017版本的话我还是更建议使用crostini,因为不是由社区而是由谷歌官方支持的。

添加新评论