root on lvm on dm-crypt
Hi. I am a fairly new gentoo user, and building a system on my laptop using the root filesystem layered on top of lvm layered on top of dm-crypt encryption. I know that sounds a little difficult for a new user, but I am not willing to use gentoo if I can not set that up.
There are two partitions on my system:
/dev/hda1 xfs /boot
/dev/hda2 dm-encrypted partition
I encrypted /dev/hda2 with dm-crypt, and then created volume group 'vg' on top of that. Boot files go into /boot on /dev/hda1, and all system files are on the logical volume 'system'.
I compiled and installed my kernel with using genkernel and with --luks and --lvm support, and had all needed-components statically compiled in, and installed grub.
However, I can not get successful boot into the new system. I can manually boot into it using the install cd + cryptsetup + mounting everything myself, but I can't do it with just Grub.
I keep trying recommended menu.lst entries provided by pages all over the Internet, but only this one comes close to working:
As far as I can tell, it seems that I am missing some parameter or something that causes the kernel to detect the volume group. (Like I would get when I run vgchange -ay). I dropped to shell and /dev/mapper/root is there but no /dev/mapper/vg-*, which seems to confirm this.
Does anyone know how I would modify this so it works?
After dropping to the ash shell, and reading the init file in the initramfs image for 20 minutes, I found out that there is a parameter called 'dolvm'. Passing that in to the kernel causes it to run vgchange after Luks but before mounting the lvm.
So the modified entry:
|All times are GMT -5. The time now is 02:08 AM.|