I'm retiring these instructions, as a lot about my partitioning & environment has changed. I will make new ones from scratch.
I made these instructions to help myself install Arch with a system-wide encrypted setup, EXT4, and XFCE4 as the DE. You should be able to easily adapt these to your use case, if you know what you're doing.
Initial partitioning:
cfdisk /dev/sda
-
Select DOS layout.
-
Make 1 bootable partition, starting at
2048
, ending at+500M
. -
Make 1 non-bootable partition.
# make containers
mkfs.ext4 /dev/sda1
cryptsetup luksFormat /dev/sda2
cryptsetup luksOpen /dev/sda2 root
mkfs.ext4 /dev/mapper/root
# mount everything in preperation to build OS structure
mount /dev/mapper/root /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
vim /etc/pacman.d/mirrorlist
# Initialize Arch on target drive:
pacstrap /mnt base base-devel grub vim fish networkmanager git intel-ucode linux linux-firmware
# Initialize Arch filesystem table:
genfstab -U /mnt >> /mnt/etc/fstab
grub-install --recheck --boot-directory /mnt/boot /dev/sda
# Chroot into Arch install:
arch-chroot /mnt /bin/bash
# Fix locale stuff:
vim /etc/locale.gen
# In VIM, I then do:
1,$d
en_US.UTF-8 UTF-8
en_US ISO-8859-1
en_DK.UTF-8 UTF-8
en_DK ISO-8859-1
:wq
locale-gen
vim /etc/locale.conf
Set value to:
'''
LANG=en_US.UTF-8
LC_TIME=en_DK.UTF-8
'''
vim /etc/mkinitcpio.conf
# After `filesystems`, add `encrypt` and `shutdown`.
# Edit root passwd:
passwd
vim /etc/default/grub
# Remove QUIET
# Set GRUB_TIMEOUT to 1
GRUB_COLOR_NORMAL="light-magenta/black"
GRUB_COLOR_HIGHLIGHT="magenta/black"
#TODO: fic this part
# Change to something like this:
# `GRUB_CMDLINE_LINUX="cryptdevice=/dev/disk/by-uuid/[123-456-789]:root:allow-discards"`
# Or alternatively,
# `GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:root:allow-discards"`
# Note allow-discards enables TRIM for SSDs. This is a non-trivial decision, so don't just blindly copy that part of it.
# cryptdevice=UUID=X syntax failed for some reason. Then it started being the only syntax that worked.
# Uncomment `GRUB_DISABLE_LINUX_UUID=true`. There's no need for UUIDs if we're mounting something under /dev/mapper with a statically set name. Plus, it'll make diagnostic messages easier to understand.
grub-mkconfig -o /boot/grub/grub.cfg
mkinitcpio -P
# Exit chroot and shutdown:
# Ctrl^D or `exit`
umount -R /mnt
cryptsetup luksClose root
shutdown now
# Log in as root.
# Enable NetworkManager:
systemctl start NetworkManager
systemctl enable NetworkManager
# Set hostname:
hostnamectl set-hostname <hostname>
# Configure user settings:
useradd alex
mkdir /home/alex
chown alex.alex /home/alex
usermod -aG storage,power,wheel,uucp -s /usr/bin/fish alex
passwd alex
# Install core X11 stuff:
pacman -S xorg xorg-twm xorg-xclock xterm
# Install core audio stuff:
pacman -S alsa-utils pulseaudio
# Install desktop environment:
pacman -S xfce4 xfce4-goodies network-manager-applet
exit
Log off root. Log in as alex.
/etc/pulse/default.pa
load-module module-switch-on-connect
/etc/libao.conf
default_driver=pulse