The goal of this Arch Linux installation guide is to provide an easier to interpret, while still chomprehensive how-to for installing Arch Linux on x86_64 architecture devices. This guide assumes you are technically inclined and have a basic understanding of Linux. This installation guide was made with intentions of sticking to systemd (systemd-boot, systemd-networkd). Due to the vast amount of options/prefrences for networking tools & boot loaders, instructions for NetworkManager & GRUB were included to their respective sections
This guide is a mix of knowledge and information from the ArchWiki
I use Arch BTW
- Live Media Creation
- Verify Boot Mode
- Inital Network Setup
3.1. Ethernet
3.1. WiFi - System Clock
- Disk Partitioning
- Swap Space (Optional)
6.1. Swap Partition
6.1. Swapfile - Format Partitions
- Mount Partitions
- Install Essential Packages
- Fstab
- Change Root
- Time Zone
- Localization
- Network Configuration
14.1. Systemd-networkd
14.1. NetworkManager - Initramfs
- Users & Passwords
- Boot Loader
17.1. Systemd-boot
17.1. GRUB
if a system with access to linux commands is available, use dd to create a bootable arch linux installation image on a usb/sd card from the downloaded iso. there are several ways to create an installation medium -- see how to create an arch linux installer image, here
the 'of' path should be replaced with the destination to the usb/sd card; insert the device and use lsblk to check path. it should be something like 'sdb'
dd bs=4M if=/<path>/<to>/<archlinux>.iso of=/dev/<sdx> status=progress && syncwhen a bootable image has sucessfully been created from the iso, attach the device and boot into the live enviornment.
secure boot must be disabled from the system bios menu to boot the installation medium
list the efivars directory
ls /sys/firmware/efi/efivarsif the command returns the directory without error, then the system is booted in uefi. if the directory doesn't exist the system may be booted in bios or csm mode
check if the network interface is enabled with iplink
ip linkif disabled, check the device driver -- see ethernet#device-driver or wireless#device-driver
plug in an ethernet cable
make sure the card isn't blocked with rfkill
rfkill listif the card is soft-blocked by the kernel, use this command: rfkill unblock wifi`
the card could be hard-blocked by a hardware button or switch, e.g. a laptop. make sure this is enabled
authenticate to a wireless network in an iwd interactive prompt
iwctllist all wireless devices
[iwd] device listscan for networks
[iwd] station <device> scanlist scanned networks
[iwd] station <device> get-networksfinally, connect to specified network
[iwd] station <device> connect <SSID>verify connection
[iwd] station <device> showexit prompt (ctrl+c)
exit° for wwan (mobile broadband) -- see nmcli
set system clock timedatectl
timedatectl set-ntp truecheck status
timedatectl statuslist disk and block devices
lsblkusing the most desirable partitioning tool(gdisk, fdisk, parted, etc) for your system, create a new gpt or mbr partition table, if one does not exist. a gpt table is required in uefi mode; an mbr table is required if the system is booted in legacy bios mode
if booted in uefi, create an efi(512MB) system partition (boot); not necessary for legacy bios systems. create an optional swap partition (half or equal to RAM) and the required root(10GB+) partition
if the system has an existing efi partition, don't create a new one. do not format it or all data on the partition will be lost, rendering other operating systems potentially un-bootable. skip the 'mkfs.vfat' command in the format partitions section below and mount the already existing efi partition if available
to create any stacked block devices for lvm, system encryption or raid, do it now
partitioning with gdisk
o
n
+512M
ef00
n
+4G
8200
n
+10G
8300
w
in order to create a swap consider creating either a swap partition or a swapfile now. to share the swap space system-wide with other operating systems or enable hibernation; create a linux swap partition. in comparison, a swapfile can change size on-the-fly and is more easily removed, which may be more desirable for a modestly-sized ssd
if a swap partition was made, format it by replacing 'swap_partition' with it's assigned block device path, e.g. sda2
mkswap /dev/<swap_partition>then activate it
swapon /dev/<swap_partition>to create a swapfile instead, use dd. the following command will create a 4gb swapfile
dd if=/dev/zero of=/swapfile bs=1M count=<4096> status=progressformat it
mkswap /swapfilethen activate it
swapon /swapfilea swapfile without the correct permissions is a big security risk. set the file permissions to 600 with chmod
chmod 600 /swapfileformat the root partition just created with preferred filesystem and replace 'root_partition' with it's assigned block device path, e.g. sda3
mkfs.<ext4> /dev/<root_partition>for uefi systems, format the efi partition by replacing 'efi_partition' with it's assigned block device path, e.g. sda1
°if an efi partition already exist, skip formatting
mkfs.vfat -F32 /dev/<efi_partition>mount root partition to /mnt
mount /dev/<root_partition> /mntmount the efi system partition to /boot
mkdir /mnt/bootmount /dev/<efi_partition> /mnt/bootpacstrap base, kernel choice and if the system has an amd or intel cpu, install the coinciding microcode updates
pacstrap /mnt base linux linux-firmware nano sudo <cpu_manufacturer>-ucodegenerate an fstab file from detected mounted block devices, defined by uuid's
genfstab -U /mnt > /mnt/etc/fstabcheck generated fstab
cat /mnt/etc/fstabchroot into freshly installed system
arch-chroot /mntset time zone
ln -sf /usr/share/zoneinfo/<region>/<city> /etc/localtimegenerate /etc/adjtime with hwclock
hwclock --systohc° this assumes the hardware clock is set to utc. for more, see system time#time standard
edit /etc/locale.gen and un-comment 'en_US.UTF-8 UTF-8' or any other necessary locales by removing the '#'
nano /etc/locale.genuse ctrl+x then 'y' to save and close nano
° for a different editor -- see documents#editors
generate the locales
locale-gencreate the locale.conf file and set the system locale
echo LANG=en_US.UTF-8 > /etc/locale.confcreate hostname file
echo <hostname> > /etc/hostnameadd matching entries to hosts
nano /etc/hosts127.0.0.1 localhost
::1 localhost
127.0.1.1 <hostname>.localdomain <hostname>
° if the system has a permanently assigned ip address, use it instead of '127.0.1.1'
install any desired network managment software. for this guide systemd-networkd is used. if you prefer a gui and configureless setup -- check out networkmanager below
install wpa_supplicant
pacman -S wpa_supplicantconnect to the network with wpa_passphrase
wpa_passphrase <ssid> <password> > /etc/wpa_supplicant/wpa_supplicant-<interface>.confenable & start the wpa_supplicant daemon reading the config file just created
systemctl enable --now wpa_supplicant@<interface>setup systemd-networkd for wireless networking
nano /etc/systemd/network/25-wireless.network[Match]
Name=<interface>
[Network]
DHCP=yes
enable and start systemd-network service daemon
systemctl enable systemd-networkd° for a static connection -- see #static; for ethernet -- see #wired adapter
install networkmanager
pacman -S networkmanagerenable and start networkmanager service daemon
systemctl enable NetworkManager° creating an initramfs image isn't necessary since mkinitcpio was ran when pacstrap installed the kernel
for lvm, system encryption or raid modify mkinitcpio.conf then recreate the initramfs image with:
mkinitcpio -Pcreate a new user
useradd -m <username>add created user to the wheel group
usermod -aG wheel <username>uncomment '%wheel'
EDITOR=nano visudoset created user password
passwd <username>set root user password
passwddisable login to superuser/root, locking password entry for root user. this will give the system increased security and a user can still be elevated within the wheel group to superuser priveleges with sudo and su commands
passwd -l rootinstall a linux-capable boot loader. for simplicity and ease-of-use I recommend systemd-boot, not grub for uefi. systemd-boot will boot any configured efi image including windows operating systems. systemd-boot is not compatible with systems booted in legacy bios mode
install systemd-boot in the efi system partition
bootctl --path=/boot installadd a boot entry and load installed microcode updates
nano /boot/loader/entries/<entry>.conftitle <Arch Linux>
linux /vmlinuz-linux
initrd /<cpu_manufacturer>-ucode.img
initrd /initramfs-linux.img
options root=/dev/<root_partition> rw quiet log-level=0
° if a different kernel was installed such as linux-zen, you would add '-zen' above to 'vmlinuz-linux' and 'initframs-linux' lines. this will boot the system using the selected kernel. for more -- see kernel paramters
edit loader config
nano /boot/loader/loader.conf`default <entry>.conf
timeout <3>
console-mode <max>
editor <no>
verify entry is bootable
bootctl listinstall grub. also, install os-prober to automatically add boot entries for other operating systems
pacman -S grub os-proberfor systems booted in uefi mode, install efibootmgr
pacman -S efibootmgrand install grub to the efi partition
grub-install --target=x86_64-efi --efi-directory=/boot/grub --bootloader-id=GRUBothwerwise, if booted in bios mode; where path is the entire disk, not just a partition or path to a directory install grub to the disk
grub-install --target=i386-pc /dev/sdxgenerate the grub config file. this will automatically detect the arch linux installation
grub-mkconfig -o /boot/grub/grub.cfg° if a warning that os-prober will not be executed appears then, un-comment 'GRUB_DISABLE_OS_PROBER=false'
nano /etc/default/grubexit (ctrl+d) chroot
exitunmount all partitions; check if busy
unmount -R /mntreboot the system
reboot