You are not logged in.

#1 2024-01-18 13:35:45

iardis
Member
Registered: 2012-11-02
Posts: 14

[SOLVED] Mounting of LUKS on LVM fails after fresh install

Edit: I still do not understand why the config below does not work but since using UUIDs solves this and my system boots now I will mark this as solved.

Hi,
I am trying to set up a new system with Luks 2 on a LVM volume and i am trying to boot that using systemd-boot.

Everything goes smoothly through the boot menu until I get

[***] A start job is running for /dev/mapper/cryptroot  ( ... )

The last hook that loads OK succesfully being

 [ok] Started /usr/binlvm vgchange -aay --autoactivation event VolGroup00

After the mount time out I get
[TIME] Timed out waiting for device /dev/mapper/root
[depend] Dependency failed for File System Check on /dev/mapper/root
[depend] Dependency failed for /sysroot
[depend] Dependency failed for Initrd Root File System
[depend] Dependency failed for Mountpoints Configure in the Real Root
[depend] Dependency failed for Initrd Root Device

Since I am never requested to enter the decryption key, I assume that I messed something up in the systemd-cryptsetup-generator line from /boot/loader/entries/arch.conf (see below for the full file)

options rd.luks.name=/dev/mapper/VolGroup00-lvol0=cryptroot root=/dev/mapper/cryptroot rw

Any hints to what I might check next or what I might have messed up would be greatly appreciated - Thanks in advance!

/etc/fstab

#/dev/mapper/cryptroot 
UUID:8482fef2-0cb8-47d1-bfba-61d21627b8ad     /     ext4     rw,relatime     0 1

# /dev/nvme0n1p1
UUID=BA15-741b     /boot     vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro     0 2

#/dev/nvme0n1p3
UUID=3cc64993-a849-4040-8e80-99b3ac5e3ad8     none     swap     defautls     0 0

/boot/loader/loader.conf

default arch.conf
timeout 4
console-mode auto

/boot/loader/entries/arch.conf

title Arch Linux
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux.img
options rd.luks.name=/dev/VolGroup00/lvol0=root root=/dev/mapper/root rw

/etc/mkinitcpio.conf

MODULES=()
BINARIES=()
FILES=()
HOOKS=(systemd keyboard autodetect modconf kms sd-vconsole block sd-encrypt lvm2 filesystems fsck

/etc/crypttab
is commented out (since I only have the one encrypted root partition

Last edited by iardis (2024-01-19 09:13:05)

Offline

#2 2024-01-18 15:02:54

iardis
Member
Registered: 2012-11-02
Posts: 14

Re: [SOLVED] Mounting of LUKS on LVM fails after fresh install

When I switch to the UUID instead of the reference in the kernel parameter the system boots fine. I am not sure why that is, though? According to the wiki the UUID should not (?) be used for LVM/crypt, no?

Any hints? big_smile

Offline

#3 2024-01-18 15:10:25

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 636

Re: [SOLVED] Mounting of LUKS on LVM fails after fresh install

rd.luks.name supports only UUIDs.

iardis wrote:

According to the wiki the UUID should not (?) be used for LVM/crypt, no?

Where does it say that?

Offline

#4 2024-01-18 15:39:57

iardis
Member
Registered: 2012-11-02
Posts: 14

Re: [SOLVED] Mounting of LUKS on LVM fails after fresh install

from https://wiki.archlinux.org/title/Dm-cry … mkinitcpio

If the file system is formatted directly on the decrypted device file this will be /dev/mapper/dmname.

and also

If the root file system is contained in a logical volume of a fully encrypted LVM, the device mapper for it will be in the general form of root=/dev/volumegroup/logicalvolume.

I think there was also a stronger statement somewhere but I can't find it right now - I have gone through too many pages today.

Offline

#5 2024-01-19 09:13:12

iardis
Member
Registered: 2012-11-02
Posts: 14

Re: [SOLVED] Mounting of LUKS on LVM fails after fresh install

I still do not understand why the config below does not work but since using UUIDs solves this and my system boots now I will mark this as solved.

Offline

Board footer

Powered by FluxBB