LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-25-2014, 07:44 PM   #1
jebriggsy
LQ Newbie
 
Registered: Mar 2014
Location: New England, USA
Distribution: Hardened Gentoo
Posts: 4

Rep: Reputation: Disabled
Question Dracut: Fails to unlock/mount LUKS after update


Hello,

First, I apologize in advance if this is the wrong forum, first time posting on this board.

Distro: Hardened Gentoo

I have recently upgraded my bootloader from GRUB Legacy (0.97-r12) to GRUB2 (2.00_p5107-r2), my kernel from 3.9.9-hardened to 3.11.7-hardened-r1, and Dracut from 031-r1 to 036-r4. After this, I used dracut to create an initramfs for 3.11.7-hardened-r1. It now fails to mount my encrypted swap and home LVs. I have been troubleshooting this for about a day now and have hit a roadblock. No matter what I do I can't get them to mount. I still have my 3.9.9 kernel and initramfs in GRUB2, and those mount/unlock my home and swap without issue.

Examining the logs shows the difference but I can't seem to locate what settings might have changed.

New kernel & dracut log:
Code:
[    1.465737] dracut: dracut-036-r4
[    2.450423] dracut: luksOpen /dev/sda2 luks-cfdc5b46-0c38-4825-ad12-3cddf2685941  
[   14.703674] dracut: Scanning devices dm-0  for LVM logical volumes vg/swap vg/root
[   14.815655] dracut: inactive '/dev/vg/swap' [8.00 GiB] inherit
[   14.815918] dracut: inactive '/dev/vg/root' [128.00 GiB] inherit
[   14.816146] dracut: inactive '/dev/vg/home' [459.00 GiB] inherit
[   15.296564] dracut: Checking ext4: /dev/vg/root
[   15.296890] dracut: issuing e2fsck -a  /dev/vg/root
[   15.395030] dracut: /dev/vg/root: clean, 527502/8388608 files, 4252630/33554432 blocks
[   15.397705] dracut: Mounting /dev/vg/root with -o noatime,ro
[   15.552075] dracut: Mounted root filesystem /dev/mapper/vg-root
[   15.732521] dracut: Switching root
Old (functioning) kernel & dracut log:
Code:
[    3.261836] dracut: dracut-031-r1
[    4.102284] dracut: luksOpen /dev/sda2 luks-cfdc5b46-0c38-4825-ad12-3cddf2685941  
[   18.403140] dracut: Scanning devices dm-0  for LVM volume groups 
[   18.408544] dracut: Reading all physical volumes. This may take a while...
[   18.412908] dracut: Found volume group "vg" using metadata type lvm2
[   18.442946] dracut: 3 logical volume(s) in volume group "vg" now active
[   18.838639] dracut: Checking ext4: /dev/mapper/vg-root
[   18.838951] dracut: issuing e2fsck -a  /dev/mapper/vg-root
[   18.917471] dracut: /dev/mapper/vg-root: clean, 527792/8388608 files, 4248981/33554432 blocks
[   18.920099] dracut: Mounting /dev/mapper/vg-root with -o noatime,ro
[   19.085850] dracut: Mounted root filesystem /dev/mapper/vg-root
[   24.274358] dracut: Switching root
blkid from working config:
Code:
/dev/sda1: UUID="67b786de-c9bf-41f8-9947-5432e52a8b76" TYPE="ext2" 
/dev/sda2: UUID="cfdc5b46-0c38-4825-ad12-3cddf2685941" TYPE="crypto_LUKS" 
/dev/mapper/luks-cfdc5b46-0c38-4825-ad12-3cddf2685941: UUID="hSB8yP-H6wb-E2p4-6cWL-wMue-57Ly-awGoCo" TYPE="LVM2_member" 
/dev/mapper/vg-swap: UUID="31116bf1-a0f8-47e2-bbca-365abd0f47d4" TYPE="swap" 
/dev/mapper/vg-root: UUID="37b102b3-e34b-40f8-b396-89fdab6a2338" TYPE="ext4" 
/dev/mapper/vg-home: UUID="dca1437e-cab3-4224-ba9c-b5846bb9f0c8" TYPE="ext4"
cat /etc/fstab:
Code:
/dev/sda1               /boot           ext2            noauto,noatime                  1 2
/dev/vg/root            /               ext4            noatime                         0 1
/dev/vg/home            /home           ext4
/dev/vg/swap            none            swap            sw                              0 0
/dev/cdrom              /mnt/cdrom      auto            noauto,ro                       0 0

cat /boot/grub/grub.cfg: http://bpaste.net/show/193682/
cat /etc/dracut.conf: http://bpaste.net/show/193684/

I don't understand why it unlocks and mounts the root LV but not the swap or /home :/

Any help would be great!
 
Old 03-27-2014, 08:21 PM   #2
jebriggsy
LQ Newbie
 
Registered: Mar 2014
Location: New England, USA
Distribution: Hardened Gentoo
Posts: 4

Original Poster
Rep: Reputation: Disabled
Update:

Narrowed the problem down to dracut failing to run lvchange on non-root LVs. Suggestions to rectify this appreciated... or if this should be a bug report, let me know so I can file it.

In the meantime, my current workaround is to add lvchange -aly vg/home && lvchange -aly vg/swap && swapon && mount /home to my /etc/kde/startup/agent-startup.sh and umount /home to /etc/kde/shutdown/agent-shudown.sh.
 
Old 03-28-2014, 10:54 AM   #3
jebriggsy
LQ Newbie
 
Registered: Mar 2014
Location: New England, USA
Distribution: Hardened Gentoo
Posts: 4

Original Poster
Rep: Reputation: Disabled
Talking

Solution found:

Problem was config option hostonly="yes" in /etc/dracut.conf. After commenting out, dracut-generated initramfs works as expected using both versions 0.34-r4 and 0.36-r4. See http://forums.gentoo.org/viewtopic-p-7523742.html for more info.

Marking thread solved.
 
  


Reply



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
[SOLVED] Can't unlock LUKS volume with a keyfile during boot natharran Slackware 3 02-27-2013 02:00 PM
[SOLVED] Unlock LUKS encrypted partition with USB drive yenn Slackware 4 02-26-2013 04:39 PM
[SOLVED] can't unlock luks home when booting gorillus Slackware 4 01-16-2012 05:39 PM
[SOLVED] Kernel update on LUKS and LVM encrypted Slackware, mount fails KMBS Slackware 15 02-08-2010 01:23 PM
LXer: Automatically Unlock LUKS Encrypted Drives With A Keyfile LXer Syndicated Linux News 0 07-09-2008 03:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:12 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