Skip to content

Instantly share code, notes, and snippets.

@TahirJalilov
Last active October 24, 2022 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TahirJalilov/6923dead9e767a7a826ef4119959e6b4 to your computer and use it in GitHub Desktop.
Save TahirJalilov/6923dead9e767a7a826ef4119959e6b4 to your computer and use it in GitHub Desktop.
Arch Linux with BTRFS Installation + UEFI + systemd boot + KDE Plasma
Arch Wiki has a great article on installing Arch Linux that you can refer while following this guide: https://wiki.archlinux.org/index.php/installation_guide
Step 1:
Verify the boot mode
If the command shows the directory without error, then the system is booted in UEFI mode
# ls /sys/firmware/efi/efivars
Step 2:
Connect to the wifi internet using iwd (https://wiki.archlinux.org/title/Iwd#iwctl)
# iwctl
[iwd]# device list
[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks
[iwd]# station wlan0 connect SSID
[iwd]# exit
Step 3:
Checking internet connection
# ping -c 5 archlinux.org
Step 4:
Update the system clock
# timedatectl status
Step 5:
Partition the disks
# fdisk -l
# fdisk /dev/nvme0n1
Create boot partition
* g (to create GPT partition table)
* n
* 1
* enter
* +500M (size of efi partition)
* t
* 1 (change type of partition to EFI)
Create root partition
* n
* 2
* enter
* enter
* w (write changes)
Vierifying Changes
# fdisk -l
Step 6:
Creating Filesystems
# mkfs.fat -F32 /dev/nvme0n1p1
# mkfs.btrfs /dev/nvme0n1p2
Step 7:
Mounting the root partition
# mount /dev/nvme0n1p2 /mnt
Step 8:
Create subvolumes for btrfs
# btrfs su cr /mnt/@root
# btrfs su cr /mnt/@home
# btrfs su cr /mnt/@var
# btrfs su cr /mnt/@opt
# btrfs su cr /mnt/@tmp
# btrfs su cr /mnt/@.snapshots
# umount /mnt
Step 9:
Mounting the partitions
# mount -o noatime,commit=120,compress=zstd,subvol=@root /dev/nvme0n1p2 /mnt
# mkdir /mnt/{boot,home,var,opt,tmp,.snapshots}
# mount -o noatime,commit=120,compress=zstd,subvol=@home /dev/nvme0n1p2 /mnt/home
# mount -o noatime,commit=120,compress=zstd,subvol=@opt /dev/nvme0n1p2 /mnt/opt
# mount -o noatime,commit=120,compress=zstd,subvol=@tmp /dev/nvme0n1p2 /mnt/tmp
# mount -o noatime,commit=120,compress=zstd,subvol=@.snapshots /dev/nvme0n1p2 /mnt/.snapshots
# mount -o subvol=@var /dev/nvme0n1p2 /mnt/var
# mount /dev/nvme0n1p1 /mnt/boot
Verify that you have mounted everything correctly
# lsblk
Step 10:
Installing the base system
# pacstrap -K /mnt base linux linux-firmware intel-ucode btrfs-progs neovim
Step 11:
Generate fstab
# genfstab -U /mnt >> /mnt/etc/fstab
Verify fstab entries
# cat /mnt/etc/fstab
Step 12:
Chroot into install
# arch-chroot /mnt
Step 13:
Seting timezone
# ln -sf /usr/share/zoneinfo/Europe/Prague /etc/localtime
# hwclock --systohc
Step 14:
Setting System Locale
# nvim /etc/locale.gen
Uncomment en_US.UTF-8 UTF-8 and other needed locales in /etc/locale.gen, and generate them with:
# locale-gen
# echo LANG=en_US.UTF-8 >> /etc/locale.conf
Step 15:
Network Configuration
# echo ThinkPad >> /etc/hostname
# nvim /etc/hosts
Arch Wiki states the format for this:
127.0.0.1 localhost
::1 localhost
127.0.1.1 ThinkPad.localdomain ThinkPad
Step 16:
Setting password for root user
# passwd
Step 17:
Installing remaining essential packages
# pacman -S efibootmgr base-devel linux-headers networkmanager git sudo sof-firmware htop mc
Step 18:
Adding btrfs module to mkinitcpio
MODULES=(btrfs)
# nvim /etc/mkinitcpio.conf
Recreate the image
# mkinitcpio -p linux
Step 19:
Creating a User
# useradd -mG wheel tahir
# passwd tahir
Uncomment the line which says %wheel ALL=(ALL) ALL
# EDITOR=nvim visudo
Step 20:
Enabling services
# systemctl enable NetworkManager
Step 21:
Installing the EFI boot manager
# bootctl install
Step 22:
Systemd-boot loader configuration
# nvim /boot/loader/loader.conf
Insert these lines:
default arch.conf
timeout 3
console-mode max
Adding loader:
# nvim /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID=814f745c-d45e-6047-ad70-a0b26338143e rootflags=subvol=@root rw
Step 23:
Restarting into Arch
# exit
# umount -l /mnt
# reboot
Instalation of KDE Plasma
Step 24:
Updating your system
# sudo pacman -Syu
Step 25:
Installing a video driver and xorg
# sudo pacman -S xf86-video-intel xorg
Step 26:
Installing Plasma Desktop
# sudo pacman -S plasma-meta
Step 27:
Installing KDE Applications
# sudo pacman -S kde-applications
Or you may install required applications separately
# sudo pacman -S ark dolphin dolphin-plugins kcalc
Step 28:
Enabling SDDM
# sudo systemctl enable sddm
Step 29:
Reboot into Plasma
# reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment