# [solved] genkernel initramfs needs mdstart, doesn't build it

## ese002

I'm trying to build an initramfs to mount my mdadm mirrored root volume and boot.

I'm using genkernel to generate the initramfs:  I'm using genkernel-next revision 35

genkernel --install --no-ramdisk-modules --mdadm initramfs

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

My genkernel.conf:

crab / # grep -v "^#" /etc/genkernel.conf |uniq

OLDCONFIG="yes"

MENUCONFIG="no"

NCONFIG="no"

CLEAN="yes"

MRPROPER="yes"

MOUNTBOOT="yes"

SAVE_CONFIG="yes"

USECOLOR="yes"

MDADM="yes"

MDADM_CONFIG="/etc/mdadm.conf"

GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"

CACHE_DIR="/var/cache/genkernel"

DISTDIR="${CACHE_DIR}/src"

LOGFILE="/var/log/genkernel.log"

LOGLEVEL=1

DEFAULT_KERNEL_SOURCE="/usr/src/linux"

Any ideas how to get genkernel to behave to maybe to manually patch the init script?  From the debug shell prompt, I can actually run mdadm --assemble and mount the root that way but genkernel wants mdstart.Last edited by ese002 on Tue Dec 24, 2013 6:09 pm; edited 1 time in total

----------

## candrews

You should probably report this bug at https://bugs.gentoo.org/ - I believe I'm experiencing the same problem. Can you do so and reply with a link to the issue?

----------

## ese002

I did notice that the busybox patch in /usr/share/genkernel/patches/  is busybox-1.20.1-mdstart.patch

The version of busybox I have installed is 1.21.0

I will investigate and possibly file a bug report tonight.

----------

## ese002

Bug reported as https://bugs.gentoo.org/show_bug.cgi?id=494804

----------

## ese002

Adding domdadm to the kernel command line gets past the problem.  I still get an error about not finding mdstart but the init script continues on to assemble root with mdadm.  

I have no idea what domdadm is supposed to do but it was suggested on bugzilla and it works.

----------

