Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

[SOLVED] Upgrade dracut -> LUKS fails to open non-root LV

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
jebriggsy
n00b
n00b
Posts: 26
Joined: Thu Aug 22, 2013 5:31 pm
Location: USA

[SOLVED] Upgrade dracut -> LUKS fails to open non-root LV

  • Quote

Post by jebriggsy » Tue Mar 25, 2014 11:01 pm

Hello,

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, dracut 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 have changed.

New kernel & dracut log:

Code: Select all

[    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: Select all

[    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
I don't understand why it unlocks and mounts the root LV but not the swap or /home. I can provide relevant configs & logs if needed. Please help
Last edited by jebriggsy on Fri Mar 28, 2014 3:51 pm, edited 1 time in total.
Top
sebB
l33t
l33t
Posts: 806
Joined: Wed Mar 02, 2011 5:16 pm
Location: S.O. France

  • Quote

Post by sebB » Thu Mar 27, 2014 12:25 am

Dracut > 0.34-r4 ignores DRACUT_MODULES="" in your make.conf

You have to install the ebuild like lvm2... manually.
Look if you don't have unemerged (depclean) one you need.

Code: Select all

To get additional features, a number of optional runtime dependencies may be installed:
[ ] net-misc/curl to Networking support
[ ] net-misc/dhcp[client] to Networking support
[ ] sys-apps/iproute2 to Networking support
[ ] app-benchmarks/bootchart2 to Measure performance of the boot process for later visualisation
[ ] sys-apps/usleep to Measure performance of the boot process for later visualisation
[ ] sys-process/acct to Measure performance of the boot process for later visualisation
[ ] sys-fs/btrfs-progs to Scan for Btrfs on block devices
[ ] sys-libs/libcap to Load kernel modules and drop this privilege for real init
[ ] net-fs/cifs-utils to Support CIFS
[ ] sys-fs/cryptsetup to Decrypt devices encrypted with cryptsetup/LUKS
[ ] app-crypt/gnupg to Support for GPG-encrypted keys for crypt module
[ ] app-shells/dash to Allows use of dash instead of default bash (on your own risk)
[ ] media-gfx/splashutils to Framebuffer splash (media-gfx/splashutils)
[ ] sys-block/open-iscsi to Support iSCSI
[ ] sys-fs/lvm2 to Support Logical Volume Manager
[ ] sys-fs/mdadm to Support MD devices, also known as software RAID devices
[ ] sys-fs/multipath-tools to Support Device Mapper multipathing
[ ] sys-boot/plymouth to Plymouth boot splash
[ ] sys-block/nbd to Support network block devices
[ ] net-fs/nfs-utils to Support NFS 
[ ] net-nds/rpcbind to Support NFS 
[ ] dev-libs/openssl to Install ssh and scp along with config files and specified keys
[ ] app-admin/syslog-ng to Enable logging with syslog-ng or rsyslog
[ ] app-admin/rsyslog to Enable logging with syslog-ng or rsyslog
Top
jebriggsy
n00b
n00b
Posts: 26
Joined: Thu Aug 22, 2013 5:31 pm
Location: USA

  • Quote

Post by jebriggsy » Thu Mar 27, 2014 5:50 am

All required packages are installed. Do those packages need to have static or static-libs flags set? I read something on the dracut wiki page that suggested they might but I hesitate to use them because I'm not 100% sure what they do.

Here is my dracut.conf http://bpaste.net/show/193684/
Top
sebB
l33t
l33t
Posts: 806
Joined: Wed Mar 02, 2011 5:16 pm
Location: S.O. France

  • Quote

Post by sebB » Thu Mar 27, 2014 10:02 am

Can you post fstab, grub and lvscan

You can try with dracut-0.34-r4 to see if the problem is dracut
Top
jebriggsy
n00b
n00b
Posts: 26
Joined: Thu Aug 22, 2013 5:31 pm
Location: USA

  • Quote

Post by jebriggsy » Fri Mar 28, 2014 12:21 am

fstab: http://bpaste.net/show/194535/
lvscan (from working initramfs): http://bpaste.net/show/194536/ (on new initramfs, vg/swap and vg/home are inactive)
grub: http://bpaste.net/show/193682/

Will test with 0.34 and report back

EDIT:

With 0.34, swap now mounts, /home does not.

However, after logging in I can run lvchange -aly vg/home and then mount /home. I believe this narrows the problem down to dracut not running lvchange on all LVs or at least all listed in fstab. Should this be a bug report or am I missing some config option?
Top
sebB
l33t
l33t
Posts: 806
Joined: Wed Mar 02, 2011 5:16 pm
Location: S.O. France

  • Quote

Post by sebB » Fri Mar 28, 2014 1:50 pm

Can you try # in your /etc/dracut.conf

Code: Select all

#hostonly="yes"
This line is strange

Code: Select all

dracut: Scanning devices dm-0  for LVM logical volumes vg/swap vg/root 
I've try with your dracut.conf and the same parameters in my grub. I can't reprouduce the problem, but I don't use luks.
Can you post the output of dracut.... when you generate your initramfs.
Top
jebriggsy
n00b
n00b
Posts: 26
Joined: Thu Aug 22, 2013 5:31 pm
Location: USA

  • Quote

Post by jebriggsy » Fri Mar 28, 2014 3:31 pm

Using 0.34-r4:

Code: Select all

$ sudo dracut '' 3.11.7-hardened-r1 --force
Executing: /usr/bin/dracut  3.11.7-hardened-r1 --force
*** Including module: dash ***
*** Including module: caps ***
*** Including module: i18n ***
*** Including module: crypt ***
*** Including module: dm ***
Skipping udev rule: 64-device-mapper.rules
Skipping udev rule: 60-persistent-storage-dm.rules
Skipping udev rule: 55-dm.rules
*** Including module: kernel-modules ***
*** Including module: lvm ***
Skipping udev rule: 64-device-mapper.rules
Skipping udev rule: 56-lvm.rules
Skipping udev rule: 60-persistent-storage-lvm.rules
*** Including module: debug ***
*** Including module: resume ***
*** Including module: rootfs-block ***
*** Including module: terminfo ***
*** Including module: udev-rules ***
Skipping udev rule: 91-permissions.rules
Skipping udev rule: 80-drivers-modprobe.rules
*** Including module: syslog ***
*** Including module: usrmount ***
*** Including module: base ***
*** Including module: fs-lib ***
*** Including module: shutdown ***
*** Including modules done ***
*** Installing kernel module dependencies and firmware ***
*** Installing kernel module dependencies and firmware done ***
*** Resolving executable dependencies ***
*** Resolving executable dependencies done***
*** Stripping files ***
*** Stripping files done ***
*** Creating image file ***
*** Creating image file done ***
Testing with conig option hostonly="yes" commented out. Will edit after

EDIT: With hostonly="yes" commented out, dracut 0.34-r4 correctly unlocks and mounts all crypto LVs. Will now install 0.36-r4 and test using new config.
EDIT2: Dracut 0.36-r4 also works correctly with hostonly="yes" commented out in /etc/dracut.conf. Will now mark thread as solved.
Top
hika
Apprentice
Apprentice
User avatar
Posts: 234
Joined: Fri Mar 13, 2009 5:55 pm
Location: Utrecht

  • Quote

Post by hika » Thu May 15, 2014 10:52 pm

I can confirm that for some reason the newer dracut versions don't properly support lvm. The device nodes simply don't get created. I had trouble for some time on several systems with creating new a initramfs after a kernel upgrade. Since at those times I had the old initramfs, which worked, I didn't look further. But now I'm installing a new system and I can only get a working initramfs by going back to 034-r4. It seems to coincide with the DRACUT_MODULES keywords not being used anymore! As said no nodes are created, so my guess is the lvm modules are not installed properly anymore since.
I also notice that the initramfs with exactly the same configuration, created with version 034-r4 is one and a half times as big as with 037!

Hika
Top
Post Reply

8 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic