I'm trying to set up a new install where my root filesystem is on LVM on top of LUKS, and I don't have a separate boot. I'm using GRUB2 as my bootloader. I don't have an initramfs right now, and it seems like it's really close to working. I'm wondering whether I can get away without an initramfs or whether I will still need one.

Although documentation on how to use GRUB2 with /boot on LVM or LUKS is scarce (nevermind documentation on booting from both of them together), it was ultimately fairly simple to get grub2-install to be happy and install in my ESP without complaining that it couldn't talk to UEFI or that it wouldn't be able to boot from my LUKS/LVM root partition. My current situation is that when I boot, GRUB prompts me for my LUKS passphrase, and then shows me the boot menu. I select my Gentoo setup. GRUB prints out

Code:

Loading Linux 3.12.3-gentoo ...

and then my computer becomes unresponsive. The last line in my grub.cfg before that printout is

Code:

linux /boot/kernel-3.12.3-gentoo root=/dev/mapper/vgssd-root ro

If I interrupt GRUB after entering my passphrase and go into the GRUB shell, I can step through the commands for this menu entry up until this point. I give the linux command and then the boot command and then hang as before. While still in the GRUB2 shell, I can see that my rootfs is mounted, and I can see, for instance, my kernel at /boot/kernel-3.12.3-gentoo. However, /dev only has the default files. In particular, /dev/mapper/vgssd-root is absent.

My intuition is that the root parameter has to actually exist when I boot linux. But I have already mounted that filesystem in GRUB. Is there any way that Linux can just work off of that until it gets far enough along in init to handle its own mounts? Can GRUB make use of udev or something to populate /dev? Or do I have to break down and make an initramfs to map my virtual devices for the kernel before it starts?

# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
#GRUB_GFXMODE=640x480

# Path to theme spec txt file.
# The starfield is by default provided with use truetype.
# NOTE: when enabling custom theme, ensure you have required font/etc.
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"

# Background image used on graphical terminal.
# Can be in various bitmap formats.
#GRUB_BACKGROUND="/boot/grub/mybackground.png"

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

OK, so I just found this guy with my exact same situation, and the response to him was that he needed an initramfs. So I guess I'll do that. Sorry to bother you guys.

I'm still curious, though: If I need an initramfs in this situation, why don't I need one (I think) if my root is just a normal partition (not LVM or LUKS)? How does the kernel get to (say) /dev/sda1 if /dev isn't mounted?