This is the English version of the German installation guide on rvbg.eu. This guide is based upon a german arch wiki entry.
At the end of this guide a fully functional Arch Linux will be installed.
Ahead of the installation an Arch boot-stick has to be created. The iso-file can be found on the official website.
The iso can be written on an USB-stick using dd.
After that the USB can be plugged in the system on which Arch should be installed.
Boot the target system and select Boot Arch Linux (x86_64).
If you need to set the keyboard layout to anything other than english you can temporarily do so by using the loadkeys command.
This has to be followed by your country id (for example a german keyboard layout would be de,de-latin1 or de-latin1-nodeadkeys.
Using lsblk you can list all the drives and partitions.
Select a drive to install Arch on.
In this step you can see if old partitions need to be deleted.
For reasons of simplicity the following guide will assume the selected drive to be /dev/sda.
This step can take quite a while especially for large drives.
dd status=progress if=/dev/zero of=/dev/sdaNow all partitions should be removed.
If you missclick during the progress of the following commands you can press CTRL+C to close the program.
No changes will be made until the confirmation at the end.
The swap partition will be created later under lvm.
gdisk /dev/sdaN - Create a new empty partition table↵ Enter - Create a partition↵ Enter - Confirm first sector+512M - Assign size of 512 MB for the first partitionef00 - Make the partition bootablen - Create a second partition↵ Enter - Confirm creation of partition↵ Enter - Confirm first sector↵ Enter - Confirm last sector↵ Enter - Confirm partition typeP - Show created partitionsW - Save all changesY - Confirm saving changesWe need to find out which partitions is the one we want to encrypt.
Using blkid | grep /dev/sda all partitions we created get listed.
The right partition has the label Linux filesystem.
For this guide this partition is assumed to be /dev/sda2.
modprobe dm-crypt - load kernelmodule for encryptioncryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/sda2 - encryptionYEScryptsetup luksOpen /dev/sda2 lvm - Opening encrypted partition and mapping it to /dev/mapper/lvmpvcreate /dev/mapper/lvm - Create a LVM physical volumevgcreate main /dev/mapper/lvm - Create LVM Volume Grouplvcreate -L 16G -n swap main - Create Swap in LVM (recommended: swap size is equal to ram size)lvcreate -l 100%FREE -n root main - Create LVM Logical Volume for /We have to find out which partition is our boot-partition.
Using blkid | grep /dev/sda once again, we can identify it by looking for the EFI system partition label.
The guide assumes this partition to be at /dev/sda1.
mkfs.fat -F 32 -n UEFI /dev/sda1 - Assign filesystem of EFI partitionmkfs.ext4 -L root /dev/mapper/main-root - Assign filesystem of root partitionmkswap /dev/mapper/main-swap - Assign swap filesystemNow the created filesystems will be mounted for the installation.
mount /dev/mapper/main-root /mnt - Mounting root partitionmkdir /mnt/bootmount /dev/sda1 /mnt/boot - Mount EFI partitionswapon /dev/mapper/main-swap - Mounting swap partitionIn this step the country specific mirrorserver for the installation will be configured. This will improve the download speed.
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak - Create a backup of mirrorlistgrep -E -A 1 ".*Germany.*$" /etc/pacman.d/mirrorlist.bak | sed '/--/d' > /etc/pacman.d/mirrorlist - Example command to only use German mirrorscat /etc/pacman.d/mirrorlist - Check if the file is to your liking. If it is not, you can just recover by using mirrorlist.bakpacstrap /mnt base base-devel dosfstools gptfdisk lvm2 linux linux-firmware networkmanager vim - Installation of main system with needed toolspacstrap /mnt wpa_supplicant wireless_tools - (optional) installation of wireless toolsgenfstab -Up /mnt > /mnt/etc/fstab - creation of fstabarch-chroot /mnt - Switch into the newly installed systemecho ArchLinux > /etc/hostname - Assign hostname. ArchLinux can be changed for any name of your preference.echo LANG=en_US.UTF-8 > /etc/locale.conf - Assign system Language to be english (you can use other languages, look into the /etc/locale.conf for a list of all available languages)vim /etc/locale.gen - Assigning system language by uncomment the lines depending on your needs.
In this example:en_US.UTF-8 UTF-8
locale-gen - Generate languageslocalectl --no-convert set-keymap de-latin1-nodeadkeys.localectl status - Check if the layout is righttzselect - Set regionvim /etc/mkinitcpio.conf
MODULES=() and change it to:
MODULES=(ext4)HOOKS=([...]) and change it to:
HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems fsck shutdown)mkinitcpio -p linux - generate Kernel-Imagebootctl install - Prepare bootloaderls -l /dev/disk/by-uuid - find out the UUIDlsblk -no UUID /dev/sda2 | head -n1 > /boot/loader/entries/arch.conf - print the UUID in your configuration filevim /boot/loader/entries/arch.conf - Create configuration
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=UUID=<enter your uuid here>:lvm:allow-discards root=/dev/mapper/main-root:lvm:allow-discards resume=/dev/mapper/main-swap rw quiet lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8
cp /boot/loader/entries/arch-fallback.conf - Create a fallbackvim /boot/loader/entries/arch-fallback.conf - Edit the file
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=UUID=<enter your uuid here>:lvm:allow-discards root=/dev/mapper/main-root:lvm:allow-discards resume=/dev/mapper/main-swap rw quiet lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8
vim /boot/loader/loader.conf - Create loader configuration
timeout 1
default arch
exit - exit the installed systemumount /mnt/{boot,} - unmount all partitionsshutdown now - shutdown deviceIf the system is installed in a virtual environment or a system with deactivated UEFI, don't forget to enable the EFI option, otherwise the system won't boot.
root usersystemctl enable NetworkManager.service - Activate NetworkManagersystemctl enable wpa_supplicant.service - (Optional) activate wpa_supplicantsystemctl start NetworkManager.service - Start NetworkManagerThe device should connect to the internet if it is connected via LAN.
Using nmtui you can administer the wired and wireless connections
pacman -Syu ntp - Installing time servicentpd -qg - Get current timehwclock --systohc - Synchronize hardwareclocksystemctl enable ntpd.service - enable timeservicevim /etc/sudoers - Open suoders file
%whell All=(ALL) ALL
useradd -m user - Create a user with user as name. For the user a home directory will be created.usermod -aG wheel user - Add user user to wheel grouppasswd -d user - Remove password for user userlogout - logout from rootOn the freshly installed system there are 2 users.
Make sure to set the password!
You can add one using passwd.
sudo pacman -S git - install gitcd /optsudo git clone https://aur.archlinux.org/yay-git.git - Clone the yay git repositorysudo chown -R user:user yay-git - Change ownercd yay-gitmakepkg -si - Start installationyay -S alsa-utils pulseaudio-alsaThe volume can be changed with alsamixer.
03.04.2020 - Version 1.1en (based on 03.04.2020 - Version 1.1) 05.04.2020 - Version 2.1en (based on 05.04.2020 - Version 2.1)