LoginSignup
1
6

More than 3 years have passed since last update.

クロムブックで Arch Linux を使う

Last updated at Posted at 2019-06-16

次のようにしてインストールしました。
1)開発者モードに切り替え
2)Linux を有効にする
3)Arch Linux のコンテナを作成
Crostiniを参考にしました。

vsh termina
lxc launch images:archlinux/current/amd64 arch

arch_oct16.png

実行結果

(termina) chronos@localhost ~ $ lxc launch images:archlinux/current/amd64 arch
Creating arch
Starting arch

root のパスワードを設定する。

(termina) chronos@localhost ~ $ lxc exec arch bash
[root@arch ~]# passwd root       
New password: 
Retype new password: 
passwd: password updated successfully
[root@arch ~]# exit
exit

4)インストール後の使い方
Chrome で新しいターミナルを開く (Alt + Shift + T)

vsh termina
lxc console arch

arch01.png

crosh> vsh termina
(termina) chronos@localhost ~ $ lxc console arch
To detach from the console, press: <ctrl>+a q

arch login: uchida
Password: 
Last login: Mon Sep 16 02:29:22 on console
[uchida@arch ~]$ cat /etc/os-release 
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux

終了する時は、
Ctrl + a q

すぐにインストールした方が良いパッケージ

openssh
bind-tools
sudo
rsync
git

docker のイメージを複数動かすことも出来ます。

(termina) chronos@localhost ~ $ lxc list
+---------+---------+-----------------------+------+------------+-----------+
|  NAME   |  STATE  |         IPV4          | IPV6 |    TYPE    | SNAPSHOTS |
+---------+---------+-----------------------+------+------------+-----------+
| arch    | RUNNING | 100.115.92.197 (eth0) |      | PERSISTENT | 0         |
+---------+---------+-----------------------+------+------------+-----------+
| debian  | RUNNING | 100.115.92.199 (eth0) |      | PERSISTENT | 0         |
+---------+---------+-----------------------+------+------------+-----------+
| penguin | RUNNING | 100.115.92.201 (eth0) |      | PERSISTENT | 0         |
+---------+---------+-----------------------+------+------------+-----------+

「DNS による解決が機能しない」時は、
/etc/resolv.conf の nameserver の設定を、ホスト(Chrome OS) の /etc/resolv.conf と同じにすれば、解決します。

ホスト(Chrome OS)  の /etc/resolv.conf の調べ方

crosh> shell
chronos@localhost / $ cat /etc/resolv.conf 
nameserver 192.168.8.1
options single-request timeout:1 attempts:5

vsh termina で次のようなエラーが出る時は、

[ERROR:object_proxy.cc(581)] Failed to call method: org.chromium.VmConcierge.GetVmInfo: object_path= /org/chromium/VmConcierge: org.freedesktop.DBus.Error.ServiceUnknown: The name org.chromium.VmConcierge was not provided by any .service files
[ERROR:vsh.cc(89)] Failed to send dbus message to concierge service

次のコマンドで解決します。

vmc start termina
crosh> vmc start termina
(termina) chronos@localhost ~ $

2020-1-1 に、ネットワークアドレスが取得できないという問題に遭遇しましたが、2020-1-20 には取得できました。

[uchida@arch ~]$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
11: eth0@if12: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:16:3e:5d:78:52 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 100.115.92.197/28 brd 100.115.92.207 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe5d:7852/64 scope link 
       valid_lft forever preferred_lft forever
1
6
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
6