# RAID1 , initrd creation failure !

## TUX4O

Hi, gentoo-fans!

I'm trying to install Gentoo with RAID1 (Promice FastTrack S150 TX4 controller) and 2  163GB SATA HDD.

Gentoo Install Cd doesn't understand RAID1  ... and because of it I'm booting Gen2dmraid cd (with option dodmraid). 

http://tienstra4.flatnet.tudelft.nl/~gerte/gen2dmraid/

Now I have:

```
Disk /dev/mapper/pdc_cdehedided: 163.0 GB, 163000000000 bytes

255 heads, 63 sectors/track, 19816 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

                     Device Boot      Start         End      Blocks   Id  System

/dev/mapper/pdc_cdehedided1   *           1         609     4891761   83  Linux

/dev/mapper/pdc_cdehedided2             610         853     1959930   82  Linux swap / Solaris

/dev/mapper/pdc_cdehedided3             854       19816   152320297+  83  Linux

and they are mounted as follows:

/dev/mapper/pdc_cdehedided3 on /mnt/gentoo type ext3 (rw)

/dev/mapper/pdc_cdehedided1 on /mnt/gentoo/boot type ext2 (rw)

/dev/mapper/pdc_cdehedided2 is active swap (mkswap & swapon)
```

this is working RAID1   :Smile: 

Because I want to continue with Gentoo Install cd and install Portage it was necessary start Gen2dmraid CD  with -docache option.  (gentoo -docache). 

This helps me successfuly unmount /mnt/cdrom , remove Gen2dmraid CD and put into the cdrom-device Gentoo Install CD and continue installation (step by step  :Smile: .

After some installation steps there is other problem when I try to create kernel and initrd images:

```

#emerge -av genkernel

#genkernel --udev --dmraid all
```

 bzImage is ready. initrd - no (There is many errors)

I try to make only initrd:

```
#genkernel --dmraid initrd
```

and the result is   :Crying or Very sad: :

```
 * Gentoo Linux Genkernel; Version 3.3.4[0m

* Running with options: --dmraid initrd

* Linux Kernel 2.6.12-gentoo-r6[0m for x86[0m...

* initramfs: >> Initializing...

*         >> Creating base_layout cpio archive...

*         >> Creating auxilary cpio archive...

*         >> Creating busybox cpio archive...

*         >> Creating udev cpio archive...

*         >> Creating dmraid cpio archive...

* DMRAID: Adding support (compiling binaries)...

* dmraid: >> Configuring...

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

checking target system type... i686-pc-linux-gnu

checking for gawk... gawk

checking for a BSD-compatible install... /bin/install -c

checking whether ln -s works... yes

checking whether make sets ${MAKE}... yes

checking for ranlib... ranlib

checking for gcc... gcc

checking for C compiler default output... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables... 

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for dirent.h that defines DIR... yes

checking for library containing opendir... none required

checking how to run the C preprocessor... gcc -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking fcntl.h usability... yes

checking fcntl.h presence... yes

checking for fcntl.h... yes

checking sys/ioctl.h usability... yes

checking sys/ioctl.h presence... yes

checking for sys/ioctl.h... yes

checking for unistd.h... (cached) yes

checking malloc.h usability... yes

checking malloc.h presence... yes

checking for malloc.h... yes

checking for gcc option to accept ANSI C... none needed

checking for an ANSI C-conforming const... yes

checking for inline... inline

checking for off_t... yes

checking for pid_t... yes

checking for size_t... yes

checking for struct stat.st_rdev... yes

checking whether time.h and sys/time.h may both be included... yes

checking whether to enable debugging... 

no

checking whether to enable malloc debugging... 

no

checking whether to disable native metadata logging... 

yes

checking whether to disable testing with mapped devices... 

no

checking whether gcc needs -traditional... no

checking return type of signal handlers... void

checking for vprintf... yes

checking for _doprnt... no

checking for mkdir... yes

checking for rmdir... yes

checking for uname... yes

checking getopt.h usability... yes

checking getopt.h presence... yes

checking for getopt.h... yes

configure: creating ./config.status

config.status: creating lib/Makefile

config.status: creating man/Makefile

config.status: creating tools/Makefile

config.status: creating tools/version.h

config.status: creating Makefile

config.status: creating make.tmpl

* dmraid: >> Compiling...

COMMAND: make -j2 CC="gcc" LD="ld" AS="as" 

make -C lib

make[1]: Entering directory `/var/tmp/genkernel/21507.12526.937.482/dmraid/1.0.0.rc8/lib'

gcc -MM -MF activate/activate.d -I. -I../include -I../lib -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE activate/activate.c; \

gcc -c -I. -I../include -I../lib -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE activate/activate.c -o activate/activate.o

gcc -MM -MF activate/devmapper.d -I. -I../include -I../lib -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE activate/devmapper.c; \

gcc -c -I. -I../include -I../lib -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE activate/devmapper.c -o activate/devmapper.o

activate/devmapper.c:12:26: libdevmapper.h: No such file or directory 

activate/devmapper.c: In function `mkdm_path':

activate/devmapper.c:29: warning: implicit declaration of function `dm_dir'

activate/devmapper.c:29: warning: initialization makes pointer from integer without a cast

activate/devmapper.c: In function `_init_dm':

activate/devmapper.c:49: warning: implicit declaration of function `dm_log_init'

activate/devmapper.c: At top level:

activate/devmapper.c:53: warning: `struct dm_task' declared inside parameter list

activate/devmapper.c:53: warning: its scope is only this definition or declaration, which is probably not what you want

activate/devmapper.c: In function `_exit_dm':

activate/devmapper.c:56: warning: implicit declaration of function `dm_task_destroy'

activate/devmapper.c:58: warning: implicit declaration of function `dm_lib_release'

activate/devmapper.c:59: warning: implicit declaration of function `dm_lib_exit'

activate/devmapper.c: In function `get_target_list':

activate/devmapper.c:72: warning: implicit declaration of function `dm_task_create'

activate/devmapper.c:72: error: `DM_DEVICE_LIST_VERSIONS' undeclared (first use in this function)

activate/devmapper.c:72: error: (Each undeclared identifier is reported only once

activate/devmapper.c:72: error: for each function it appears in.)

activate/devmapper.c:72: warning: assignment makes pointer from integer without a cast

activate/devmapper.c:73: warning: implicit declaration of function `dm_task_run'

activate/devmapper.c:74: warning: implicit declaration of function `dm_task_get_versions'

activate/devmapper.c:74: warning: pointer/integer type mismatch in conditional expression

activate/devmapper.c: In function `valid_ttype':

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:94: error: dereferencing pointer to incomplete type

activate/devmapper.c:98: error: dereferencing pointer to incomplete type

activate/devmapper.c: At top level:

activate/devmapper.c:109: warning: `struct dm_task' declared inside parameter list

activate/devmapper.c: In function `handle_table':

activate/devmapper.c:133: warning: implicit declaration of function `dm_task_add_target'

activate/devmapper.c: At top level:

activate/devmapper.c:141: warning: `struct dm_task' declared inside parameter list

activate/devmapper.c: In function `parse_table':

activate/devmapper.c:143: warning: passing arg 2 of `handle_table' from incompatible pointer type

activate/devmapper.c: In function `dm_create':

activate/devmapper.c:162: error: `DM_DEVICE_CREATE' undeclared (first use in this function)

activate/devmapper.c:162: warning: assignment makes pointer from integer without a cast

activate/devmapper.c:163: warning: implicit declaration of function `dm_task_set_name'

activate/devmapper.c:164: warning: passing arg 2 of `parse_table' from incompatible pointer type

activate/devmapper.c:170: warning: passing arg 1 of `_exit_dm' from incompatible pointer type

activate/devmapper.c: In function `dm_remove':

activate/devmapper.c:184: error: `DM_DEVICE_REMOVE' undeclared (first use in this function)

activate/devmapper.c:184: warning: assignment makes pointer from integer without a cast

activate/devmapper.c:188: warning: passing arg 1 of `_exit_dm' from incompatible pointer type

activate/devmapper.c: In function `dm_status':

activate/devmapper.c:199: error: storage size of `info' isn't known

activate/devmapper.c:204: error: `DM_DEVICE_STATUS' undeclared (first use in this function)

activate/devmapper.c:204: warning: assignment makes pointer from integer without a cast

activate/devmapper.c:207: warning: implicit declaration of function `dm_task_get_info'

activate/devmapper.c:210: warning: passing arg 1 of `_exit_dm' from incompatible pointer type

activate/devmapper.c:199: warning: unused variable `info'

activate/devmapper.c: In function `dm_version':

activate/devmapper.c:226: error: `DM_DEVICE_VERSION' undeclared (first use in this function)

activate/devmapper.c:226: warning: assignment makes pointer from integer without a cast

activate/devmapper.c:228: warning: implicit declaration of function `dm_task_get_driver_version'

activate/devmapper.c:230: warning: passing arg 1 of `_exit_dm' from incompatible pointer type

make[1]: *** [activate/devmapper.o] Error 1

make[1]: Leaving directory `/var/tmp/genkernel/21507.12526.937.482/dmraid/1.0.0.rc8/lib'

make: *** [lib] Error 2

* Gentoo Linux Genkernel; Version 3.3.4[0m

* Running with options: --dmraid initrd

* ERROR: Failed to compile the "" target...

* -- Grepping log... --

* -- End log... --

* Please consult /var/log/genkernel.log for more information and any

* errors that were reported above.

* Report any genkernel bugs to bugs.gentoo.org and

* assign your bug to genkernel@gentoo.org. Please include

* as much information as you can in your bug report; attaching

* /var/log/genkernel.log so that your issue can be dealt with effectively.

* 

* Please do *not* report compilation failures as genkernel bugs!

* 
```

...... activate/devmapper.c:12:26: libdevmapper.h: No such file or directory 

Somebody, Pleeese heeeelp   :Exclamation: 

10X in advance  :Smile:  & excuse me for terrible english   :Embarassed: 

----------

## NeddySeagoon

TUX4O,

Your Promice FastTrack S150 TX4 is a fakeraid card. dmraid uses the software provided on the card whereas kernel raid does it in the kernel.

There are two tools for setting up kernel raid, raidtools and mdadm. I'm sure one of them is on the liveCD.

The liveCD certainly has the kernel raid modules.

However, kernel raid and dmraid are not compatible, so going this route is a full reinstall. The advantiage is you don't need a n initrd to boot a kernel raid system.

----------

