| View previous topic :: View next topic |
| Author |
Message |
GenProm n00b

Joined: 18 Aug 2011 Posts: 57 Location: Germany
|
Posted: Sun Feb 19, 2012 12:11 am Post subject: [solved] DMcrypt and LVM not working at boot |
|
|
Hi
I cant manage to get lvm and dmcrypt to work at boot......
Background:
I installed Gentoo on an SSD with out var and home and a data partition.
Var, home and the data partition are on the other hdd i got myself.
I did put home and my data in an lvm so i have to enter the password only once. the partition with var is not encrypted.
My Layout:
sda1 (ssd) /
sdb1 (hdd) (luks_encrypted ->lvm) home and data in volumegroups
sdb2 (hdd) var
What should happen:
LVM schould ask for password and decrypt partition and volume group fstab schould mount.
What does happen:
Lots of errors at boot time...., not asked for password.
I can open the partition from hand but somehow the volume groups are not displayed so i can mount them.....
I think this is part of the problem.
Some Info:
LVM:
| Quote: |
Pyh volume name of LVM: lukslvm
Volume group: vgprivate
Name of the partitions inside: vgprivate-home, vgprivate-data
|
fstab:
| Quote: |
/dev/sda1 / ext4 noatime 0 1
/dev/sdb3 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
none /tmp tmpfs nodev,noexec,nosuid 0 0
#
/dev/sdb2 /mnt/g_var ext4 noatime 0 0
/mnt/g_var /var none bind 0 0
/dev/mapper/crypthome /home ext4 noatime 0 0
/dev/mapper/cryptdata /mnt/data ext4 noatime 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
|
conf.d/dmcrypt
| Quote: |
target=crypthome
source='/dev/mapper/vgprivate-home'
target=cryptdata
source='/dev/mapper/vgprivate-data'
|
Some of the errors at boot say they cant find the vgprivate.... groups, this is logical then the partition is still encrypted and i did not get asked for password.
Also as mentioned above, i think part of the problem is, that when i decrypt manualy, the volume groups get not created....
UPDATE: I can solve this by activating the volume goups after unlocking the partition.
How can this be done on boot time ?
Also i did ad dmcrypt to boot runlevel. I guess it boils down how to activate the volume groups at boot and why im not asked to put in my password....
I did lvm encryption a long time ago on Ubuntu but it seems stuff in gentoo is quite different.
Oh i tried to use a /etc/crypttab without succes....
As aslways if you need mire info just ask for it....
Any help would be greatly appreacheated.
Thanks
M. _________________ Thank you for your help.
Manuel
Last edited by GenProm on Sun Feb 19, 2012 11:42 am; edited 1 time in total |
|
| Back to top |
|
 |
Veldrin Veteran


Joined: 27 Jul 2004 Posts: 1931 Location: Zurich, Switzerland
|
Posted: Sun Feb 19, 2012 12:35 am Post subject: |
|
|
there seems to be a misunderstanding of which part belongs where.
Is it correct, that you encrypted the entire lvm container, and not lv?
if that is the case your dmcypt should show something like
| Code: | target=lukslvm
source=/dev/sdb1 |
/dev/mapper/lukslvm will then be the source device for your lvm setup. (I do not know lvm, therefore i cannot be of help).
how did you end up with that fstab?
V. _________________ read the portage output!
If my answer is too short, just ask for an explanation. |
|
| Back to top |
|
 |
GenProm n00b

Joined: 18 Aug 2011 Posts: 57 Location: Germany
|
Posted: Sun Feb 19, 2012 12:46 am Post subject: |
|
|
Hi
Thanks, this solved the one problem of not get asked about the password.
The other problem i have is that the volume groups are deativated and for this reason not created and so on found by fstab....
Does somebody know how to activate the volume groups on boot ?
I did follow a guide on the net where one guy was encrypting this home and tmp in an lvm so it was pretty close to my approach. Also a used the stage3 fstab and did my changes...
Thanks for the quick help  _________________ Thank you for your help.
Manuel |
|
| Back to top |
|
 |
Veldrin Veteran


Joined: 27 Jul 2004 Posts: 1931 Location: Zurich, Switzerland
|
Posted: Sun Feb 19, 2012 1:26 am Post subject: |
|
|
rc-update add lvm boot? _________________ read the portage output!
If my answer is too short, just ask for an explanation. |
|
| Back to top |
|
 |
GenProm n00b

Joined: 18 Aug 2011 Posts: 57 Location: Germany
|
Posted: Sun Feb 19, 2012 11:40 am Post subject: |
|
|
Thanks this did the trick!
You made my day  _________________ Thank you for your help.
Manuel |
|
| Back to top |
|
 |
|