Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 494804 - sys-kernel/genkernel-next: initramfs needs mdstart, doesn't build it
Summary: sys-kernel/genkernel-next: initramfs needs mdstart, doesn't build it
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal major with 1 vote (vote)
Assignee: Fabio Erculiani (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-20 05:46 UTC by Eric Edwards
Modified: 2016-05-23 14:55 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Edwards 2013-12-20 05:46:30 UTC
The genkernel initramfs uses mdstart to mount a mirrored root.  Unfortunately, genkernel-next revision 35 does not include any file named mdstart in the initramfs causing the boot to fail.

Reproducible: Always

Steps to Reproduce:
1. genkernel --install --no-ramdisk-modules --mdadm initramfs 
2. reboot
3. fail!
Actual Results:  
The init script calls "mdstart" which fails with "not found" causing root not to be mounted. Using the debug option, I have determined that the initramfs created does not contain mdstart. If I look in /usr/share/genkernel/patches/, I can see busybox-1.20.1-mdstart.patch, a patch to busybox to add mdstart. However, this doesn't seem to be used 

Expected Results:  
mdstart should be built using the patch included in genkernel.

Tested with genkernel-next revision 35 and busybox 1.21.0.  I also tried with busybox 1.20.2 but nothing changed.   busybox-1.20.1 seems to not be in portage
Comment 1 Fabio Erculiani (RETIRED) gentoo-dev 2013-12-20 14:35:58 UTC
I believe that the mdstart codepath is an old heritage and nowadays mdadm does all the device nodes magic for you.
However, I guess that --no-ramdisk-modules prevents mdadm from working correctly, why are you using that option? Can you try without it and see if it works?
Then I'll be able to figure out if the mdstart cruft should be removed.
Comment 2 Eric Edwards 2013-12-20 15:14:15 UTC
--no-ramdisk-modules comes from initramfs howto:  https://wiki.gentoo.org/wiki/Initramfs/HOWTO

However, i've done it without this option and it makes no difference.  As it should be.  In my kernel there no loadable modules.  Booting with the debug option, I can even run mdadm --assemble manually and it works.
Comment 3 Fabio Erculiani (RETIRED) gentoo-dev 2013-12-22 07:20:19 UTC
What is your kernel boot command line? Does it have "domdadm" ?
Comment 4 Eric Edwards 2013-12-23 05:16:04 UTC
I tried domadm before but I think the result may have been obscured by another error.  Adding domam does seem to get past the problem.  Thanks.  I now have:

root=/dev/md22 init=/usr/lib/systemd/systemd resume=swap:/dev/md5 rootfstype=ext4 crashkernel=128M domdadm

What is domdam for?  I have seen several references that one might want to use domdadm but nothing that expresses what the option is supposed to do and why it would make sense to use it.  It this case, it seems to direct flow away from an area that is broken.
Comment 5 Pacho Ramos gentoo-dev 2015-05-23 09:23:45 UTC
is this still valid with version 63?