You are not logged in.
Hi,
I've been spending the last couple of days trying to get an encrypted LVM system, but I can't seem to get it right.
System is like this:
/dev/sda1 - for systemd-boot
/dev/sda2 - encrypted LVM
"/dev/sda1" is mounted in "/boot"
Inside LVM is:
/dev/CryptArch/swapvol
/dev/CryptArch/rootvol - ext4
/dev/CryptArch/homevol - ext4
I managed to install everything following the wiki for the LVM part, since I'm a complete beginner in both LVM and LUKS.
The problem is that when booting, systemd asks me the password, but then can't move on and shows something like
mount: unknown filesystem type 'LVM2_member'
Now for my config files.
/boot/loader/entries/arch-encrypted.conf
options cryptdevice=UUID=</dev/sda2 UUID, same as in fstab>:CryptArch-rootvol root=/dev/mapper/CryptArch-rootvol quiet rw
mkinitcpio.conf
HOOKS="...block keymap encrypt lvm2 filesystems ..."
Strange thing is blkid shows something like
/dev/mapper/lvm ... TYPE=LVM2_member
which is the error I get when booting, but I want /dev/mapper/CryptArch-rootvol to be mounted. I tried setting "root=" to UUID of /dev/mapper/CryptArch-rootvol, but systemd can't even find the partition, same when I put /dev/CryptArch/rootvol.
I'm pretty sure the problem is a little thing in a config file, but I can't find it, I tried almost every combination I could think of. I also applied many solutions that I found on the forum, but it only got me this far (I couldn't even input password yesterday ).
Also, in this section of the wiki I'm confused about root, I don't understand the difference between dmname and volumegroup-logicalvolume. My VG is CryptArch, and LV are rootvol, homevol and swapvol.
I can manually mount everything to get other config files if needed.
Thanks.
Last edited by Jojonintendo (2016-02-23 08:04:42)
M/B: Asus M5A97 LE R2.0 CPU: AMD FX(tm)-6100 Six-Core Processor GPU: XFX R9 390 DD Black Edition RAM: Kingston HyperX Beast DDR3 1866 2X4GB SSD: Crucial M4 128GB SATA 3
CPU and GPU are watercooled by Ibercool kit.
Offline
/boot/loader/entries/arch-encrypted.conf
options cryptdevice=UUID=</dev/sda2 UUID, same as in fstab>:CryptArch-rootvol root=/dev/mapper/CryptArch-rootvol quiet rw
For one, try a dmname different from "CryptArch-rootvol", e.g.
options cryptdevice=UUID=</dev/sda2 UUID from blkid>:CryptArch root=/dev/mapper/CryptArch-rootvol quiet rw
Second, double-check the fstab root is indeed /dev/mapper/CryptArch-rootvol.
Offline
Ok, I changed the dmname before booting and that's it. I didn't worry about "cryptsetup=" parameter because it was asking the password when booting, so I thought it was good. I still don't really understand "dmname" vs "vgname-lvname", but my issue is indeed solved. Many thanks!
M/B: Asus M5A97 LE R2.0 CPU: AMD FX(tm)-6100 Six-Core Processor GPU: XFX R9 390 DD Black Edition RAM: Kingston HyperX Beast DDR3 1866 2X4GB SSD: Crucial M4 128GB SATA 3
CPU and GPU are watercooled by Ibercool kit.
Offline
You're welcome. Good it works. Problem apparently a name race condition. If you look at the "blkid" output of your booted system, it will have a "/dev/mapper/CryptArch-rootvol" entry. That is the LVM vg-lv mapped for the device by virtue of your LVM setup. Previously the :dmname already occupied the same /dev/mapper entry when lvm wanted to activate the volumes.
Offline
OK, I think I get where the problem was. Thanks again for taking time to help and explain me
M/B: Asus M5A97 LE R2.0 CPU: AMD FX(tm)-6100 Six-Core Processor GPU: XFX R9 390 DD Black Edition RAM: Kingston HyperX Beast DDR3 1866 2X4GB SSD: Crucial M4 128GB SATA 3
CPU and GPU are watercooled by Ibercool kit.
Offline