2

I'm not able to boot a freshly installed Arch Linux system with its root file system residing on a LVM thinly provisioned logical volume on a LUKS encrypted partition on a GUID partitioned device.

When Systemd's boot loader systemd-boot loads my boot entry Arch Linux it asks me for the passphrase of the LUKS encrypted partition but then, after 10 seconds, fails to activate the LVM volume group on which the root file system of Arch Linux resides. Eventually it drops me into the rescue shell rootfs.

Any ideas if what I'm trying to achieve is possible with Arch Linux?

N.B. I'm new to Arch Linux and thus carefully read upfront all of the Arch Wiki articles relevant for installing an Arch Linux system on that particular storage configuration.

The boot entry Arch Linux (/boot/loader/entries/arch.conf) I specifically configured looks as follows:

title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=PARTUUID=<of /dev/sda3>:system root=UUID=<of /dev/system/arch.root> rootfstype=ext4 add_efi_memmap

For completeness what follows is a gist of how I configured my storage devices:

$ parted —align optimal
(parted) unit MiB
(parted) select /dev/sda
(parted) mklabel gpt
(parted) mkpart primary 1 2
(parted) name 1 bios
(parted) set 1 bios_grub on
(parted) mkpart primary 2 1026
(parted) name 2 uefi
(parted) set 2 boot on
(parted) mkpart primary 1026 103426
(parted) name 3 system
(parted) quit
$ mkfs -t vfat -n UEFI -F 32 /dev/sda2
$ cryptsetup luksFormat —hash sha512 —cipher aes-xts-plain64  —key-size 512 /dev/sda3
$ cryptsetup open /dev/sda3 system
$ pvcreate /dev/mapper/system
$ vgcreate system /dev/mapper/system
$ lvcreate —type thin-pool —name pool —size 75G system
$ lvcreate —type thin —name swap —virtualsize 4G —thinpool system/pool
$ mkswap -L swap /dev/system/swap
$ lvcreate —type thin —name arch.root —virtualsize 20G —thinpool system/pool
$ mkfs -t ext4 -L arch.root /dev/system/arch.root
2

It looks like that the hook lvm2 run after the hook encrypt during Arch Linux's Initial RAM filesystem phase is not able to activate thinly provisioned logical volumes.

With the same storage configuration as depicted in my question except for normal logical volumes instead of thinly provisioned ones the volume group containing these can be activated without any problems. With this change Arch Linux successfully boots.

So instead of creating thin logical volumes:

$ lvcreate —type thin-pool —name pool —size 75G system
$ lvcreate —type thin —name swap —virtualsize 4G —thinpool system/pool
$ mkswap -L swap /dev/system/swap
$ lvcreate —type thin —name arch.root —virtualsize 20G —thinpool system/pool
$ mkfs -t ext4 -L arch.root /dev/system/arch.root

One must create normal logical volumes:

$ lvcreate —name swap —size 4G system
$ mkswap -L swap /dev/system/swap
$ lvcreate —name arch.root —size 20G system
$ mkfs -t ext4 -L arch.root /dev/system/arch.root

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.