cryptsetup encryption of root logical volume
by husarz from LinuxQuestions.org on (#6EMQ8)
On Fedora 38 I have encrypted root logical volume using this instruction:
https://unix.stackexchange.com/a/710373
After encryption I can do open and mount of the encrypted root logical volume. Then it is working. Then did grub2-mkinstall and dracut -f -kv on chrooted system to apply all changes. My problem is that I can't boot system now with this encrypted root logical volume.
Code:$ lsblk -o name,uuid
(...)
sdb2 <>
vg0temp-homey <>
vg0temp-swap <>
vg0temp-root 9bcb9c4a-db77-42c1-a2d4-4a39c4b87567
(...)Code:/etc/fstab:
/dev/mapper/vg0temp-root / ext4 defaults 1 1
/etc/crypttab:
vg0temp-root /dev/vg0temp/root none
grub2 cmdline:
GRUB_CMDLINE_LINUX="resume=/dev/mapper/vg0temp-swap rd.luks.uuid=9bcb9c4a-db77-42c1-a2d4-4a39c4b87567 rd.lvm.lv=vg0temp/swap rhgb quiet enforcing=0"During the boot process it stucks with:
Code:[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-9bcb9c4a\x2ddb77\x2d42c1\x2d4a39c4b87567.device - /dev/disk/by-uuid/9bcb9c4a-db77-42c1-4a39c4b87567.
[DEPEND] Dependency failed for systemd-cryptsetup@luks\x2d9bcb9c4a\x2ddb77\x2d42c1\x2d4a39c4b87567.service - Cryptography Setup for luks-9bcb9c4a-db77-42c1-4a39c4b87567.
[DEPEND] Dependency failed for cryptsetup.target - Local Encrypted Volumes
https://unix.stackexchange.com/a/710373
After encryption I can do open and mount of the encrypted root logical volume. Then it is working. Then did grub2-mkinstall and dracut -f -kv on chrooted system to apply all changes. My problem is that I can't boot system now with this encrypted root logical volume.
Code:$ lsblk -o name,uuid
(...)
sdb2 <>
vg0temp-homey <>
vg0temp-swap <>
vg0temp-root 9bcb9c4a-db77-42c1-a2d4-4a39c4b87567
(...)Code:/etc/fstab:
/dev/mapper/vg0temp-root / ext4 defaults 1 1
/etc/crypttab:
vg0temp-root /dev/vg0temp/root none
grub2 cmdline:
GRUB_CMDLINE_LINUX="resume=/dev/mapper/vg0temp-swap rd.luks.uuid=9bcb9c4a-db77-42c1-a2d4-4a39c4b87567 rd.lvm.lv=vg0temp/swap rhgb quiet enforcing=0"During the boot process it stucks with:
Code:[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-9bcb9c4a\x2ddb77\x2d42c1\x2d4a39c4b87567.device - /dev/disk/by-uuid/9bcb9c4a-db77-42c1-4a39c4b87567.
[DEPEND] Dependency failed for systemd-cryptsetup@luks\x2d9bcb9c4a\x2ddb77\x2d42c1\x2d4a39c4b87567.service - Cryptography Setup for luks-9bcb9c4a-db77-42c1-4a39c4b87567.
[DEPEND] Dependency failed for cryptsetup.target - Local Encrypted Volumes