ArchLinux

Table of Contents

ArchLinux has the most up-to-date binary software.

You can back up configuration by:

1 Installation

Download the image (no need extra package files as the time of 2011 ..), and burn to USB.

The system will boot into the host OS.

1.1 Verify UEFI

Nowadays (start from 2017) Arch only supports 64 bits … and seems to prefer UEFI .. Fine

First, verify the boot mode to be UEFI by checking the following folder exists

ls /sys/firmware/efi/efivars

1.2 System clock

timedatectl set-ntp true

1.3 Partition

parted /dev/sda mklabel gpt
parted /dev/sda mkpart ESP fat32 1MiB 513MiB
parted /dev/sda set 1 boot on
parted /dev/sda mkpart primary linux-swap 513MiB 5GiB
parted /dev/sda mkpart primary ext4 5GiB 100%

This creates

sda1
/boot the EFI System Partition (ESP), swp, and a root
sda2
swap
sda3
/

Format:

mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda3

Mount

mount /dev/sda3 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

1.4 Select mirror

look into /etc/pacman.d/mirrorlist and modify if necessary. The order matters. The file will be copied to new system.

1.5 Install base system

pacstrap /mnt base

1.6 chroot

genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt

1.7 Configure

Now we are in the new system.

ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
hwclock --systohc

Uncomment en_US.UTF-8 UTF-8 inside /etc/locale.gen and run

locale-gen

Set LANG in /etc/locale.conf

LANG=en_US.UTF-8

Set hostname in /etc/hostname

myhostname

Set root password

passwd

Install grub

pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=myarch
grub-mkconfig -o /boot/grub/grub.cfg

Now reboot

2 System Setup

DHCP is not enabled by default. It is the philloshophy for Arch: installing a package will not enable any service. Enable it by;

systemctl enable dhcpcd

2.1 Intall packages

2.1.1 Essential packages

  • base-devel
  • emacs
  • xterm
  • xorg-server
  • xorg-xinit
  • mlocate
  • rxvt-unicode
  • texlive-core
  • texlive-most: this includes 1) texlive-bibtexextra 2) texlive-core 3) texlive-fontsextra 4) texlive-formatsextra 5) texlive-games 6) texlive-genericextra 7) texlive-htmlxml 8) texlive-humanities 9) texlive-latexextra 10) texlive-music 11) texlive-pictures 12) texlive-plainextra 13) texlive-pstricks 14) texlive-publishers 15) texlive-science
  • xorg-xinput
  • xorg-xdm
  • xorg-xconsole
  • tmux
  • cmake
  • clang
  • llvm
  • clang-tools-extra
  • bash-completion
  • ctags
  • pugixml
  • ninja
  • gtest
  • doxygen
  • boost
  • thesilversearcher
  • antlr2
  • curl
  • libxslt
  • python
  • python2
  • ispell
  • feh
  • debootstrap
  • tidy
  • unzip
  • gperftools
  • valgrind
  • cloc
  • svn
  • clojure
  • ntfs-3g
  • mplayer
  • openssh
  • python-pip
  • ipython
  • r
  • youtube-dl
  • spice # the command is remove-viewer
  • virt-viewer
  • rapidjson
  • ruby
  • markdown
  • dosfstools: for mkfs.vfat, used for raspberry pi

2.1.2 For Helium

  • zeromq
  • memcached libmemcached
2.1.2.1 audio
  • pavucontrol
  • pulseaudio

2.1.3 Apps

  • chromium

2.1.4 for Pdf Tools

  • libzip
  • poppler-glib
  • imagemagick

2.1.5 Install using AUR (in order!)

  • cl-ppcre
  • clx-git
  • stumpwm
  • quicklisp
    • On arch, after install quicklisp via AUR, it prompts: to load quicklisp etc/default/quicklisp into ~.sbclrc.
  • rtags-git
  • plantuml
  • leiningen2-git

2.2 Then

run

  • setup-quicklisp
  • setup-git

3 Trouble shooting

  • After booting stumpwm, sbcl cannot be executed.

4 Pacman

Option

S
sync, a.k.a install
Q
query

Parameter:

s
search
y
fetch new package list. Usually use with u
u
update all packages
i
more information
l
location of files

Typical usage:

Syu
update whole system
S
install package
R
remove package
Rs
remove package and its unused dependencies
Ss
search package
Qi
show description of a package

–noconfirm :: use in script

5 AUR

Have to search through its web interface. Find the git download link and clone it. It is pullable.

Go into the folder and

makepkg -si

-s alone will build it, with i to install it after build. The dependencies are automatically installed if can be found by pacman. If it is also on AUR, you have to install manually.

The md5sum line can be skipped for some package. Just replace the md5sum value inside the quotes with 'SKIP'.

6 Setup

Although I set the right timezone (check by timedatectl), the clock is still incorrect. To fix that, install ntp package and run

sudo ntpd -qg

Author: Hebi Li

Created: 2017-06-22 Thu 10:34

Validate