You are not logged in.

#1 2026-05-25 20:32:04

CyberSerker
Member
Registered: 2025-12-12
Posts: 3

Arch + Luks + LVM + btrfs

Hello,

I'm encountering some difficulties with my new Arch installation. I'm sending you a PDF file so you can understand.

It's a simple installation with a single SSD, 2 partitions:
1 - EFI
2 - LUKS + LVM + btrfs

You will have access to all the commands. I've searched everywhere and found nothing conclusive for this configuration.

I think I have put the right hooks in the right order, and I've added modules to the GRUB configuration file.

It seems to me that the UUID in my GRUB file is correct.

Yet something tells me the error comes from this file.

Perhaps here:
GRUB_CMDLINE_LINUX="rd.luks.name=YOUR_LUKS_UUID=cryptlvm root=/dev/MyVolGroup/root rootflags=subvol=@"
GRUB_PRELOAD_MODULES="part_gpt part_msdos luks cryptodisk lvm btrfs"

I would appreciate your insights!

------

> "⚠️ Modifications of disks and partitions with fdisk must be carried out with caution."
Example for a single SSD with 2 partitions →
1 - /boot → EFI
2 - Luks + LVM + btrfs
#### Let's start by formatting the boot partition.
```mkfs.fat -n BOOT -F 32 /dev/nvme0n1p1```
Create the LUKS encrypted container at the designated partition. Enter the chosen password twice.
```cryptsetup luksFormat /dev/nvme0n1p2
```
Open the container:
```cryptsetup open /dev/nvme0n1p2 cryptlvm
```
The decrypted container is now available at /dev/mapper/cryptlvm.
#### Preparing the logical volumes
Create a physical volume on top of the opened LUKS container:
```pvcreate /dev/mapper/cryptlvm
```
Create a volume group (in this example named MyVolGroup, but it can be whatever you want) and add the previously created physical volume to it:
```vgcreate MyVolGroup /dev/mapper/cryptlvm
```
Create all your logical volumes on the volume group:
```lvcreate -L 4G -n swap MyVolGroup
lvcreate -L 32G -n root MyVolGroup
lvcreate -l 100%FREE -n home MyVolGroup
```
Format your file systems on each logical volume. For example, using btrfs for the root and home volumes:
```mkfs.btrfs /dev/MyVolGroup/root
mkfs.btrfs /dev/MyVolGroup/home
mkswap /dev/MyVolGroup/swap
```
#### Mount the root volume.
```mount /dev/MyVolGroup/root /mnt```
#### Create subvolumes in root (optional, but recommended for managing snapshots).
```btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@snapshots
```
#### 4. Unmount / remount with subvolumes
```umount /mnt
mount -o subvol=@,ssd,ssd_spread,noatime,compress=zstd:1,space_cache=v2,autodefrag,discard=async /dev/MyVolGroup/root /mnt
mkdir -p /mnt/.snapshots
subvol=@snapshots,ssd,ssd_spread,noatime,compress=zstd:1,space_cache=v2,autodefrag,discard=async /dev/MyVolGroup/root /mnt/.snapshots```
#### 5. Mount the separate home volume in the right place.
```mkdir /mnt/home
mount /dev/MyVolGroup/home /mnt/home   # ← là, c’est un autre LV !

# Créer les subvolumes DANS home
btrfs subvolume create /mnt/home/@home
btrfs subvolume create /mnt/home/@snapshots
btrfs subvolume create /mnt/home/@vm

# Démonter home
umount /mnt/home```
#### 6. Remount home with its subvolumes.
```# Monter le subvolume @home comme /home
mount -o subvol=@home,ssd,ssd_spread,noatime,compress=zstd:1,space_cache=v2,autodefrag,discard=async /dev/MyVolGroup/home /mnt/home

# Créer les points de montage pour les autres subvolumes de home
mkdir /mnt/home/.snapshots
mkdir /mnt/home/VMs

# Monter les autres subvolumes (optionnel, si tu veux les utiliser directement)
subvol=@snapshots,ssd,ssd_spread,noatime,compress=zstd:1,space_cache=v2,autodefrag,discard=async /dev/MyVolGroup/home /mnt/home/.snapshots
subvol=@vm,ssd,ssd_spread,noatime,compress=zstd:1,space_cache=v2,autodefrag,discard=async /dev/MyVolGroup/home /mnt/home/VMs
```
#### 7. Enable swap and mount boot.
```swapon /dev/MyVolGroup/swap
mount --mkdir /dev/nvme0n1p1 /mnt/boot

# 3. Vérifier
swapon --show
free -h```
### Summary of your final structure.
```/dev/MyVolGroup/root (Btrfs)
├── @          → /
├── @snapshots → /.snapshots

/dev/MyVolGroup/home (Btrfs)
├── @home      → /home
├── @snapshots → /home/.snapshots
└── @vm        → /home/vm (ou /home/opt/vm)
```
### Check
```# Lister tous les subvolumes
btrfs subvolume list /mnt
btrfs subvolume list /mnt/home

# Vérifier les montages
mount | grep btrfs
```
## Part 2 of the installation
### Install essential packages
```pacstrap -K /mnt base base-devel linux linux-firmware linux-headers \
  lvm2 \           # Pour LVM
  btrfs-progs \    # Pour BTRFS (si utilisé)
  vim \            # Éditeur
  networkmanager \ # Gestion réseau
  sudo \           # Sudo
  grub \
  efibootmgr
```
### Fstab
```genfstab -U /mnt     #vérification
genfstab -U /mnt >> /mnt/etc/fstab         # Implémentation
cat !$         # vérification```
### Chroot
```arch-chroot /mnt
```
#### Time
```ln -sf /usr/share/zoneinfo/Area/Location /etc/localtime

#Run hwclock(8) to generate /etc/adjtime:

hwclock --systohc```
### Localization
edit /etc/locale.gen → choose your langage.
```vim /etc/locale.gen
locale-gen```
edit /etc/locale.conf → write your langage.
```LANG=fr_FR.UTF-8
LC_MESSAGES=fr_FR.UTF-8```
Create : /etc/vconsole.conf
```echo "KEYMAP=us" > /etc/vconsole.conf```
### Network configuration
Create : /etc/hostname
```echo "macOSSequoia" > /etc/hostname```
### Configuring mkinitcpio
Modify hooks : /etc/mkinitcpio.conf
```HOOKS=(base systemd btrfs autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt lvm2 filesystems fsck)

mkinitcpio -P```
#### Root password
Set a secure password for the root user to allow performing administrative actions:
```passwd
```
### Boot loader
```# 1. Installer GRUB (au cas où)
mkdir /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --recheck

# 2. Vérifier ton UUID
lsblk -f /dev/nvme0n1p2     #parition à déchiffrer
blkid -s UUID -o value /dev/nvme0n1p2 | tee -a /etc/default/grub

# 3. Éditer /etc/default/grub
vim /etc/default/grub

# 4. Ajouter/modifier les deux lignes
GRUB_ENABLE_CRYPTODISK=y
GRUB_CMDLINE_LINUX="rd.luks.name=TON_UUID_LUKS=cryptlvm root=/dev/MyVolGroup/root rootflags=subvol=@"
GRUB_PRELOAD_MODULES="part_gpt part_msdos luks cryptodisk lvm btrfs"

# 5. Générer la config
grub-mkconfig -o /boot/grub/grub.cfg

# 6. Démonter proprement
exit     # Sortir de l'arch-chroot
umount -R /mnt
swapoff -a
reboot```

Offline

#2 2026-05-25 22:36:30

cryptearth
Member
Registered: 2024-02-03
Posts: 2,152

Re: Arch + Luks + LVM + btrfs

this forum only supports the official way: https://wiki.archlinux.org/title/Installation_guide
who ever gave you these instructions - if you have trouble ask them

Offline

#3 2026-05-25 23:17:57

ajgringo619
Member
Registered: 2023-05-06
Posts: 46

Re: Arch + Luks + LVM + btrfs

For a simple installation, what's the reason for using LVM?

Offline

#4 Yesterday 01:19:55

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,173
Website

Re: Arch + Luks + LVM + btrfs

It looks like you're attempting an LVM on LUKS setup, which is documented in the Arch Wiki, but then slapping BTRFS on the top of it. I've never put BTRFS on top of LVM, so I'm not sure whether there are benefits to doing it or not.

What specific error are you getting when you boot, because then we might be able to actually start diagnosing what is wrong?

Last edited by clfarron4 (Yesterday 01:21:58)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#5 Yesterday 08:59:59

CyberSerker
Member
Registered: 2025-12-12
Posts: 3

Re: Arch + Luks + LVM + btrfs

Hello,

It's absolutely the documentation that I read: LVM on LUKS.

I want to use LVM + BTRFS because I think it's the most modern architecture we can install and the most optimized management of memory.

It's why I ask the forum, I didn't see any documentation about this architecture on the wiki!

Offline

#6 Yesterday 10:14:37

stronnag
Member
Registered: 2011-01-25
Posts: 77

Re: Arch + Luks + LVM + btrfs

works just fine (whole disk encryption + btrfs + compression).

limine kernel line:

cmdline: rd.luks.uuid=c38bf004-89c1-4664-8652-1a49ed558d1b rd.luks.name=c38bf004-89c1-4664-8652-1a49ed558d1b=root rw rootflags=noatime,compress=zstd rootfstype=btrfs

dracut as the initrd builder, limine as boot manager

Last edited by stronnag (Yesterday 10:16:59)

Offline

#7 Yesterday 10:45:07

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,023

Re: Arch + Luks + LVM + btrfs

HOOKS=(base systemd btrfs autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt lvm2 filesystems fsck)

The filesystems hook should take care of btrfs , also btrfs won't be relevant/needed until lvm2 has initialised so it makes no sense to put it before lvm2 .

Please post the output of lsblk -f so we can see how you setup things.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#8 Yesterday 18:39:17

CyberSerker
Member
Registered: 2025-12-12
Posts: 3

Re: Arch + Luks + LVM + btrfs

stronnag wrote:

works just fine (whole disk encryption + btrfs + compression).

limine kernel line:

cmdline: rd.luks.uuid=c38bf004-89c1-4664-8652-1a49ed558d1b rd.luks.name=c38bf004-89c1-4664-8652-1a49ed558d1b=root rw rootflags=noatime,compress=zstd rootfstype=btrfs

dracut as the initrd builder, limine as boot manager

Ok, i will check what about dracut, however I prefer to use Grub if I find the solution.

What about my architecture ?

lsblk -f :
NAME                  FSTYPE        FSVER      LABEL     UUID           FSAVAIL     FSUSE%     MOUNTPOINTS
- nvme0n1p1      vfat              FAT32      BOOT      UUID

- nvme0n1p2      cryptoluks     2      UUID
  - cryptlvm          LVM2_member    LVM2 001      UUID
    - MyVolGroup-swap
                               swap   1   lvm-swap     UUID   
    - MyVolGroup-root
                               btrfs        btrfs_root     UUID    40G     6%    /
    - MyVolGroup
                               btrfs        btrfs_home   UUID  910G    0%    /home

Offline

Board footer

Powered by FluxBB