# Genkernel w/ software raid: Could not mount specified ROOT

## EdwardAtGentoo

I'm having trouble using genkernel to make an initrd and kernel with software raid support. I can compile the kernel by hand and have the system boot with software raid activated, but using genkernel just doesn't work. Here's the error along with genkernel.conf, fstab, and grub.conf.

mount: mounting /dev/md3 on /newroot failed: Invalid argument

!! Could not mount specified ROOT, try again

!! Could not find the root block device in .

genkernel.conf

----------------------------------------------------------------------------------------------------------------

# Configuration file for genkernel

# This file is sourced by genkernel at startup and determines which options

# we will be using to compile our kernel.  The order of precidence is simple,

# with the internal settings being least important, configuration file

# settings next, and command line options being most important.

# =========Common Command Line Option Defaults=========

# Run 'make oldconfig' before compiling this kernel?

OLDCONFIG="yes"

# Run 'make menuconfig' before compiling this kernel?

MENUCONFIG="yes"

# Run 'make clean' before compilation?

# If set to NO, implies MRPROPER WILL NOT be run

# Also, if clean is NO, it won't copy over any configuration

# file, it will use what's there.

CLEAN="yes"

# Run 'make mrproper' before configuration/compilation?

MRPROPER="yes"

# Override the arch detection?

# ARCH_OVERRIDE="x86"

# Mount BOOTDIR automatically if it isn't mounted?

MOUNTBOOT="yes"

# Make symlinks in BOOTDIR automatically?

# SYMLINK="no"

# Save the new configuration in /etc/kernels upon

# successfull compilation

SAVE_CONFIG="yes"

# Use Color output in Genkernel?

USECOLOR="yes"

# Clear build cache dir

# CLEAR_CACHE_DIR="yes"

# Genkernel uses an independent configuration for MAKEOPTS, and does not source

# /etc/make.conf . You can override the default setting by uncommenting and

# tweaking the following line. Default setting is set up by

# ${GK_SHARE}/${ARCH_OVERRIDE}/config.sh . The recommended value for -j

# argument is: <number of processors>*<number of cores per processor>+1

# MAKEOPTS="-j2"

# Add in LVM support from static binaries if they exist on the system, or

# compile static LVM binaries if static ones do not exist.

LVM="yes"

# Add in EVMS support from static binaries if they exist on the system: you

# should run "emerge evms" first.

# EVMS="no"

# Add DMRAID support.

DMRAID="yes"

# Include (or suppresses the inclusion of) busybox in the initrd or initramfs.

# If included, busybox is rebuilt if the cached copy is out of date.

# BUSYBOX="yes"

# Copy /etc/mdadm.conf to initramfs.

MDADM="yes"

# Add Multipath support.

# MULTIPATH="no"

# Enable copying of firmware into initramfs

# FIRMWARE="no"

# Specify directory to pull from

# FIRMWARE_DIR="/lib/firmware"

# Specify specific firmware files to include. This overrides FIRMWARE_DIR

# FIRMWARE_FILES=""

# Enable disklabel support (copies blkid to initrd)

# DISKLABEL="yes"

# =========Low Level Compile Settings=========

#

# GNU Make to use for kernel.  See also the --kernel-make command line option.

# KERNEL_MAKE="make"

# Compiler to use for the kernel (e.g. distcc).  See also the --kernel-cc

# command line option.

# KERNEL_CC="gcc"

# Assembler to use for the kernel.  See also the --kernel-as command line

# option.

# KERNEL_AS="as"

# Linker to use for the kernel.  See also the --kernel-ld command line option.

# KERNEL_LD="ld"

# GNU Make to use for the utilities.  See also the --utils-make command line

# option.

# UTILS_MAKE="make"

# Compiler to use for the utilities (e.g. distcc).  See also the --utils-cc

# command line option.

# UTILS_CC="gcc"

# Assembler to use for the utilities.  See also the --utils-as command line

# option.

# UTILS_AS="as"

# Linker to use for the utilities.  See also the --utils-ld command line

# option.

# UTILS_LD="ld"

# =========GENKERNEL LOCATION CONFIGURATION============

# Variables:

#   %%ARCH%%  - Final determined architecture

#   %%CACHE%% - Final determined cache location

# Set genkernel's temporary work directory.  Default is /var/tmp/genkernel

# TMPDIR="/var/tmp/genkernel"

# Set the boot directory, default is /boot

#BOOTDIR="/boot"

# Default share directory location

GK_SHARE="/usr/share/genkernel"

# Location of the default cache

CACHE_DIR="/var/cache/genkernel"

# Location of DISTDIR, where our source tarballs are stored

DISTDIR="${CACHE_DIR}/src"

# Log output file

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

# Debug Level

LOGLEVEL=1

# Default location of kernel source

DEFAULT_KERNEL_SOURCE="/usr/src/linux"

# Default kernel config (only use to override using

# arch/%%ARCH%%/kernel-config-${VER}.${PAT} !)

# DEFAULT_KERNEL_CONFIG="${GK_SHARE}/arch/%%ARCH%%/kernel-config"

BUSYBOX_VER="1.7.4"

BUSYBOX_SRCTAR="${DISTDIR}/busybox-${BUSYBOX_VER}.tar.bz2"

BUSYBOX_DIR="busybox-${BUSYBOX_VER}"

BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2"

DEVICE_MAPPER_VER="1.02.22"

DEVICE_MAPPER_DIR="device-mapper.${DEVICE_MAPPER_VER}"

DEVICE_MAPPER_SRCTAR="${DISTDIR}/device-mapper.${DEVICE_MAPPER_VER}.tgz"

DEVICE_MAPPER_BINCACHE="%%CACHE%%/device-mapper-${DEVICE_MAPPER_VER}-%%ARCH%%.tar.bz2"

LVM_VER="2.02.28"

LVM_DIR="LVM2.${LVM_VER}"

LVM_SRCTAR="${DISTDIR}/LVM2.${LVM_VER}.tgz"

LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2"

DMRAID_VER="1.0.0.rc14"

DMRAID_DIR="dmraid/${DMRAID_VER}"

DMRAID_SRCTAR="${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2"

DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2"

E2FSPROGS_VER="1.40.9"

E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}"

E2FSPROGS_SRCTAR="${DISTDIR}/e2fsprogs-${E2FSPROGS_VER}.tar.gz"

BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2"

FUSE_VER="2.7.4"

FUSE_DIR="fuse-${FUSE_VER}"

FUSE_SRCTAR="${DISTDIR}/fuse-${FUSE_VER}.tar.gz"

FUSE_BINCACHE="%%CACHE%%/fuse-${FUSE_VER}-%%ARCH%%.tar.bz2"

UNIONFS_FUSE_VER="0.22"

UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}"

UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2"

UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2"

fstab

----------------------------------------------------------------------------------------------------------------

# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't 

# needed; notail increases performance of ReiserFS (at the expense of storage 

# efficiency).  It's safe to drop the noatime options if you want and to 

# switch between notail / tail freely.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# See the manpage fstab(5) for more information.

#

# <fs>			<mountpoint>	<type>		<opts>		<dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/md1		/boot		ext2		defaults	1 2

/dev/md3		/		ext3		defaults	0 1

/dev/sda2		swap		swap		defaults,pri=1		0 0

/dev/sdb2		swap		swap		defaults,pri=1		0 0

/dev/vg/usr		/usr		ext3		defaults	0 1

/dev/vg/opt		/opt		ext3		defaults	0 1

/dev/vg/home		/home		ext3		defaults	0 1

/dev/vg/var		/var		ext3		defaults	0 1

/dev/vg/tmp		/tmp		ext3		defaults	0 1

/dev/vg/vartmp		/var/tmp	ext3		defaults	0 1

/dev/cdrom		/mnt/cdrom	auto		noauto,ro	0 0

#/dev/fd0		/mnt/floppy	auto		noauto		0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm			/dev/shm	tmpfs		nodev,nosuid,noexec	0 0

grub.conf

----------------------------------------------------------------------------------------------------------------

default 0

timeout 10

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 2.6.29-r5

root (hd0,0)

kernel /boot/kernel-genkernel-x86_64-2.6.29-gentoo-r5 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/md3 md=3,/dev/sda3,/dev/sdb3 dolvm dodmraid

initrd /boot/initramfs-genkernel-x86_64-2.6.29-gentoo-r5

#

# vim:ft=conf:

----------

## richard.scott

is this part correct:

```
md=3,/dev/sda3,/dev/sdb3
```

Where did you find out about this option?

I'd try removing it as I don't have this?

Also, check that your MD partitions have the partition type of FD otherwise they won't get auto-detected.

----------

## EdwardAtGentoo

Thanks for your reply.

I didn't set the partition ID!

----------

