Preparation and Installation of the base system
- Connect the USB drive and boot from the Arch Linux ISO
- Make sure the system is booted in UEFI mode. The following command should display the directory contents without error
ls /sys/firmware/efi/efivars
- Connect to the internet (if not already). Assuming wireless:
iwctl
station <interface> scan
station <interface> get-networks
station <interface> connect <network-name>
- Run
fdisk
to create Linux partitionsfdisk /dev/<your-disk>
- Create an empty GPT partition table using the
g
command# WARNING: This will erase the entire disk.
Command (m for help): g
Created a new GPT disklabel (GUID: ...)
- Create the EFI partition (
/dev/<your-disk-efi>
)Command (m for help): n
Partition number: <Press Enter>
First sector: <Press Enter>
Last sector, +/-sectors or +/-size{K,M,G,T,P}: +250M
Command (m for help): t
Partition type or alias (type L to list all): uefi
- Create the Boot partition (
/dev/<your-disk-boot>
)Command (m for help): n
Partition number: <Press Enter>
First sector: <Press Enter>
Last sector, +/-sectors or +/-size{K,M,G,T,P}: +512M
Command (m for help): t
Partition type or alias (type L to list all): linux
- Create the LUKS partition (
/dev/<your-disk-luks>
)Command (m for help): n
Partition number: <Press Enter>
First sector: <Press Enter>
Last sector, +/-sectors or +/-size{K,M,G,T,P}: <Press Enter>
Command (m for help): t
Partition type or alias (type L to list all): linux
- Print the partition table using the
p
command and check that everything is OKCommand (m for help): p
- Write changes to the disk using the
w
command. (Make sure you know what you’re doing before running this command)Command (m for help): w
- Format the EFI and Boot Partitions
mkfs.fat -F 32 /dev/<your-disk-efi>
mkfs.ext4 /dev/<your-disk-boot>
- Set up the encrypted partition. You can choose any other name instead of
cryptlvm
cryptsetup --use-random luksFormat /dev/<your-disk-luks>
cryptsetup luksOpen /dev/<your-disk-luks> cryptlvm
- Create an LVM volume group
pvcreate /dev/mapper/cryptlvm
vgcreate vg0 /dev/mapper/cryptlvm
- Create LVM partitions; We create logical volumes for swap, root (
/
), and home (/home
). Leave 256MiB of free space in the volume group because thee2scrub
command requires the LVM volume group to have at least 256MiB of unallocated space to dedicate to the snapshot.lvcreate --size 4G vg0 --name swap
lvcreate -l +100%FREE vg0 --name root
lvreduce --size -256M vg0/root
- Format logical volumes
mkswap /dev/vg0/swap
mkfs.ext4 /dev/vg0/root
- Mount new filesystems
mount /dev/vg0/root /mnt
mount --mkdir /dev/<your-disk-efi> /mnt/efi
mount --mkdir /dev/<your-disk-boot> /mnt/boot
swapon /dev/vg0/swap
- Install the base system. We also install some useful packages like
git
,vim
, andsudo
pacstrap -K /mnt base linux linux-firmware openssh git vim sudo
- Generate
/etc/fstab
. This file can be used to define how disk partitions, various other block devices, or remote filesystems should be mounted into the filesystemgenfstab -U /mnt >> /mnt/etc/fstab
- Chroot into the new system
arch-chroot /mnt /bin/bash
- Set TimeZone
ln -s /usr/share/zoneinfo/<Region>/<City> /etc/localtime
- Run hwclock(8) to generate
/etc/adjtime
hwclock --systohc
- Set Locale
vim /etc/locale.gen #uncomment en_US.UTF-8 UTF-8
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
- Set hostname
echo <new-hostname> /etc/hostname
- Create a user
useradd -m -G wheel --shell /bin/bash <your-username>
passwd <your-username>
visudo # ---> Uncomment "%wheel ALL=(ALL) ALL"
- Configure
mkinitcpio
with modules needed to create the initramfs imagepacman -S lvm2
vim /etc/mkinitcpio.conf
# ---> Add 'encrypt' and 'lvm2' to HOOKS before 'filesystems'
mkinitcpio -P
- Setup GRUB
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
In/etc/default/grub
edit the line GRUB_CMDLINE_LINUX as follows. Don’t forget to replace/dev/<your-disk-luks>
with the appropriate path.GRUB_CMDLINE_LINUX="cryptdevice=/dev/<your-disk-luks>:cryptlvm root=/dev/vg0/root"
Now generate the main GRUB configuration filegrub-mkconfig -o /boot/grub/grub.cfg
- Install
networkmanager
package and enableNetworkManager
service to ensure you have Internet connectivity after rebootingpacman -S networkmanager
systemctl enable NetworkManager
- Exit new system and unmount all filesystems
exit
umount -R /mnt
swapoff -a
Arch has been installed! Rebootreboot
Installation of Cinnamon
- After reboot, login
- Install Cinnamon and some basic extras
sudo pacman -S cinnamon nemo-fileroller xdg-user-dirs gnome-terminal gnome-system-monitor gnome-screenshot lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings lightdm-slick-greeter
- You can either roll with the default greeter, or install slick-greeter
sudo vim /etc/lightdm/lightdm.conf
- Look for
greeter-session
and change its valuegreeter-session=lightdm-slick-greeter
- Save and quit vim
- Reboot
And there you have it! Arch Linux with Cinnamon. Enjoy!