# dmraid and kernel 2.6.16-gentoo-r11 amd64

## stoil

I've been trying to upgrade my kernel (currently linux-2.6.15-gentoo-r7 - it is not changed since installation). However some problems with raid are encountered. Probably I do something wrong, but when new kernel boots and searches root partition it fails  :Sad: . Then I follow nice advice from screen and enter in minimalistic console. 

"dmraid -r" shows raid devices, but under /dev/mapper there is only one device without number and my root partition obviosly can't be found. What could be wrong?

----------

## zxy

Dmraid works also with 2.6.16 and 2.6.17 kernels. I just managed to make it work. 

But you must use dmraid 1.0.0-rc11. Earlier versions wont boot!!! There is only testing version 1.0.0-rc11_pre1. Which worked for me and many others. 

Here is a good howto that I used. (genkernel and non-genkernel) 

http://gentoo-wiki.com/HOWTO_Install_Gentoo_with_NVRAID_using_dmraid

Do not forget to use dmraid version 11 in the scripts. 

I also used busybox-0.60.5 and device-mapper 1.01.05 for dmraidinitrd script. 

Higher versions didn't compile for me. (that was some time ago, maybe today they do)

Good luck.....

This is part of dmraidintrd file I used during installation 

```
#changing this values might involve editing make_busybox()

BUSYBOX_URI_PREFIX="http://www.busybox.net/downloads/"

BUSYBOX_TARBALL="busybox-0.60.5.tar.bz2"

BUSYBOX_DIR="busybox-0.60.5"

#changing this values might involve editing make_devicemapper()

DEVICEMAPPER_URI_PREFIX="ftp://sources.redhat.com/pub/dm/"

DEVICEMAPPER_TARBALL="device-mapper.1.01.05.tgz"

DEVICEMAPPER_DIR="device-mapper.1.01.05"

#changing this values might involve editing make_dmraid()

#please, don't use older versions of dmraid with this version of dmraidinitrd

#DMRAID_URI_PREFIX="http://people.redhat.com/~heinzm/sw/dmraid/src/"

DMRAID_URI_PREFIX="http://people.redhat.com/~heinzm/sw/dmraid/tst/"

#DMRAID_TARBALL="dmraid-1.0.0.rc10.tar.bz2"

DMRAID_TARBALL="dmraid-1.0.0.rc11-pre1.tar.bz2"

DMRAID_DIR="dmraid/1.0.0.rc11"

```

----------

## stoil

I had to put more information here - I use genkernel and just have seen that there is post for my problem - https://forums.gentoo.org/viewtopic-t-470335.html. So this is duplicated.

----------

## stoil

Now I see that:

emerge -s dmraid

Searching...

[ Results for search key : dmraid ]

[ Applications found : 1 ]

*  sys-fs/dmraid

      Latest version available: 1.0.0_rc8-r1

      Latest version installed: 1.0.0_rc8-r1

      Size of files: 127 kB

      Homepage:      http://people.redhat.com/~heinzm/sw/dmraid/

      Description:   dmraid (Device-mapper RAID tool and library)

      License:       GPL-2

So this should be the problem. Are there plans to upgrade ebuild?

----------

## zxy

rc11 is not inportage.

In the link I posted before you get the instructions.

Here you can get the .tar.bz2 files you need to put in /usr/portage/distfiles folder 

[url]DMRAID_URI_PREFIX="http://people.redhat.com/~heinzm/sw/dmraid/src/"[/url] 

[url]DMRAID_URI_PREFIX="http://people.redhat.com/~heinzm/sw/dmraid/tst/"[/url]

Create portage overlay for dmraid 1.0.0-rc11 (or pre1)

and put in this ebuild (edit tle SRC_URI line in the beginning and enter the http  addres of the .tar.bz2 file)

the file is called dmraid-1.0.0_rc11.ebuild

```
# Copyright 2005-2005 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/sys-fs/dmraid/dmraid-1.0.0_rc8-r1.ebuild,v 1.1 2005/07/28 02:24:07 solar Exp $

inherit linux-info flag-o-matic

DESCRIPTION="dmraid (Device-mapper RAID tool and library)"

HOMEPAGE="http://people.redhat.com/~heinzm/sw/dmraid/"

#SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/src/${P/_/.}.tar.bz2"

# Temporarily set to testing prerelease source URI

SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/tst/dmraid-1.0.0.rc11-pre1.tar.bz2"

LICENSE="GPL-2"

SLOT="0"

KEYWORDS="x86 amd64"

IUSE="static selinux"

DEPEND="sys-fs/device-mapper

      selinux? ( sys-libs/libselinux )

      selinux? ( sys-libs/libsepol )"

S=${WORKDIR}/${PN}/${PV/_/.}

pkg_setup() {

   if kernel_is lt 2 6; then

      ewarn "You are using a kernel < 2.6"

      ewarn "DMraid uses recently introduced Device-Mapper features."

      ewarn "These might be unavailable in the kernel you are running now."

   fi

}

#src_unpack() {

#   unpack ${A}

#   # Made a new patch for rc11, but removal of asr created other problems with this version (rc11-pre1)

#   epatch ${FILESDIR}/${PN}-1.0.0-rc11-asr-make.patch

#   cd ${S}

#}

src_compile() {

   local myconf=

   #myconf="${myconf} $(use_enable static static_link)"

   

   if use static; then

      myconf="${myconf} --enable-static_link"

      if use selinux; then

         ewarn "NOTE - compiling with libselinux / libsepol is not currently possible for static"

      fi

      myconf="${myconf} --disable-libsepol --disable-libselinux"

   else

      myconf="${myconf} --enable-shared_lib"

      myconf="${myconf} $(use_enable selinux libselinux)"

      myconf="${myconf} $(use_enable selinux libsepol)"

   fi

   #inlining doesnt seem to work for dmraid

   filter-flags -fno-inline

   ./configure ${myconf} || die "Failed configure"

   emake || die "emake failed"

}

src_install() {

   einstall DESTDIR=${D} || die "einstall failed"

   dolib.a lib/libdmraid.a

   # no header file is installed by make install

   insinto /usr/include

   newins include/dmraid.h libdmraid.h

   dodoc CHANGELOG README TODO KNOWN_BUGS doc/*

}

pkg_postinst() {

   echo

   einfo "For booting Gentoo from Device-Mapper RAID you can use Genkernel."

   echo

   einfo "Genkernel will generate the kernel and the initrd with a staticly linked dmraid binary:"

   einfo "emerge -av sys-kernel/genkernel"

   einfo "genkernel --dmraid --udev all"

   echo

   ewarn "DMraid should be safe to use, but no warranties can be given"

   echo

   ebeep

}

```

----------

## dreadhead

1.0.0_r11-pre1 doesn't compile here... :Crying or Very sad: 

```
format/ataraid/asr.o: In function `register_asr':

asr.c:(.text+0x1c40): multiple definition of `register_asr'

format/ataraid/asr.o:asr.c:(.text+0x1c40): first defined here

collect2: ld returned 1 exit status

make[1]: *** [../lib/libdmraid.so] Error 1

make[1]: Leaving directory `/var/tmp/portage/dmraid-1.0.0_rc11/work/dmraid/1.0.0.rc11/lib'

make: *** [lib] Error 2

!!! ERROR: sys-fs/dmraid-1.0.0_rc11 failed.

Call stack:

  ebuild.sh, line 1539:   Called dyn_compile

  ebuild.sh, line 939:   Called src_compile

  dmraid-1.0.0_rc11.ebuild, line 58:   Called die

!!! emake failed

```

----------

## stoil

I've just tried it out and the result is the same - it doesn't compile with the same error.

----------

## stoil

Just have tried with 2.6.16-r12. The same error (on amd64).

----------

## stoil

It seems that I don't read well nice postings:

 *Quote:*   

> I also used busybox-0.60.5 and device-mapper 1.01.05 for dmraidinitrd script. 

 

This is not the case here. So I wait for portage with somehow fixed issue.

----------

## AngryLlama

I have the same problem.  I followed the NVRAID howto exactly.  GRUB starts, the kernel starts, but it fails to mount the root partition.

I am using RC10 because following the HOWTO causes this version to be installed.  I haven't tried the latest versions yet, it seems that everyone else has had problems with it.

Is there anyway to fix this?  Now both my Gentoo systems are in limbo.  One with broken raid and the other with a screwed up Xorg.

EDIT: I also tried using genkernel, but I still get "Block Device /dev/mapper/nvidia_fubar3 is not a valid root device... The root block device is unspecified or not detected.  Strangely, it works fine off of the Live CD.

----------

## dreadhead

I'd suggest using a kernel <= 2.6.15 until rc11 or rc12 is in portage. You could try to install rc11 by hand but I think you will end up with a compile error. But its already known that kernels >= 2.6.16 don't work with rc10.

----------

## AngryLlama

 *dreadhead wrote:*   

> I'd suggest using a kernel <= 2.6.15 until rc11 or rc12 is in portage. You could try to install rc11 by hand but I think you will end up with a compile error. But its already known that kernels >= 2.6.16 don't work with rc10.

 

Excellent, that fixed it.

----------

## Choas_2k

youll have to use an Portage overlay and USE="static" than it will work.

Id recommend someone who solved this porblem on amd64 or x86 should write a Howto.

As it seems in https://bugs.gentoo.org/show_bug.cgi?id=107826 dmraid will be removed out of portage.

So i think it should be a good idea to write an howto on gentoo-wiki.com.

I am willing to do this (on the German wiki) because my English is very bad. Someone would have to translate it.

Would be my first Howto. But for first ill have to fix my raid myself.....

----------

## sibov

 :Laughing:  That solves my issue THANKS

----------

## the_mk

here

http://people.redhat.com/~heinzm/sw/dmraid/tst/dmraid-1.0.0.rc12-pre1.static

we can find a static binary of rc12, lastest testing version of dmraid

dmraid-1.0.0.rc12-pre1.static version:          1.0.0.rc12-pre1 (2006.07.06) static debug

dmraid-1.0.0.rc12-pre1.static library version:  1.0.0.rc12-pre1 (2006.07.06)

device-mapper version:  4.6.0

----------

## rekr

I get the same errors when trying to use the ebuild for rc11 what exactly does:

USE="static" than it will work. 

mean and where do I do it?

Thanks

Doug

----------

## dreadhead

 *rekr wrote:*   

> I get the same errors when trying to use the ebuild for rc11 what exactly does:
> 
> USE="static" than it will work. 
> 
> mean and where do I do it?
> ...

 

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=2

----------

