I got Arch Linux ARM installed on a Lenovo Chromebook Duet! I mostly used the instructions from the Arch Wiki as reference.
- Enable Linux development environment in Chrome OS's settings
- Get it running
This comes with Debian by default, but this guide will install Arch Linux alongside that.
(ctrl-alt-t)
# ^ Opens the crosh shell
#
# › crosh>
vmc start termina
vsh termina
# ^ Enters the Linux VM ("termina"). From this VM, we
# will create an LXC container from the Arch Linux image.
#
# › (termina) chronos@localhost ~ $
lxc remote add images-uk https://uk.images.linuxcontainers.org --protocol simplestreams --auth-type tls
lxc remote list
# ^ Optional: adds a UK mirror if that's closer to you.
# This can be skipped; use `images:` rather than `images-uk:`
# in the next step.
#
# > | NAME | URL | PROTOCOL | AUTH TYPE | PUBLIC | STATIC |
# | images | https://images.linuxcontainers.org | simplestreams | none | YES | NO |
# | images-uk | https://uk.images.linuxcontainers.org | simplestreams | none | YES | NO |
lxc launch images-uk:archlinux/current arch
# ^ Creates the LXC container with Arch Linux.
# This will take a LONG time.
#
# › Creating arch
# Starting arch
lxc list
# ^ It should now be started and in this list after that.
#
# > | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
# | arch | RUNNING | | | PERSISTENT | 0 |
# | penguin | STOPPED | | | PERSISTENT | 0 |
lxc exec arch bash
# ^ Enter the container.
# If you see the prompt below, you're now in Arch!
#
# > [root@arch ~]#
There's already a default user (alarm
). I renamed that to my own preferred name.
grep 1000:1000 /etc/passwd
# ^ Shows the default user. It's usually `alarm` for
# the ARM build, but I haven't tried it elsewhere.
#
# > alarm
groupmod -n rsc alarm
usermod -d /home/rsc -l rsc -m -c rsc alarm
# ^ Rename that user. I name mine `rsc`. This should
# be the same username that was used to set up the
# default Debian environment.
passwd rsc
# ^ Change passwd
visudo
# ^ Uncomment the line that says:
# %wheel ALL=(ALL) NOPASSWD ALL
usermod -aG wheel rsc
# ^ Gives sudo rights to user
Networking doesn't work by default (try pinging out), and this was what I did to turn it on.
# ^ We should still be in the root shell inside Arch
# [root@arch ~]#
ip -4 a show dev eth0
# ^ See if there's a network connection.
# non-empty output = good (skip)
# empty output = proceed below
dhcpcd eth0
ping 8.8.8.8
# ^ Connects to the internet. It if works, ping should
# start giving some results.
#
# > dhcpcd-9.4.0 starting
# ...
# forked in background, child pid 122
#
# > 64 bytes from 8.8.8.8: icmp_seq=1 ttl=53 time=27.6ms
# ...
pacman -Syu dhclient
systemctl enable --now dhclient@eth0
# ^ use dhclient to auto-connect eth0 on startup
Now that there's a user (rsc
), I logged on directly with it and did the first system update (pacman -Syu
).
exit
# ^ Go back to termina if you're still inside Arch
# > (termina) chronos@localhost ~ $
lxc exec arch su - rsc
# ^ Log in as the user
#
# > [rsc@arch ~]$
sudo nano /etc/pacman.d/mirrorlist
# ^ Optional: Use a closer mirror. Eg, change
# mirror.archlinuxarm.org => au.mirror.archlinuxarm.org
#
# A full list of mirrors are in this page:
# https://archlinuxarm.org/about/mirrors
sudo nano /etc/pacman.conf
# ^ Optional: Update pacman config. I prefer to:
# - uncomment #Color
# - uncomment #VerbosePkgLists
# - uncomment #ParallelDownloads = 5
sudo pacman -Syu base-devel git curl make neovim wl-clipboard fish
# ^ Installs some packages
# This step requires `base-devel`, which was installed
# in a previous step. If there are errors about
# fakeroot, try: sudo pacman -Syu base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cros-container-guest-tools allows X apps to work. It can be installed using yay.
yay -S cros-container-guest-tools-git
cp -r /etc/skel/.config/pulse ~/.config/pulse
# ^ As directed by the post-install message. This will
# enable audio to wor.
yay -S xorg-xwayland
yay -S mousepad
# ^ Install a basic text editor so we can test it out
exit
# ^ Go back to termina
# (termina) chronos@localhost ~ $
lxc console arch
# ^ Log in via tty. This has no colours, but it
# will be necessary to start/enable user services.
#
# > To detach from the console, press: <ctrl>+a q
# arch login: rsc
# password:
# [rsc@arch ~]$
systemctl enable --now --user sommelier{,-x}@{0,1}.service
# ^ Starts and enables X11 and Wayland bridges
#
# > Created symlink /home/rsc/.config/systemd/user/default.target.wants/sommelier@0.service -> /usr/lib/systemd/user/sommelier@.service.
# Created symlink /home/rsc/.config/systemd/user/default.target.wants/sommelier-x@0.service -> /usr/lib/systemd/user/sommelier-x@.service.
# Created symlink /home/rsc/.config/systemd/user/default.target.wants/sommelier@1.service -> /usr/lib/systemd/user/sommelier@.service.
# Created symlink /home/rsc/.config/systemd/user/default.target.wants/sommelier-x@1.service -> /usr/lib/systemd/user/sommelier-x@.service.
mousepad
# ^ If it worked, this will open up a mousepad window
The default image is Debian (penguin
), but we can move that away and make Arch the default. To do this, we'll rename the LXC image to penguin
.
# ^ Start in termina
# (termina) chronos@localhost ~ $
lxc list
lxc stop arch
lxc stop penguin
# ^ Stop all LXC containers that are `RUNNING`
lxc rename penguin google
lxc rename arch penguin
# ^ Swap out the names
exit
# ^ Go back to crosh
# > crosh>
vmc list
vmc stop termina
vmc stop dev
# ^ Stop all VMs
# ... after this, run the Terminal and it should boot
# up with your user
This is common at first, or if you didn't do the sommelier part as the user.
It also matters if you are beta/dev channel of chromeos also. ChromeOS stable currently only let's you easily manage a single linux container "correctly".
This based on MY experience. This might not be correct, or definitive, just MY experience, please don't torch me if I missed something.
If you're running stock ChromeOS (stable)
vmc delete termina
andvmc start termina
. This may seem redundant, but this works best on stable chromeOS I've found.vsh termina
and then do your arch download fromhttps://us.lxd.images.canonical.com/
This has is different from the gist above, it's updated.penguin
If you're running any other channel (beta/dev/whatever)
vmc destroy termina
vsh termina
in crosh, do your arch download, set arch up correctly, then exit back to croshpenguin
todebian
or whatever, you don't have to destroy it.penguin
.Some notes that dork everything up in my experience
yay
is your package manager now. Use it over pacman where ever you can. The reason is it will install everything as your user, and integrate with ChromeOS, I'm not saying this to be partisan over pacman - in my experience things just run more integrated when it's your user, not root. Root is not integrated with chromeos.SOMMELIER
steps correct. When you are YOUR USER, not root:systemctl enable --now --user sommelier{,-x}@{0,1}.service
works perfectly.chrome-untrusted://crosh/html/nassh_preferences_editor.html
"Source Code Pro", monospace
https://cdn.jsdelivr.net/gh/wernight/powerline-web-fonts@ba4426cb0c0b05eb6cb342c7719776a41e1f2114/PowerlineFonts.css
lsd
forls
you'll see the cute icons, folders and whatever, you'll also be able to use fancy prompts.sixel
stuff you might see with iterm/kitty/alacrity/wezterm. You can view images directly in hterm, and it works surprisingly well./mnt/chromeos/MyFiles/workspace
using the ChromeOSfiles
app. Then symlink it in my home directory.ln -s /mnt/chromeos/MyFiles/workspace $HOME
Then i put stuff that I might want to keep in case my arch terminal dies a gruesome death, git repos and the like.git grab
instead ofgit clone
and my working directory is workspace.GRAB_HOME=$HOME/workspace/
git-grab maintains domain/user/repo directory structure, and I don't have to worry about collisions. The performance across the/mnt
mount is kinda slow, but I don't have to recreate everything if I loose my arch install.workspace
directory, AND github. Then I can always have my environment in the event of an arch container crash, or I want to start over.I hope some of this was useful for folks trying to run arch on their chromebooks. I like debian, however bullseye requires custom repos to make everything I use work. Arch/yay makes nearly all that transparent. Bullseye's default fish shell is 3.1, which is horrible, 3.4 or go home! (= So I'm really happy using Arch for my local environment.