Editors note: This documentation was written by a friend during the Summer of 2023 (hence why I made him the author). These commands were transcribed directly from this YouTube video. Parts of this document is edited by me for accuracy, continuity, and formatting with this site.
Formatting Partitions and LUKS
boot into the install iso
fdisk /dev/sda or whatever your drive is (vda, nvme0n1, etc.)
create 3 partitions
EFI
256M
fdiskn(enter)(enter)+256Mt1
boot
512M
fdiskn(enter)(enter)+512M
swap (optional depending on circumstances)
Size of ram
16GB
fdiskn(enter)(enter)+16Gt19
root (doesnt matter what type, will be overridden)
fill the rest of the drive
this will be btrfs post encryption setup
fdiskn(enter)(enter)(enter)
Write the changes using the w command.
mkfs.vfat -n "EFI System" /dev/sda1mkfs.ext4 -L "boot" /dev/sda2mkswap /dev/sda3modprobe dm-cryptmodprobe dm-modcryptsetup luksFormat -v -s 512 -h sha512 /dev/sda4# Type YES# Enter passwordcryptsetup open /dev/sda4 archlinuxmkfs.btrfs -L "root" /dev/mapper/archlinux
pacstrap -i /mnt base base-devel networkmanager efibootmgr grub neovim sudo vi vim linux linux-firmware linux-headers croniegenfstab -U /mnt > /mnt/etc/fstabarch-chroot /mntnvim /etc/locale.gen #uncomment en_US UTF8locale-genecho LANG=en_US > /etc/locale.confln -sf /usr/share/zoneinfo/America/Detroit /etc/localtimehwclock --systohc --utc # enables the HW Clockecho Arch > /etc/hostname # set the hostnameecho 127.0.0.1 localhost arch >> /etc/hosts # fill the hosts fileecho ::1 localhost arch >> /etc/hosts # ~nvim /etc/default/grub# GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda4:archlinux:allow-discards"
Editors note: You may want to change the GRUB_CMDLINE_LINUX entry in the future for cryptdevice to support Partition UUIDs, or else the system will not boot if the configuration changes.
nvim /etc/mkinitcpio.conf # HOOKS=([appent between blocks and filesystem with "encrypt"]) mkinitcpio -p linux grub-install --boot-directory=/boot --efi-directory=/boot/efi /dev/sda2 grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/efi/EFI/arch/grub.cfg systemctl enable NetworkManager passwd reboot
This finished the arch install. now when you reboot, you will be prompted to enter a password to decrypt the btrfs partition