LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 09-10-2023, 04:29 PM   #1
husarz
Member
 
Registered: Dec 2016
Location: Poland
Distribution: Fedora/CentOS
Posts: 41

Rep: Reputation: Disabled
cryptsetup encryption of root logical volume


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

Last edited by husarz; 09-10-2023 at 04:32 PM.
 
Old 09-11-2023, 08:50 AM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
I've never tried to encrypt post installation so I maybe off here, but I see this error:
Code:
Timed out waiting for device dev-disk-by\x2duuid-9bcb9c4a\x2ddb77\x2d42c1\x2d4a39c4b87567.device - /dev/disk/by-uuid/9bcb9c4a-db77-42c1-4a39c4b87567.
Shouldn't that have a luks-<disk-uuid> there?
Do you get prompt to enter password during boot?
What is in your fstab?
 
Old 09-11-2023, 10:25 AM   #3
husarz
Member
 
Registered: Dec 2016
Location: Poland
Distribution: Fedora/CentOS
Posts: 41

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dc.901 View Post
Shouldn't that have a luks-<disk-uuid> there?
According to documentation I found about kernel parameters that can be found here:
https://mirrors.edge.kernel.org/pub/...dracutcmdline7

Code:
 rd.luks.uuid=<luks uuid>
    only activate the LUKS partitions with the given UUID. Any "luks-" of the LUKS UUID is removed before comparing to <luks uuid>.
Quote:
Originally Posted by dc.901 View Post
Do you get prompt to enter password during boot?
No, it just hangs after those three lines followed by:
Code:
[ OK ] Reached target sysinit.target - System Initialization.
[ OK ] Reached target basic.target - Basic System.
Quote:
Originally Posted by dc.901 View Post
What is in your fstab?
I showed it in my first post. What do you wish to see more?
 
  


Reply

Tags
cryptsetup, lvm2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
Extended LVM Volume group and Logical Volume. But space not usable linuxlover.chaitanya Linux - Server 1 11-19-2012 09:37 AM
I have spce in volume group but it can not increase the size of logical volume anis123 Linux - Newbie 14 04-16-2012 06:23 AM
[SOLVED] Redhat volume group,logical volume group dhairysheel Red Hat 3 08-02-2011 05:07 AM
Extending logical volume LogVol01 Insufficient allocatable logical exte swap space umeshsharma Linux - Newbie 4 06-22-2009 12:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration