12/18/2017
After the many, many times I’ve struggled to install and reinstall Arch Linux on a device, I’ve decided enough is enough. It’s time to write a complete guide for installing Arch on a Chromebook C720.
I don’t really know how I ended up owning three of these laptops, but it is what it is. The official Arch install guide is a bit vague about setting up grub and partitions, so I’m going to document an example setup here.
The basic procedure is as follows:
# wifi-menu
You’ll need wi-fi to install packages.
# timedatectl set-ntp true
We’ll be using a GPT partition table. Additionally, we’ll be using GRUB as our bootloader, so there needs to be a partition for booting as well.
(parted) mklabel gpt
(parted) mkpart primary 1MiB 3MiB
(parted) name 1 grub
(parted) set 1 bios_grub on
(parted) mkpart primary 3MiB 131MiB
(parted) name 2 boot
(parted) mkpart primary 131MiB 2GiB
(parted) name 3 swap
(parted) mkpart primary 2GiB 100%
(parted) name 4 rootfs
This makes a BIOS partition for GRUB, a boot partition, a swap partition, and disk space.
First, format the partitions with the appropriate filesystem:
# mkfs.ext4 /dev/sda2
# mkfs.ext4 /dev/sda4
Then, mount the hard drive to an accessible path we can chroot into later.
mount /dev/sda4 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
The base and base-devel packages contain most things needed to get up and running. Use pacstrap to install:
# pacstrap \mnt base base-devel
If you run into problems about keys not being found, update the archlinux keyring:
# pacman -Sy archlinux-keyring
Then, update your USB install with pacman -Syu
.
Generate the fstab afterwards:
# genfstab -U /mnt >> /mnt/etc/fstab
We’ll now start customizing the newly installed Arch copy. First chroot:
# arch-chroot /mnt
Let’s set up booting to the new OS.
# pacman -Syu grub
# grub-install /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
If there’s an error, either this guide is bad or you messed up somewhere.
Link the timezone:
# ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
Run hwclock to generate /etc/adjtime:
# hwclock --systohc
Set your locale by uncommenting your desired locale (en_US.UTF-8 UTF-8):
# nano /etc/locale.gen
Make your edits and run:
# locale-gen
And set the LANG
variable in locale.conf
:
LANG=en_US.UTF-8
Set the LANG variable as well:
echo LANG=en_US.UTF-8 >> /etc/locale.conf
Set your hostname. This is the “name” of your computer:
echo myhostname >> /etc/hostname
Add a matching entry to your hosts file:
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
127.0.1.1 myhostname.localdomain myhostname
Set a password for root:
# passwd
Alright, good job, ctrl-D to exit chroot, unmount the OS:
unmount -R /mnt
Restart, and pray that you boot into Arch Linux the next time around.
08/22/2018
Toward the Light: Behind the Scenes
07/01/2018
Arch Linux: Chromebook C720 Webcam Microphone Disappeared
06/21/2018
SSH: How to Set Up a Simple Local Media Server
02/28/2018
Pacman: File Conflicts
01/17/2018
Making an Arch Linux USB Flash Install Medium
01/17/2018
Arch Linux: Post-Install Notes
01/15/2018
Binary Classification Metrics
01/14/2018
Probabilitistic Classification
01/09/2018
Classification and Perceptron
01/08/2018
Linear Regression: Bayesian Approach, Normal Conjugacy
01/08/2018
Nonlinearity: Basis Functions
01/04/2018
Linear Regression: A Probabilistic Approach
12/30/2017
Linear Regression: A Mathematical Approach
12/20/2017
2017 Reflections: A Year of Curating
12/19/2017
Introduction to Regression: K-Nearest Neighbors
12/18/2017
Welcome to my Miscellaneous Blog!
12/18/2017
A Definitive Arch Linux Install Guide for the Chromebook C720
10/01/2017
C4D: Volume Effector
09/18/2017
Algorithms: Maximum Sliding Window
09/10/2017
Introduction to Inference: Coins and Discrete Probability
09/05/2017
C4D: Unreliable Booles
08/30/2017
Welcome to my Tech Blog!
08/30/2017
Welcome to my Problem Solving Blog!
Previous: C4D: Fire Room BTS | Next: Welcome to my Miscellaneous Blog!