# dmraid without initrd

## Telemin

Hello all,

I was wondering if it is possible to get dmraid to correctly detect a fakeraid at boot time without needing an initrd?

To be clear this is NOT my boot device, it is simply a large media repository which needs to be shared between windows and linux.  I would like to be able to skirt the need for an initrd if possible as it's just another thing to have to faff with come kernel upgrade time.

Is this possible at all?

-Telemin-

----------

## NeddySeagoon

Telemin,

Loading the dmraid module in your /etc/conf.d/modules file should be enough.

It may have a service you need to add to the boot (not default) runlevel so that your dmraid partitions can be mounted from /etc/fstab.

----------

## frostschutz

If it's not your boot (and not your root/var/usr/etc) device then you don't need an initrd, as whatever needs to be done to make it available can just be done by the regular system as it boots up.

----------

## Telemin

Thanks guys, I was pretty sure it should be doable, but I can't seem to get it to work.

I have compiled in the relevant kernel options, and selected boot time detection of raid arrays, but I still need to do dmraid -ay before they show up in /dev/mapper/.  I have tried setting the various boot services to start and the autoloaded module approach also but nothing seems to work.

Anyone know what I'm missing, otherwise I'll have to faff about with initrds.

-Telemin-

----------

## frostschutz

I never used dmraid myself so I don't know which init script is responsible for it.

If all else fails just put dmraid -ay in your local start (in recent gentoo systems /etc/local.d/, in older ones it used to be a config file I think).

Forget about the initrd, this is not your problem here, you just need one of your init scripts to set it up or make your own

----------

## Telemin

Okay, thanks, so just a custom initscript with:

```

before lvm fsck

```

and in the boot runlevel should do it then?

-Telemin-

----------

## NeddySeagoon

Telemin,

Your main problem is that dmraid must be a kernel module. You cannot build it in.

Boot time detection of raid arrarys only works for mdadm arrays with version 0.90 raid superblocaks.

It has never worked for dmraid arrays.  Your initrd has done that for you up to now.

dmraid used to need the device-mapper service a long time ago. Thats now a part of lvm. 

hmm - I still have it.

dmraid -ay in your local start is less than ideal as you won't be able to mount any volumes on the raid at the time fstab is fed to mount.

but I auppose you can add mount -a to your local start so it has another go.

----------

