LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-14-2013, 06:58 AM   #1
nake
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Rep: Reputation: Disabled
Problems booting from LUKS on top of LVM


Hello all, I'm new to this forum although I've been lurking for a long time now.

As the subject says, I'm having trouble booting a LUKS encrypted root filesystem inside LVM. The problem is that while booting the system doesn't ask for the passphrase and skips mounting the root filesystem thus failing to boot.


I have a single HDD that I divided in 2 partitions, one for /boot and another for LVM. The LVM is divided in several partions (root, home and swap) each one encrypted with their own LUKS passphrase or key.

I did all this setup while installing the system (debian), and everything worked flawlessly, but then I decided to upgrade to the testing branch and that updated my kernel. Now I can't boot using that newly kernel (however I still can use the old one).

I've been googling and searching here for a long time and most of the solutions I found are for LVM inside LUKS, and my setup is the opposite, so they didn't work for me.

As the GRUB commands are the same for both kernels and I added all lvm and crypt related modules to /etc/initramfs-tools/modules and I did not forget to run update-initramfs I suppose this has to do with something in the configuration, but I can't find where my mistake is.

Any ideas on what to do or pointers to where to look for more info?
I wanted to have LUKS inside LVM and not the other way so that later on I can add more hard disks without trouble.

Thanks in advance!
 
Old 12-20-2013, 07:17 AM   #2
nake
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Also, if I copy /usr/share/initramfs-tools/hooks/lvm2 to /etc/initramfs-tools/hooks/lvm2, when I call update-initramfs I get an error about a symbolic link unable to be created because it already exists...

Maybe that's the problem? But I do not know how to solve it.

I also copied the cryptsetup and udev hooks and I have some udev scripts in /etc/initramfs-tools/scripts/init-top and init-bottom

Please anyone?

EDIT: I found a line in the booting process that says: Begin: Loading essential drivers ... modprobe: module lvm2 not found in modules. dep
Then divice-mapper kicks in and then it runs /scripts/init-premount and tries to mount the root filesystem but skips everything.
If I wait a bit I get dropped to the initramfs console but just before that it tells me to check cryptopts=source= bootarg: cat /proc/cmdline or missing modules, devices: cat /proc/modules; ls /dev and something about module ehci-orion not found.
In the initramfs console, if I run cat /proc/modules | grep -i lvm I get nothing Why isn't it being loaded??

Last edited by nake; 12-20-2013 at 07:32 AM.
 
Old 12-30-2013, 06:59 AM   #3
nake
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
I fixed it!
I found that the problem was LVM and not LUKS, so I duckduckgoed and found this post:
http://forums.debian.net/viewtopic.php?t=105549
Where the OP said that he fixed it by editing this in /etc/default/grub:
Quote:
GRUB_CMDLINE_LINUX="lvmwait=/dev/mapper/<whatever_your_root_is> rootdelay=20"
Remember to update-ramfs and that's all folks (^.^)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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+luks siddartha Linux - Newbie 1 01-10-2013 10:18 PM
LUKS on LVM musiqdefunk Linux - Newbie 3 08-11-2012 06:07 AM
Trouble booting new Slack 13. LVM on Luks BashTin Slackware 8 10-22-2011 08:56 PM
Problems installing lilo with RAID/LUKS/LVM - 13.1(64) NyteOwl Slackware 4 03-11-2011 04:09 PM
Luks/Lvm after dd duplication brodo Slackware 10 03-12-2009 04:56 PM

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

All times are GMT -5. The time now is 06:26 PM.

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