Skip to content

Instantly share code, notes, and snippets.

@TheAhumMaitra
Last active October 21, 2025 14:44
Show Gist options
  • Select an option

  • Save TheAhumMaitra/fadd431aba455032cc50d6e39819630d to your computer and use it in GitHub Desktop.

Select an option

Save TheAhumMaitra/fadd431aba455032cc50d6e39819630d to your computer and use it in GitHub Desktop.
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system

Modern Arch linux installation guide with BTRFS LUKS encrypted root partition and Limine bootloader setup and Omarchy hyprland setup

Table of contents

Still writing.....

Introduction

The goal of this guide is to help new users set up a modern and minimal installation of Arch Linux with BTRFS root file system along with LUKS Encrypted root and Omarchy Hyprland setup on an UEFI system. This guide is thought to be read alongside the wiki, so that it if something ever changes you can fix it but it's not necessary unless my guide becomes outdated. Also I will mention external references to justify some choices that I've made so that curious users can delve into the details.

Note that:

  • I won't prepare the system for secure boot because the procedure of custom key enrollment in the BIOS is dangerous and can lead to a bricked system. If you are wondering why not using the default OEM keys in the BIOS, it's because they will make secure boot useless by being most likely not enough secure.

  • I'll use a WIFI connection, so no wire configuration steps will be shown. If you want to use Ethernet, you can visit the wiki or the link - Ethernet.


Setup Arch installation media

Downlaod Arch Linux iso

Visit Downlaod page and choice your closet country and click on any official that country's mirror downlaod links. ### Note : Downaload is actually depends on your internet spead

Create a bootable Arch Linux USB Flash drive

Warning : The selected bootable drive's data will be gone forever so, make sure you have a backup and also you selected teh correct drive.

Note : You need a 4GB USB Drive and a working Linux or Mac OS or Windows computer.

Linux

2. Launch 'Etcher'

3. Select your USB drive and Arch LInux ISO and click "Flash"

4. Go to options and select your usb drive.

Windows

1. Download Rufus

2. Open 'Rufus' and select the usb flash drive (that flash drive you want to boot with)

3. Select iso image

4. Select partition scheme

5. You acn do any customization you want

6. Click on the 'Ready' button and wait until it finsh. Warning: Do not try to unplug your usb drive else your usb drive can be bricked forever!

Mac OS

1. Lauch 'Disk Utility' from Applications or use spotlight search

2. Plug your usb stick and observe if any external usb or storgae device added

4. Select the USB stick device (you may need to enable the option View>Show All Devices) and select Erase from the tool bar (or right-click menu).

5. Set the format to MS-DOS (FAT) and the scheme to GUID Partition Map and you can give any name you want

6. Check you’ve chosen the correct device and click 'Erase' button.

7. Install 'Balena Etcher' (Note : By default, recent versions of macOS block the running of applications from unidentified developers. To side-step this issue, enable ‘App Store and identified developers’ in the ‘Security & Privacy’ pane of System Preferences. If you are still warned against running the application, click ‘Open Anyway’ in the same pane.) and open 'Etcher' and select the device and select the Arch Linux official iso and click 'Flash'

8. If you want to use your USB stick with an Apple Mac, you will need to restart or power-on the Mac with the USB stick inserted while the Option/alt (⌥) key is pressed. This will launch Apple’s ‘Startup Manager’ which shows bootable devices connected to the machine. Your USB stick should appear as gold/yellow and labelled ‘EFI Boot’. Selecting this will lead you to the standard Arch Linux boot menu.

Main Installation

After booting into Arch Installation Medium

Choice option "Arch Linux install medium (x86 64, UEFI).

After that, wait for some time, and when it's asking for command, follow these steps:

Set font size to little larger

It's important to care your eyes, so make font size little larger with this command

setfont -d

Optional : First set up your keyboard layout

# List all the available keyboard maps and filter them through grep, in this case i am looking for an italian keyboard, which usually starts with "it", for english filter with "en"
ls /usr/share/kbd/keymaps/**/*.map.gz | grep it

# If you prefer you can scroll the whole list like this
ls /usr/share/kbd/keymaps/**/*.map.gz | less

# Or like this
localectl list-keymaps

# Now get the name without the path and the extension ( localectl returns just the name ) and load the layout. In my case it is simply "it"
loadkeys it

or

loadkeys us # most of the laptop keybboards and desktop keyboads default keysmap is set to US (make sure you know your keybaord layout short name)

Check that you are in UEFI mode or not

# If this command prints 64 or 32 then you are in UEFI
cat /sys/firmware/efi/fw_platform_size

Note : Make sure it returns '64' ( the system is booted in UEFI mode and has a 64-bit x64 UEFI. ). For more deatils go to this link.


Connect to wifi

1.Run this command to unblock any soft block or hard block on your wifi adapter (if nothing works, your wifi adapter is not Linux friendly, buy a good one)

rfkill unblock all

2. Connect to wifi

Run this command to go to iwd shell

iwctl

3. Find your device in iwd shell

Run this command to find your wifi adaptar device

[iwd]# device list

if your wifi adapter is turned off then turn on your wifi adapter

[iwd]# station <device name : Example : wlan0> Powered on

4. Find your wifi networks

Run this command to find your wifi networks

[iwd]# station <device name : EXample : wlan0> get-networks

4. Connect to your wifi

Make sure you saw your wifi network, now it's time to connect to your wifi

[iwd]# station <device name : Example : wlan0> connect <Network Name> (Ex: MYWIFI)

If your wifi name contains special characters and little bit od try wrapping it with single quotes, like :

[iwd]# station wlan0 connect 'print("Hogwarts Internet")

Check the internet connection

ping -c 5 archlinux.org 
ping -c 4 1.1.1.1

Make sure you are reciving something else try to reconnect your wifi

Check the system clock

# Check if ntp is active and if the time is right
timedatectl

# In case it's not active you can do
timedatectl set-ntp true

# Or this
systemctl enable systemd-timesyncd.service

## Create required partitions ### Run this command to check any partition ```Zsh lsblk ``` if it returns something nvme0n1 or sda (please look carefully and size also, make sure mountpoint is 'disk' and also forget about your pendrive and loops hsowd there) then you need to create some partitions, #### if you created partitions alraedy follow the [#Format the created partitions] and then [#Root Encryption] steps.

Run this command to go to tui partition manager preinstalled called "cfdisk"

cfdisk /dev/<diskname,like: nvme0n1, sda, sdb, sdx, etc.)

Label selcetion (if your disk is new)

Now, if your disk is brand new it will ask you to select disk label type, choose "gpt".

Create boot partiiton

After that, you will be redirected to a tui software , now you will see free space , select that one and select new and you need to give a space (IN GB). If you're planing to install Omarchy, I have some storage problems on my EFI partitin , so I sugest you to type '2GB', I know this is too much but I prefer this much or use something like 1.6. Type partiton size and click enter.

Now you should see a loaction like 'nvme0n1p1 or 7' or '/dev/sda1 or any number'.

scroll up or down to selct that partition and go to 'type' via using right arrow keys and from there find 'EFI System Partition' and select that and press 'Enter'.

Create a root partition that will be encrypted later

SElect the freespace and select 'New' and simply it will ask you hoe much space press enter to give all free space or give a partition size in GB after that choose it's type to be 'Linux filesystem' and select write and write 'yes' to confoirm all changes and now quit (via pressing the quit button).


## Sample partitions for this guide
---------------------------
|     location   | size     |
----------------------------
| /dev/nvme0n1p1 | 2 GB      | 
-----------------------------
| /dev/nvme0n1p2 | 52 GB     |
------------------------------

Format the created partitions

For the root partition (which will be encrypted later) , I choosed 'btrfs'. For more info read this and this

Format EFI Pratition

To format the EFI partition (type : fat32, run this command)

mkfs.fat -F32 /dev/nvme0n1p1

Congrats ! EFI Partition formated

Format root (encryption later) partition

To format the root encryption, follow this:

mkfs.btrfs -f /dev/nvme0n1p2

Congrats ! Root Partition formated

Root Encryption

To make your root partition encrypted run these commands:

1. Run this command to set a password and encrypt the partiton

cryptsetup luksFormat /dev/nvme0n1p2

After running this command you will be asked to type 'yes' in captital letters

Warning : ALl data in that partiiton will be deleted

After that, it will ask for a passphrase / password. It's diffrent from your root password. Make sure you set a strong secure password. WIthout these anyone included you can't open your pc / disk. Make sure you remember this password.

2. Open your encrypted partition and give a name

cryptdevice open /dev/nvme0n1p2 <name_of_your_encrypted_root_partition , Eg : cryptroot.

It will ask you to enter your password. Enter your password.

3. See it worked out or not

Run this command to see al partitions

lsblk

You should see your encrypted root partition something like that:

nvme0n1p2
  cryptroot or root_device_name

4. Make your encrypted root partition 'btrfs' type

Run this command to make you rencrypted root partition 'btrfs'

Note : If you want to install Omarchy, make encrypted root partition type 'btrfs'. Omarchy installation required to use 'btrfs' root partition.

mkfs.btrfs /dev/mapper/<encrypted_root_partiton_name>

Congrats, our encrypted root partition is ready! Now we need mount them properly to install Arch Linux

Mount the encrypted root and boot

1. Mount the encrypted root partition

Run this command to mount the encrypted root partition

mount /dev/mapper/<encrypted_root_partition> /mnt

2. See it's mounted properly or not

Write this command to see you mounted the encrypted partition or not

lsblk

You should see the encrypted root partition as mountpoint mnt

3. Create boot partition

Type thsi command to create a special boot directy in the /mnt

mkdir /mnt/boot

4. Mount boot partition

mount /dev/nvme0n1p1 /mnt/boot

5. Type this command to see all partitions mounted properly

lsblk

Optional : If you want a home partition also. Read this link to know more about home partition

1. Create home folder in /mnt

mkdir /mnt/home

2. Mount home partition

mount /dev/nvme0n1p3 /mnt/home

3. Type this command to see all partitions mounted properly

lsblk

Optional : Edit aprreal downloads to download multiple package at once

If your network is very fast or fast you can edit how mnay pcakges arch should at once

1. Edit /etc/pacman.conf

Type this command to edit the file

nano /etc/pacman.conf

2. Find

Next , press 'Ctrl + F' and type "ParallelDownloads" and you should got into that variable now use arrow keys to nvaigate and now change it's value to 5 (littel bit fast) or 6 (fast) or 7 (very fast) or 8 (very fast). This value depends o your network.

3. Write the file and save it

After writing your prefered value , press 'Ctrl + O' to write and 'Ctrl + X' to exit.

Done.

Install Arch on your encrypted root partition

Now, finally, I recommand you to run this command separately to get a very better experience

1. Type this command to install better magical things. Read more on this link

pacstrap -i /mnt base

It will ask you to choice provider press 'Enter' key and Type Y (when asked). If this fails run again and check your internet.

2. Install firmware and all that main required packages

pacstrap /mnt base base-devel nano iwd vim lvm2 cryptsetup limine efibootmgr linux linux-firmware git

Make sure all things installed succesfully, Finally we installed Arch before arch-chroot we need to genareate some fstab files.

NOte : Maybe you are wondering why we are not installing 'networkmanager'. It's a reason we will know about that later

Genarate fstab file

1. Type this command to tell ARch linux which things neeed to be mounted (Very important)

genfstab -U /mnt

Make sure all things are correct!

Now type this command to send the fstab file to fstab folder

genfstab -U /mnt > /mnt/etc/fstab

Now see the file is written succesfully

cat /mnt/etc/fstab

Final chroot steps

Finally, all done now it's time to chroot into your system

Type this command to fstab into your main root

arch-chroot /mnt

Set timezone

Find all aviable regions

ls /usr/share/zoneinfo

This command will list all aviable regions

Find all cities in that region

ls /usr/share/zoneinfo/<Region : America>

Set region and city to the timezone

ln -sf /usr/share/zoneinfo/<Region: America>/<City : New_York> /etc/localtime

Done!

Syncronize the hardware clock

hwclock --systohc

Done

View all date and time info

Now we need to view all date and time info, you can use this comand to list the info

date

Set locale

Type this command to set locale

nano /etc/locale.gen

Now find your locale

Now, you need to find your locale like : en_US.UTF-8 UTF-8

Uncomment the locale

Now remove the pound symbol "#" and press "Ctrl + O" "Enter" then "Ctrl + X"

Now we need to genarate the locale

Type this command do genrate the locale we just set

locale-gen

You should see your locale genrated succesfully

Now set locale.conf file

Create a new file

nano /etc/locale.conf

Now set the locale

LANG=<short_name_of_the_country:like us>.<loacle - UTF.8>

Set hostname (Give your device a name)

Write this command to set hostname

nano /etc/hostname

Now write the name

"Peter"

Set Root Password

Write this command to set root password

passwd

Now write your password

Tips : Make the password unique, secure, memeorable.

Set and add 'sudo' user

Write this command to allow root user to add sudo user

EDITOR=nano visudo

Cind this section

##Uncomment to allow members of group wheel to execute any command
#%wheel ALL=(ALL:ALL) ALL

Now uncomment the bash line

%wheel ALL=(ALL:ALL) ALL

Add a supersuser

useradd -m -G wheel -s /bin/bash <username>

Set the password for superuser

Write this command to set superuser's password

passwd <super_user_username>

Write password and done!

Configure initcpio

EDit this file to set init cpio for encrytion

nano /etc/mkinitcpio.conf

Find the "HOOKS" section

You need to find the hooks section in this file (uncommented)

You should see something like this

HOOKS=(base udev....... block filesystems...)

Now between the block and filesystems section

Add this texts

"encrypt" "lvm2"

So like : HOOKS=(....block encrypt lvm2 filesystems)

Now write

Press "Ctrl + O"

Now exit

Press "Ctrl + X"

Build the initcpio

mkinitcpio -P

Note : make sure you see "encrypt" and "lvm2" section

Done!

Setup Limine Bootloader

Make Limine folder in boot mountpoint

mkdir -p /boot/EFI/limine

Copy Limine boot file

cp /usr/share/limine/BOOTX64.EFI /boot/EFI/limine/

Make EFI entry to boot

# efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Arch Linux Limine Bootloader" --loader '\EFI\limine\BOOTX64.EFI' --unicode

Note : in the disk entry, type disk (example : sda,sdb,nvme0n1,sdx,etc.) and in the part entry type boot partition like (example : 1)

Create Limine config file

Write this command to create the limine config file

nano /boot/EFI/limine/limine.conf

Write a file like this

timeout: 3 

/Arch Linux
    protocol: linux
    path: boot():/vmlinuz-linux
    cmdline: quiet cryptdevice=UUID=<our_encrypted_root_partitions_parent_partition_UUID>:<encrypted_root_name>         root=/dev/mapper/<encrypted_root_name> rw  rootfstype=btrfs #WRITE THIS IN ONE LINE .....
    
    module_path: boot():/initramfs-linux.img

Now you are maybe wondering , how can we get "<our_encrypted_root_partitions_parent_partition_UUID>"

For this send the UUID to limine config file

Note : This UUID is not your's encrypred root partition, it's that partition's parent partition (like : nvme0n1p2 [in this guide])

Run this command to sent the UUID

blkid -o value -s UUID /dev/nvme0n1p2 >> /boot/EFI/limine/limine.conf

Again edit the file

nano /boot/EFI/limine/limine.conf

Find the UUID

It's a alphanumeric long digit string

Cut and paste

Cut the line

Go to that line and press "Ctrl + K"

Paste the line

Go to '<our_encrypted_root_partitions_parent_partition_UUID>' setion and paste the line.

Sample file
timeout: 3 

/Arch Linux
    protocol: linux
    path: boot():/vmlinuz-linux
    cmdline: quiet cryptdevice=UUID=77AyyiY8Y-VGF8GVIVIBI-VGhCCU:cryptroot root=/dev/mapper/cryptroot rw rootfstype=btrfs 
    module_path: boot():/initramfs-linux.img
    

Now, all done!

Exit arch-chroot

Now exit our chroot

exit

Reboot and open boot options

Now type

reboot

and open your boot options (like F2, ESC) and choose "Arch Linux Limine Bootloader" and after that, it should show a entry "Arch Linux" press "Enter".

When it boot it should ask you for the encrypted root password.

After that, you should enter your username and password.

Arch Linux installed

All done, Arch Linux installed succesfully!

Connect to wifi

Simply connect to your wifi and if "iwd" is disabled or any probelm occured

RAun this command

sudo systemctl enable --now iwd.service 

and now you can connect, before instlling Omarchy (YOU CAN INSTALL ANYTHING YOU WANT) we need do this crucial steps:

Set iwd to get all deatils

Type this command to write the file

nano /etc/iwd/main.conf

Now write this

[General]
EnableNetworkConfiguration=true


[Network]
NameResolvingService=none

Set dns now

Write thsi command to write the file

sudo nano /etc/resolv.conf

write like this

NOte : You can enter any dns you want.
nameserver 1.1.1.1
nameserver 8.8.8.8

Lock the file, so it's never get overwritten by any program

sudo chattr +i /etc/resolv.conf

Test the network after installation

Now use "ping" command to check internet.

Like this :

ping -c 2 google.com

If this recives something then great! else ask for help.

Install Omarchy

According to OMarchy 3.1.1 and official manual, you need to run this command to install Omarchy

sudo curl -fsSL https://omarchy.org/install | bash

It can ask you to enter password (one time or two times)

Note : I suggest you to use this command with sudo

Done

I belive this "Simplicity is better than complex, so thsi guide is designed for beginner to advancned. I knwo this guide can contain spelling and grammer mistakes

THANK YOU VERY MUCH! FOR READING OR CONTRIBUTING TO THIS GUIDE

VIDEO TUTORIAL COMMING SOON AS POSSIBLE......

IF YOU NEED ANY HELP CONTACT ME OR ASK ARCH COMMUNITY OR OMARCHY COMMUNITY AND GOOGLE IT!

LICENSE : MIT

@TheAhumMaitra
Copy link
Author

Thanks 😊 for reading this!

Ahum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment