View previous topic :: View next topic |
Author |
Message |
Xander314 n00b
Joined: 16 Apr 2012 Posts: 61
|
Posted: Fri Nov 09, 2012 6:37 pm Post subject: Dracut initramfs fails to detect/decrypt encrypted root |
|
|
I'm having a go at installing Gentoo on my laptop into an encrypted partition. I'm booting from a USB drive and the boot partition is /dev/sda4. I used Dracut to generate the initramfs (emerged with lvm and crypt in DRACUT_MODULES).
However, Dracut drops me to a rescue prompt since it fails to mount the root partition. The message it gives is
Quote: | dracut Warning: could not boot
dracut Warning: "dev/mapper/vg-root" does not exist
|
As far as I can see, the problem is that the initramfs is not attempting to decrypt the LUKS partition. If I decrypt it manually from the prompt with Code: | cryptsetup luksOpen /dev/sda4 crypt | and exit the prompt, the initramfs successfully detects the LVM volumes on the partition and finishes the boot. But why doesn't the initramfs decrypt my LUKS partition automatically? It's encrypted with a password but there is not even a prompt.
My kernel command line specifies
Code: | root=/dev/mapper/vg-root cryptdevice=/dev/sda4:crypt |
What am I doing wrong? |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Sat Nov 10, 2012 6:24 am Post subject: |
|
|
dont know Dracut specifically, but with most of the initramfs tools ive seen, the kernel command line had to be something like
Code: |
root=/dev/ram0 real_root=/dev/mapper/vg-root cryptdevice=/dev/sda4:crypt
|
shot in the dark. again, dont know specifics about Dracut. It could well be the initramfs is confused as to whether it's lvm atop dmcrypt, or dmcrypt atop luks. Could even be lack of devtmpfs. Dunno
If you otherwise get stuck, or if you want to pick apart the generated initramfs and compare, I put together this which might help _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
Xander314 n00b
Joined: 16 Apr 2012 Posts: 61
|
Posted: Sat Nov 17, 2012 9:54 am Post subject: |
|
|
I fixed it by adding this to the kernel command line:
Code: | rd.luks.uuid=<UUID of /dev/sda4> |
I don't know why this is necessary since the initramfs is supposed to find LUKS volumes automatically, but it appears to have worked nonetheless.
Thanks for your help |
|
Back to top |
|
|
consus n00b
Joined: 27 Aug 2012 Posts: 38
|
Posted: Sat Nov 17, 2012 8:37 pm Post subject: |
|
|
commit e064127729af69c5147a0e91eb9147124340004d
Author: Harald Hoyer <harald@redhat.com>
Date: Thu Sep 27 14:05:50 2012 +0200
add "rd.auto" parameter and switch off automatic assembly
No automatic assembly is done anymore by default. You will have to
specify exactly what devices to assemble
("rd.md.uuid=" "rd.luks.uuid" ...)
or use "rd.auto=1" or "rd.auto" on the kernel command line.
For big servers with thousands of disks we don't want to assemble
everything by default (error prone, slow). |
|
Back to top |
|
|
Xander314 n00b
Joined: 16 Apr 2012 Posts: 61
|
Posted: Sat Nov 24, 2012 9:39 pm Post subject: |
|
|
That explains it... Thanks. |
|
Back to top |
|
|
|