【Crouton】在 Chromebook 上面安装 Linux 发行版

写在前面的话:

  1. 版权声明:本文为博主原创文章,转载请注明出处!
  2. 博主是一个小菜鸟,并且非常玻璃心!如果文中有什么问题,请友好地指出来,博主查证后会进行更正,啾咪~~
  3. 每篇文章都是博主现阶段的理解,如果理解的更深入的话,博主会不定时更新文章。
  4. 本文最后更新时间:2020.6.22

正文开始

尝试在 Chromebook 上安装 Linux 发行版,目前找到三种方法:

  1. 改 BIOS,通过普通方法安装 Linux
  2. 通过 crostini 安装 Linux
    Crostini 是 Chromium OS 中的一个官方项目,可以直接在 Chromebook 上运行 Linux,运行的 Linux 应该是独立且完整的系统,但这是测试版本,只有部分机台有该测试功能。
  3. 通过 crouton 安装 Linux
    Chrome OS 是基于 Linux 内核的,而 crouton 安装 Linux 是基于chroot的,用crouton安装的 Linux 是精简版本的,只装了最基础的系统,所以装出来的系统只有英文,中文会显示乱码,需要单独安装中文语言环境。
    英文好的可以看官方文档这里有翻译的中文文档,嫌麻烦的可以直接往下看。

安装流程

注意:需要科学上网!!

1. 启用开发者模式

如何在 Chromebook 上启用开发者模式

2. 下载 crouton

点击这里下载crouton脚本,下载下来的脚本里应该在默认的Downloads文件夹里。

3. 打开 shell

按下Ctrl+Alt+T打开crosh,输入shell,按下回车。

4. 安装脚本

sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton

这一步是将下载下来的脚本安装到/usr/local/bin这个可执行目录里面。

安装完成之后,可以通过sudo crouton查看帮助,如果出现下列报错,可以通过-P挂代理重试,即sudo crouton -P [代理ip]

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
Failed to download crouton installer.
Check your internet connection or proxy settings (-P) and try again.

5. 安装 Linux

通过以下命令安装 Linux,下完命令之后需要等待一段时间:

sudo crouton -r buster -t xfce -m http://mirrors.163.com/debian/

中间会提示让设置userpassword,设置后,若出现如下内容时,就表明安装成功:

Here's some tips:

Audio from the chroot will now be forwarded to CRAS (Chromium OS audio server),
through an ALSA plugin.

Future Chromium OS upgrades may break compatibility with the installed version
of CRAS. Should this happen, simply update your chroot.

You can flip through your running chroot desktops and Chromium OS by hitting
Ctrl+Alt+Shift+Back and Ctrl+Alt+Shift+Forward.

You can start Xfce via the startxfce4 host command: sudo startxfce4

Unmounting /mnt/stateful_partition/crouton/chroots/buster...
Done! You can enter the chroot using enter-chroot.

如果安装出错,可以解决了错误之后,执行以下代码继续安装:

 sudo crouton -r buster -u

crouton 参数

  • -r:可以指定想要使用的发行版和版本代号
    crouton -r list可以查看支持的发行版和版本代号(英文)
    例如:-r buster即指定安装 buster

  • -t:指定要安装的软件包
    crouton -t list获取全部可以安装的包名
    例如:-t xfce用来安装 xfce 桌面环境

  • -m:更改镜像源

  • -P:开启/关闭Chroot环境的代理,仅支持http/https

  • -p:可指定chroot的安装位置

  • -k:指定储存密钥的路径

  • -u:添加安装目标

  • -e:创建一个加密的chroot环境,或者加密一个未加密的chroot环境

  • -n:指定Chroot环境的名字,可以创建多个chroot环境

6. 启动 Linux

运行sudo enter-chroot startxfce4或者sudo startxfce4启动xfce

Ctrl+Alt+Shift+Back(<-)Ctrl+Alt+Shift+Forward(->)用来切换Chromebook和Linux
通过注销(logout) Xfce 退出 chroot

其他

安装中文环境

sudo apt-get install xfonts-intl-chinese;   # international fonts for X - Chinese, X系统中文国际字体
sudo apt-get install fonts-arphic-bkai00mp; # "AR PL KaitiM Big5" Chinese TrueType font by Arphic Technology
sudo apt-get install fonts-arphic-bsmi00lp; # "AR PL Mingti2L Big5" Chinese TrueType font by Arphic Technology
sudo apt-get install fonts-arphic-gbsn00lp; # "AR PL SungtiL GB" Chinese TrueType font by Arphic Technology

参考

crouton官方文档
crouton中文文档
Chromebook crouton xfce 安装(2017)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章