Arch Linux Operating System Installation¶
Instruction Order¶
Note
These instructions are intended for a workstation installation.
-
Create install media by choosing one of the following:
-
Install operating system.
-
Configuration
How to Create a Bootable USB Flash Drive¶
Using A GNU/Linux System¶
-
Download the latest Arch Linux.
cURL download example, ISO and hashsum files.
$ curl -JLO https://mirror.csclub.uwaterloo.ca/archlinux/iso/latest/archlinux-2020.08.01-x86_64.iso
$ curl -JLO http://mirror.csclub.uwaterloo.ca/archlinux/iso/latest/sha1sums.txt
-
Verify the download was successful.
$ sha1sum -c sha1sums.txt
archlinux-2020.08.01-x86_64.iso: OK sha1sum: archlinux-bootstrap-2020.08.01-x86_64.tar.gz: No such file or directory archlinux-bootstrap-2020.08.01-x86_64.tar.gz: FAILED open or read sha1sum: WARNING: 1 listed file could not be read
Note
The warning message can be ignore since it refers to a file that was not downloaded.
-
Plug-in the USB flash drive.
-
Verify the USB device is not mounted and find the device name using one of the following commands.
$ mount
$ lsblk
-
Write the image to the USB drive. Replace image name (archlinux-2020.08.01-x86_64.iso) and device name (/dev/sdg) with applicable values.
$ sudo dd bs=4M if=archlinux-2020.08.01-x86_64.iso of=/dev/sdg
-
Run the following command to ensure everything has been completed.
$ sudo sync
Note
Wait patiently until the prompt returns.
-
You are can now safely remove the USB flash drive.
Install via USB Flash Drive¶
- Plug the USB flash drive into the system.
- Boot off the USB flash drive using UEFI.
- Select "Arch Linux archiso x86_64 UEFI CD" within the boot menu.
- Update the system clock.
# timedatectl set-ntp true
- Follow the desired file system instructions.
-
Install packages.
# pacstrap -i /mnt/root base base-devel dhcpcd evince file-roller gedit gdm gnome-calculator gnome-control-center gnome-keyring gnome-screenshot gnome-shell gnome-terminal gnome-tweaks linux linux-firmware linux-headers man-db man-pages mousetweaks nano nautilus nvidia-dkms nvidia-settings sushi
-i Prompt for package confirmation when needed (run interactively).
- Enter a selection (default=all: (press enter)
- Enter a selection (default=all: (press enter)
- Choose which libx264
- Enter a number (default=1): (press enter)
- Proceed with installation? y
Note
Add the package "efibootmgr" if you are using an EFISTUB.
Note
Add the package "btrfs-progs" if you are using BTRFS.
-
Generate and config fstab.
- Generate fstab.
# genfstab -U /mnt/root >> /mnt/root/etc/fstab
- Edit "/mnt/root/etc/fstab" and change the "2" at the end of entry for "/dev/sda1" to "0".
# nano /mnt/root/etc/fstab
/dev/sda1 /boot vfat rw 0 2 /dev/sda1 /boot vfat rw 0 0
- Generate fstab.
- Change root to point to the new system (chroot).
# arch-chroot /mnt/root /bin/bash
- Set pacman settings by uncommenting Color.
# nano /etc/pacman.conf
#Color
Color
- Enable the DHCP service.
- Find out NIC device name.
# ip addr
- Enable DHCP, replace "interface" with NIC device name.
# systemctl enable dhcpcd@interface.service
- Set the desired workstation (host) name.
# nano /etc/hostname
- Find out NIC device name.
- Add hostname to 127.0.0.1
# nano /etc/hosts
127.0.0.1 localhost
- Add sudo access.
- Set nano as the editor.
# export EDITOR=nano
- Create sudo group access rights.
# visudo -f /etc/sudoers.d/sudo
%sudo ALL=(ALL) ALL
- Create the sudo group.
# groupadd -r sudo
- Set nano as the editor.
- Add user account.
# useradd -m -G users,sudo,adm,sys,plugdev -s /bin/bash username-here
- Set user's password.
# passwd username-here
- Lock root account.
# passwd -l root
- Enable GDM service.
# systemctl enable gdm.service
- Set Locale.
- Uncomment en_US.UTF-8 UTF-8.
# nano /etc/locale.gen
- Generate locale files.
# locale-gen
- Set the locale LANG variable.
# nano /etc/locale.conf
LANG=en_US.UTF-8
- Uncomment en_US.UTF-8 UTF-8.
- Set Time Zone.
# ln -sf /usr/share/zoneinfo/America/Regina /etc/localtime
- Generate /etc/adjtime.
# hwclock --systohc --utc
- Set time synchronization.
# timedatectl set-ntp true
- Arch Linux Install EFI Stub
- Exit chroot.
# exit
- Unmount drive partitions.
- Change to the root directory.
# cd /
- Umount boot partition.
# umount /mnt/root/boot
- Unmount root partition.
# umount /mnt/root
- Change to the root directory.
- Reboot the system.
# systemctl reboot
- Remove the USB flash drive.
Post-Install Configuration¶
Required¶
-
Enable periodic TRIM.
-
Enable automatic cleaning of package cache.
-
Enable automatic BTRFS scrub. BTRFS scrub is an online file system checking tool. Scrub will determine if data is corrupted and repair corrupted data using duplicate data in RAID storage and checksums.
Note
This step is only applicable if using the file system BTRFS.
-
Install required package.
# pacman -Sy btrfs-progs
- Enable Systemd unit timer per BTRFS subvolume (defaults to run monthly).
# systemctl enable btrfs-scrub@HOME.timer
# systemctl enable btrfs-scrub@SRV.timer
# systemctl enable btrfs-scrub@ROOT.timer
Optional¶
- Arch Linux Automate EFI Partition Updates
- Arch Linux Install AUR Helper
- Arch Linux Install OpenSSH
- Arch Linux Install Active Directory Integration
- Arch Linux Install Network Shares
- rxvt-unicode .Xresources Configuration
- Install suggested packages
# pacman -Syu tree mlocate wget hunspell hunspell-en firefox libreoffice-fresh freerdp keepassxc libvirt virt-manager qemu qemu-arch-extra dmidecode thunderbird chrome-gnome-shell
- Install suggested AUR Packages
# pacaur -Sy vertex-themes vertex-icons-git moka-icon-theme-git faba-mono-icons-git
- Install suggested Gnome extensions