How I install Arch Linux with full disk encryption
2 September, 2024
I've grown to love Arch Linux due to its simplicity and ease of use. However installing it can be a bit of a process, especially if you want to do it with full disk encryption.
In this post I show you the steps I follow to install it with encryption.
Installation
Go to arch linux downloads and head over to the geo.mirror.pkgbuild.com
link under the "Worldwide" HTTP direct downloads.
Install the following files from there:
archlinux-####.##.##-x86_64.iso
archlinux-####.##.##-x86_64.iso.sig
It is important to verify the signature of the file, to ensure that is has not been tampered with:
Flash the .iso
into a device, for instance /dev/sdc
:
Boot the live environment.
Setup the disk:
Load the encryption modules:
&&
Set up the encryption and then open it:
Create the volume and volume group:
Create a volume for your swap space. A good size for this is your RAM size (find out with free -h
) + 2GB.
Use entire disk space for your root volume:
Create filesystems:
Setup swap device:
Mount Root, Boot and EFI:
Install Arch:
Load the file table and chroot.
Add encryption hooks:
Setup grub on efi partition:
Add cryptdevice to linux commandline arguments:
Change permissions on the secure files:
Add to partitions:
Recognize root keyfile:
Reload Linux:
Create grub config:
Create a symlink for the timezone:
Set up NTP:
Enable timesyncd:
Configure network manager, in order to use wifi:
Set up your locale:
Add your hostname:
Secure the root user by setting a password:
Add your user, for me it is e
because it's 1 character and fast to type:
Add the wheel group to sudoers, to be able to execute commands as root with sudo
:
Install amd or intel microcode depending on which processor you use (lscpu
):
Put UEFI Secure Boot into "Setup Mode":
And with that, we're done! We just installed Arch with full disk encryption. Now you can officially say "I use arch BTW" :)