I am using genkernel to build kernel 3.5.7 (amd64) on a hardware raid 0 system. The build completes successfully but when trying to boot the kernel, the wrong partition names are generated. I.e.; instead of partition names /dev/mapper/pdc_dcgidcdjb(n) where (n) is 1..6, partition names of /dev/mapper/pdc_dcgidcdjb,
and /dev/mapper/pdc_dcgidcdjb(n) where n is 1..5 are generated. This makes the kernel incompatible with previous versions, other distribution kernels, and files in the gentoo system.
Some specific partition names:
/dev/mapper/pdc_dcgidcdjb should be /dev/mapper/pdc_dcgidcdjb1.
/dev/mapper/pdc_dcgidcdjbp1 should be /dev/mapper/pdc_dcgidcdjb2.
/dev/mapper/pdc_dcgidcdjbp2 should be /dev/mapper/pdc_dcgidcdjb3.
I tried several previous versions of genkernel. 220.127.116.11 and 3.4.33 fail with busybox problems. 3.4.40 also has the problem described above.
Steps to Reproduce:
1. Build existing kernel on system configured with RAID 0 on genkernel; i.e.;
genkernel --dmraid all
2. Attempt to boot the system with grub, using an existing, working grub setting.
3. System will fail to mount the root directory and ask for another.
Messages will appear indicating the various partitions being mounted with names of /dev/mapper/pdc_dcgidcdjb, /dev/mapper/pdc_dcgidcdjbp1, /dev/mapper/pdc_dcgidcdjb2, etc.
The boot process will stop, asking for the correct name of the root partition. You must "press the button" to get out of this state.
The system should mount normally.
I'm submitting this from a kubuntu system, and I have access to files on the gentoo system. I can provide them if you need additional information.
This could be a kernel bug, so I am CCing the kernel team for their opinion.
With that said, the genkernel team is stretched thin with obligations to both genkernel and Gentoo. It is unlikely that we will be able to fix this anytime soon, so it would help us greatly if anyone interested in having this fixed would provide a patch.
Lastly, I am going to repeat a little speech that I gave in another bug involving dmraid. In specific, it might be prudent to consider alternative forms of RAID. dmraid is the absolute worst form of RAID possible from both a performance and a reliability standpoint. In particular, you have no guarantee of recovery should your motherboard die due to the use of non-standard RAID headers. I suggest that people interested in RAID 5 should consider either MD RAID 5 or ZFS raidz. There is a quick install guide for Gentoo on LVM on MD RAID that might be useful for this:
Similarly, I have some notes on how to install Gentoo on ZFS:
Unfortunately, they are not that great for doing an install on raidz, but anyone determined to do it would need to make the appropriate changes (fairly trivial) for raidz and then write his own grub.cfg (because grub2-mkconfig is broken on raidz).
This is already fixed in fcc197b3b552eacf3d4928ef9cb777ff3d411ddc