Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 446916 - sys-kernel/genkernel-3.4.45 produces bad volume names with --dmraid option
Summary: sys-kernel/genkernel-3.4.45 produces bad volume names with --dmraid option
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: AMD64 Linux
: Low normal (vote)
Assignee: Gentoo Genkernel Maintainers
Keywords: NeedPatch
Depends on:
Reported: 2012-12-11 20:51 UTC by John Cox
Modified: 2017-01-02 23:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description John Cox 2012-12-11 20:51:34 UTC
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. and 3.4.33 fail with busybox problems. 3.4.40 also has the problem described above.

Reproducible: Always

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.
Actual Results:  
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.

Expected Results:  
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.
Comment 1 Richard Yao (RETIRED) gentoo-dev 2013-06-06 07:21:59 UTC
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).
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-01-02 23:39:44 UTC
This is already fixed in fcc197b3b552eacf3d4928ef9cb777ff3d411ddc