This post describes how I install Arch Linux. It’s mostly a reminder for myself in case I want to install it on one of my computers. It’s not a general guide for every single set-up out there. For a generic guide visit the ArchWiki. If you have a generic laptop with UEFI support and Intel CPU, this guide can work well for you.
Set up keyboard layout.
Connect to the Internet. I personally use cable (connect before you boot), but
you can connect via WiFi using
Enable NTP to synchronise time with the Internet.
This guide does not assume any dual-boot. It is a clean install, no data is
supposed to be left after this partitioning. It assumes
your device is called
/dev/sda as well as mine, but if it’s not, substitute
it with your device name.
I personally use LVM on LUKS. I usually have two physical partitions:
- /dev/sda1 - EFI (/boot)
- /dev/sda2 - LUKS (/dev/mapper/cryptlvm)
- LVM (/dev/mapper/VolGroup00)
- swap (/dev/VolGroup00/swap)
- root (/dev/VolGroup00/root)
- LVM (/dev/mapper/VolGroup00)
I don’t create a separte home partition because I don’t really find it useful, but nothing stops you from doing so.
gdisk utility to create partitions.
- Using gdisk create new GPT partition table. You do it using command
- Then use
nto create EFI partition.
- Use default value for the first sector.
- For the last sector use
- For the partition type code use
nagain to create our partition for the encrypted system.
- Use default value for the first and last sectors.
8309partition type code which is
wto save the changes. This will wipe your partition table.
Format EFI partition
Create encrypted (LUKS) partition
Set up LVM
Format and enable swap
Format and mount the root partition
Mount EFI partition
Download Arch Linux
chroot into the new system
Set the timezone
Run hwclock to generate
Uncomment en_US.UTF-8 UTF-8 and other needed locales in /etc/locale.gen, and generate them with
LANG variable in
Set the keyboard layout for the vconsole in
Set your hostname in
Add entries in
mkinitcpio and Initramfs
/etc/mkinitcpio.conf. Find the
HOOKS line and change it to:
Then run the following command to generate your initramfs image.
Create your user
Create your user using:
Then add it to the
visudo and make sure that the line
%wheel ALL=(ALL) ALL is uncommented.
That will grant sudo access to the members of the wheel group.
Disable root account
I advise to lock your root account so it’s unusable. I don’t think you can do it during the installation, but I’ve never tried.
Or you can set a password on it using
/boot/loader/loader.conf to contain:
Install your processor’s microcode. Assuming you use Intel:
Otherwise, please see the guide on ArchWiki.
Then create a boot entry for the OS in
initrd /intel-ucode.img line only if you you use an Intel CPU and have
installed the microcode package for it.
[UUID] with your LUKS partition UUID. It must be UUID of the
physical partition. You can find it using:
Set up networking
The simplest way is to use NetworkManager.
After reboot, cable connection should run out of the box. WiFi set-up may
require you to use the
After the system booted, I usually make my boot quieter by adding the
following options to the kernel parameters (i.e.
Now you should be ready to go. Use
Ctrl+d to escape the chroot session and
umount -R /mnt, then
After you reboot you should first get a screen asking you to input your disk
encryption password. Then it should take you to the log in screen where you can
log in with your user. Make sure that
root user is secured or disabled.
In case if you did not boot in, you can always boot back to the installation
media, mount the drives and use
arch-chroot command again to rectify your