PDA

View Full Version : Boot now takes more than 2 minutes after adding second encrypted PV to LVM



brianweber13
9th November 2017, 06:36 PM
I've scoured google for information, but I really don't even know how to ask the right questions.

I have a thinkpad x1 carbon (2016) with fedora and windows 10 in a dual-boot configuration. I shrunk the windows partition in increase the amount of space available for fedora. The free space on my hard drive was before the start of my fedora partition, but that's not a problem because I have an lvm. I can just create a new pv. I had set up fedora with luks, so when I created another PV, I used dm-crypt to encrypt it. I created a keyfile for that new crypt and tried to make dracut aware of it by creating a file "luks-keys.conf" in /etc/dracut.conf.d/ with the line
install_items+=" /path/to/keyfile " I also added the appropriate entries to /etc/crypttab.

(I think that's all the pertinent information about mysetup. Let me know if you need more)

Now, when I boot fedora, it takes upwards of two minutes. After two minutes, "dracut initqueue timeout: starting timeout scripts" is output, and then the boot only takes a few seconds. Below is more information:

Any suggestions on how I can fix this and get my laptop to boot quickly again?

Kernel Command line: from /proc/cmdline (I noticed it doesn't include info about my new crypt partition.... is this a problem?)

BOOT_IMAGE=/vmlinuz-4.13.10-200.fc26.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-84d1a694-79e5-4aa7-b0a9-cb259244858b rd.lvm.lv=fedora/swap rhgb quiet LANG=en_US.UTF-8


crypttab (first entry was autogenerated by fedora on install, I added the second line)

luks-84d1a694-79e5-4aa7-b0a9-cb259244858b UUID=84d1a694-79e5-4aa7-b0a9-cb259244858b none discard
luks-21c364b0-23ec-4e5e-a7a2-cefc70b1ceb2 UUID=21c364b0-23ec-4e5e-a7a2-cefc70b1ceb2 none discard


fstab


#
# /etc/fstab
# Created by anaconda on Thu Aug 10 19:46:34 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/fedora-root / ext4 defaults,x-systemd.device-timeout=0 1 1
UUID=455cd99a-9895-4477-aab7-2a7c22c30e34 /boot ext4 defaults 1 2
UUID=F08F-85B1 /boot/efi vfat umask=0077,shortname=winnt 0 2
/dev/mapper/fedora-swap swap swap defaults,x-systemd.device-timeout=0 0 0


output of dmsetup ls --tree

fedora-swap (253:1)
└─luks-84d1a694-79e5-4aa7-b0a9-cb259244858b (253:0)
└─ (8:7)
fedora-root (253:3)
├─luks-21c364b0-23ec-4e5e-a7a2-cefc70b1ceb2 (253:4)
│ └─ (8:8)
└─luks-84d1a694-79e5-4aa7-b0a9-cb259244858b (253:0)
└─ (8:7)
fedora-root-missing_1_0 (253:2)


Output of lvm pvdisplay

--- Physical volume ---
PV Name /dev/mapper/luks-84d1a694-79e5-4aa7-b0a9-cb259244858b
VG Name fedora
PV Size 119.10 GiB / not usable 2.00 MiB
Allocatable NO
PE Size 4.00 MiB
Total PE 30489
Free PE 0
Allocated PE 30489
PV UUID 0h0XP8-PdS8-0303-zh0x-f3hT-wCH9-Sm6XOu

--- Physical volume ---
PV Name /dev/mapper/luks-21c364b0-23ec-4e5e-a7a2-cefc70b1ceb2
VG Name fedora
PV Size 81.90 GiB / not usable 2.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 20966
Free PE 0
Allocated PE 20966
PV UUID y8RvLH-5X6w-pRwi-Kzl3-zk7u-Jtm3-hOvUW0


output of lvm vgdisplay

--- Volume group ---
VG Name fedora
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 16
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 201.00 GiB
PE Size 4.00 MiB
Total PE 51455
Alloc PE / Size 51455 / 201.00 GiB
Free PE / Size 0 / 0
VG UUID enHugQ-Yv3V-nWKd-2A3K-2Nnu-qWhq-EV7S6r


output of lvm lvdisplay

--- Logical volume ---
LV Path /dev/fedora/swap
LV Name swap
VG Name fedora
LV UUID oVcakr-7aFe-fG0U-hkOd-P2Kl-ddb1-2y0Czd
LV Write Access read/write
LV Creation host, time localhost-live, 2017-08-10 17:43:34 -0600
LV Status available
# open 2
LV Size 5.02 GiB
Current LE 1286
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Path /dev/fedora/root
LV Name root
VG Name fedora
LV UUID PMDaVH-w0Y8-ngX2-yPmE-QIon-15f5-wxVhAN
LV Write Access read/write
LV Creation host, time localhost-live, 2017-08-10 17:43:34 -0600
LV Status available
# open 1
LV Size 195.97 GiB
Current LE 50169
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3

brianweber13
11th November 2017, 08:08 PM
ping? I'm at a loss here and I could really use some help.

amiga
13th November 2017, 03:03 AM
Kernel Command line: from /proc/cmdline (I noticed it doesn't include info about my new crypt partition.... is this a problem?)

Yes it would be. I assume Anaconda created your grub2 configuration. You would need to add
rd.luks.uuid=luks-21c364b0-23ec-4e5e-a7a2-cefc70b1ceb2
to the GRUB_CMDLINE_LINUX variable in the file /etc/default/grub and then regenerate your config file with grub2-mkconfig.

I do have a question. Since you now have two keys does that mean you will have to enter two luks pass-phrases at every boot ? Couldn't you encrypt the new PV with the same key as the first ?


but that's not a problem because I have an lvm.

You don't "have an lvm". You use Logical Volume Management and have an LVM Volume Group.

brianweber13
14th November 2017, 09:15 PM
Thanks, I'll try that out now and report back.


I do have a question. Since you now have two keys does that mean you will have to enter two luks pass-phrases at every boot ? Couldn't you encrypt the new PV with the same key as the first

My intention was to create a keyfile, make dracut aware of that file, and place it on the first pv. That way I would enter my passphrase for the first pv and make the keyfile available for dracut to unlock the second pv. However, we'll see if I can actually get that to work.