Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo on LVM on LUKS: missing mapped name and pvs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
slangdaddy
n00b
n00b


Joined: 17 Jul 2007
Posts: 73
Location: Braunschweig

PostPosted: Tue Sep 30, 2014 7:57 pm    Post subject: Gentoo on LVM on LUKS: missing mapped name and pvs Reply with quote

Hi my dear gentoo fellows,

I am facing a very strange behaviour right now. For years I've been running my notebook setup which has a luks volume containing a volume group with my root fs et al. There were the usual struggles in the beginning. Finding kernel configuration and grub parameters, but I managed to get it working.

Now with my last world update, grub2-mkconfig cannot find my volume groups anymore, thus leaving my grub.conf fairly empty (not a single working entry anymore). It emits a few "No volume groups found" though.

Digging into this, I discovered, that there is no luks mapping under /dev/mapper, but trying to open the luks volume (/dev/sda3) results in "Cannot use device /dev/sda3 which is in use (already mapped or mounted)." Strangely enough, I am not able to find any such mapped device.

In effect, there are no physical volumes and no volume group. Keep in mind, that this setup is already booted.


I am lost right now, because I sure will not be able to boot into a usable system until this is resolved. Any help ist greatly appreciated.

For the record, this is my kernel cmd line (izanagi, the host name, being the lvm volume group name):
Code:
BOOT_IMAGE=/kernel-genkernel-x86_64-3.14.14-gentoo root=/dev/mapper/izanagi-root ro crypt_root=/dev/sda3 real_root=/dev/mapper/izanagi-root real_resume=/dev/mapper/izanagi-swap root_trim=yes rootfstype=ext4 dolvm
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Oct 01, 2014 10:05 am    Post subject: Reply with quote

Well i use something similar myself.

You should figure out how to mount it with a livecd and than you have several options:

My approach is to use the genkernel initramfs from 2 years ago with an up to date kernel with an unencrypted, readable ext2 /boot partition. You could use an usb key too.

Well for myself it is not clear how you have set it up.

a) Do you have a partition which contains a lvm volume? And this lvm volume contains a luks partition?

b) Or do you have a partition which contains a luks partition? and that luks partition contains a lvm volume which contains your root than?

Plesae specify if you have a or b.

In my expierence genkernel initramfs works with a proper kernel and proper grub flags for the kernel. I personally use a).



Possible commands to figure something out

pvdisplay
lvdisplay
vgscan

cryptsetup luksopen /dev/.... choosen_name (check howto write luksopen in manpage)
mount /dev/mapper/choosen_name /mountpoint
Back to top
View user's profile Send private message
slangdaddy
n00b
n00b


Joined: 17 Jul 2007
Posts: 73
Location: Braunschweig

PostPosted: Wed Oct 01, 2014 5:29 pm    Post subject: Reply with quote

Thanks for your answer, tw04l124. I will look into using a live system as you suggested.

Here is how my system is set up:

/dev/sda - internal SSD with 3 Partitions:
/dev/sda1 - ext2 boot partition with grub2, no encryption or fancy stuff here
/dev/sda2 - BIOS boot partition (I am using EFI/GPT)
/dev/sda3 - luks encrypted volume which (that, in turn, has the volume group for my root fs and such)

So this would be your option b.

I am, too, using genkernel with an initramfs on an unencrypted ext2 boot partition. LVM an LUKS enabled in genkernel.conf. The kernel currently is gentoo-sources 3.14.14. The passphrase to unlock the luks volume is interactivly entered on boot (after initramfs is loaded). After that, the volume group is initialized and the boot sequence continued.


Everything has been working fine up until now, kernel and grub updates went smoothly..
Back to top
View user's profile Send private message
slangdaddy
n00b
n00b


Joined: 17 Jul 2007
Posts: 73
Location: Braunschweig

PostPosted: Wed Oct 01, 2014 6:43 pm    Post subject: Reply with quote

Well it turns out, that the problem sat in front of the screen, again :-(

I did not mount /boot, so grub2-mkconfig COULD not find any kernels to add.. After mounting /boot everything looks good again.

I am feeling really dumb right now, but aside from that, my problem is solved :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum