I'm currently trying to get a machine up that boots off a MD RAID1 using an genkernel-generated initramfs. Without using Xen, everything is fine: the initramfs is created, "grub2-mkconfig" finds the kernel and the ramdisk and creates a working menu entry ("linux" and "initrd" line are there).
When I want to use Xen, things go wrong:
grub2-mkconfig detects Xen and the kernel correctly but don't use the initramfs at all. The lines "multiboot /xen.gz ..." and one "module /kernel-..." are there but the one "module /initramfs-..." is missing, resulting in an unbootable system since the root partition cannot be found. When I insert the "module /initramfs-..."-line manually, everything is fine.
Don't know if it's an upstream issue since there seem to be some Gentoo-specifica in /etc/grub.d/* and I'm pretty new to grub
Yeah, there were some late changes to 10_linux regarding detection of a genkernel initramfs for a non-genkernel kernel. We might need to copy those over to 20_linux_xen as well.
Can you confirm that you are building/installing your kernel without genkernel, and then only generating the initramfs with genkernel?
(In reply to comment #1)
> Can you confirm that you are building/installing your kernel without
> genkernel, and then only generating the initramfs with genkernel?
Absolutely correct. Kernel is done completely manual (menuconfig), the initramfs is done via "genkernel --mdadm --install initramfs".
I think it should be fixed now. Look for the following ChangeLog message, and then re-install sys-boot/grub.
+ 31 Mar 2013; Mike Gilbert <firstname.lastname@example.org>
+ +files/grub-2.00-20_linux_xen.patch, grub-2.00-r2.ebuild:
+ Fix detection of genkernel initramfs on xen.
Yep, patch works. Thanks for the fast fix!