I've encrypted my / with LUKS, then added LUKS="yes" into /etc/genkernel.conf and crypt_root=/dev/sda1 into kernel line in /boot/grub/menu.lst So, now I have system that boots from encrypted root and everything looks good excepting one small issue: I haven't /dev/mapper/root device on my encrypted root, so fsck initscript fails at startup. I've found only one symlink (possibly created by udev) that refers to actual encrypted device /dev/root -> dm-0, so now I using "ln -s /dev/root /dev/mapper/root" in fsck script as workaround, but it's ugly solution. I think that udev (or something else) should create device node (or, at least, symlink) at proper place . Reproducible: Always
Please paste the complete grub boot entry. If it doesn't use "real_root=": please try that. If it doesn't include "dolvm": please try that.
Here is exact grub menu entry: title Gentoo 2.6.34-r12 root (hd0,0) kernel /boot/kernel-genkernel-x86_64-2.6.34-gentoo-r12 root=/dev/ram0 crypt_root=/dev/sda2 real_root=/dev/mapper/root initrd /boot/initramfs-genkernel-x86_64-2.6.34-gentoo-r12 Adding/removing real_root parameter don't changes anything, such as dolvm. Just by the way, I don't use lvm.
Thanks for that info. I'm wondering why cryptsetup is not creating /dev/mapper/root. The call crypt_filter "cryptsetup ${cryptsetup_options} luksOpen ${LUKS_DEVICE} ${LUKS_NAME}" in /usr/share/genkernel/defaults/initrd.scripts makes me expect its creation. What does "ls -al /dev/mapper/" show for you? Anything besides control? If that doesn't reveal anything, I'm out of ideas for now.
initramfs script works correctly, but it creates symlink in ramfs, so when / remounts from actual root, new fs doesn't contain required link. % mount rootfs on / type rootfs (rw) <--- ramfs root /dev/mapper/root on / type ext4 (rw,noatime,commit=0) <-- actual root, but /dev/mapper/root is located on ramfs root % ls -ls /dev/mapper total 0 0 crw-rw---- 1 root root 10, 59 Nov 21 13:34 control ... 0 lrwxrwxrwx 1 root root 9 Nov 21 13:34 root -> /dev/root 0 brw-rw---- 1 root disk 253, 1 Nov 21 13:34 swap 0 brw-rw---- 1 root disk 253, 2 Nov 21 13:34 tmp ... Note: the > root -> /dev/root symlink was created from fsck script
*** Bug 352047 has been marked as a duplicate of this bug. ***
To my current understanding this is what happens: - /dev/mapper/root is created - on switch_root (of busybox) it disappears - udev is not re-creating it As udev does not seem to mount on top of an existing /dev, we have to et udev to create it. Any ideas on how to best make that happen?
The recent commits have a good chance of fixing this already. Could you give gennkernel-99999 (five nines) a spin and report back? In case I do not hear anything from you I may close this bug in two weeks.
Confirmed off the bug, closing. Patch included in genkernel 3.4.13.