# 3Ware IDE-RAID0 and IDE-SCSI emulation issue

## cirrus

Hello,

I don't know how to fix this:

I want to use a bootable 3Ware-IDE-RAID0 and the IDE-SCSI emulation for an IDE-CDRW and an IDE-DVDRW.

There is a generic 3Ware driver in the kernel at SCSI-adapters. So I think the adapter is used like a real SCSI-Adapter. So I have to compile the kernel with full (1) SCSI-Support and (2) SCSI-disk-support if I want to boot from the 3Ware-IDE-RAID0 (compiling (1) + (2) as "modules" it's not recognized during boot - a MD device is recognized...). 

Now I want to mount the both IDE burning devices connected to the Sec.IDE-onboard-controller into the system using the IDE-SCSI emulation. So I set the kernel boot option hdc=scsi-ide hdd=scsi-ide. Dmesg says its done so.

But to run the ide-scsi emulation now I have to compile (1) + (2) as Modules ! Otherwise the "modules" are loaded in a wrong sequence so that the Module IDE-SCSI won`t function.

When I compile the kernel for the 3Ware-controller as described first using the options hdc=ide-scsi hdd=ide-scsi and now do a modprobe ide-scsi the system freezes.

Has anyone an idea what to do?

My only ideas are:

- Wait for the next kernel generation 2.6 which has full ATAPI support for IDE-CDRW/DVDRW

- Using the 3Ware-RAID0 with help of MD devices, but I don't know how to do this... it must be tricky to configure it and whatsmore, the linux partitions are at this time /dev/SDA9 - 11, so there are other partitions on the same raid0 too.

Thanks for ideas,

Karsten.

----------

## Ulukay

compile the things as mdoules and create a initrd  :Smile:  (as i did to boot from my hpt374 with the opensource drivers)

----------

## cirrus

To use initrd do I only have to put in the initrd line into grub.conf after compiling the kernel the modules only.

Is there an initrd option in the kernel?

Thanks.

----------

## Ulukay

ähem ...

the initrd is a zipped ext2 image of some config files and modules you need do boot - you have to create it manually and add the modules you need to boot 

grub grabs at boot the initrd and loads it into a ramdisk (so are the modules available during the normal boot process)

you need to emerge lvm-user

after you compiled the kernel and the modules you need to create a blank standard initrd with: lvmcreate_initrd "kernelversion"

maybee this will help you adding modules into your initrd:

https://forums.gentoo.org/viewtopic.php?t=67808&highlight=hpt374

after all - add the initrd into grub.conf

----------

## cirrus

I did it as described in the link above. I compiled the kernel only with modules.

I added ...

sg.o

sr_mod.o

sd_mod.o

scsi_mod.o

3w-xxxx.o

to /tmp/initrd.ext2

and gziped it again. Copy to /boot.

Now grub.conf contents of:

root(0,8)

kernel (hd0,8)/boot/bzImage root=/dev/sda11 .....

initrd (hd0,8)/boot/initrd

When I reboot the MD-Driver is loaded and says autodetecting RAID array. Two seconds later there is Kernel-panic , I have to append the correct "root=" boot option. The problem is, the kernel doesn't detect the 3Ware now, the module didn't start yet. Thus there is no /dev/sda11 ...

In other words: It doesn't work so far.

What did I wrong? Any idea?

Thanks, Karsten.

----------

## Ulukay

did you: 

added in the /mnt/initrd/linuxrc

/sbin/insmod -f /modules/scsi_mod.o

/sbin/insmod -f /modules/sd_mod.o

/sbin/insmod -f /modules/3w-xxxx.o

with all modules????

btw. which 3ware are you using?

----------

## cirrus

I added the modules but not with the -f option, is it necessary?

I will try.

I use the 3Ware 7000-2 with 2 ports and two 160GB Samsung.

Will be back soon.... :Wink: 

Karsten.

----------

## Ulukay

if it does not work, you can add me in icq

43757581

----------

## cirrus

Hi,

now I added the -f option and nothing has changed.

But when I did the initrd modify I didn't copy initrd.old from the mentioned path because it is simply not present?

I installed Gentoo before using 3Ware not as module but with full support. When I did boot the 3Ware Controller was found before the MD-device driver comes up... Now there is no message of the 3Ware driver at all, it seems as if initrd wouldn't try to load the scsi_mod,sd_mod or 3w-xxxx driver....!?!?

Any idea?

Karsten

----------

## cirrus

Heyho... it works now !!!

What's gone wrong:

I had to compile the kernel again with initrd support included (but I asked to do so before ...?!?

https://forums.gentoo.org/viewtopic.php?t=30244&highlight=initrd+1024

OK, then initrd loaded during boot.

Important: It was necessary,  that all the scsi-modules were up-to-date in the new initrd, so after recompiling the kernel I had to copy the mentioned modules (scsi_mod.o etc...) to /mnt/initrd once again and made a fresh new initrd!

Btw: I didn't used the /modules path at all, the modules are in /mnt/initrd only.

First I added the three modules:

scsi_mod.o

sd_mod.o

3w-xxxx.o

and so my 3Ware-RAID0 was recognized again!

After booting up again I did a modprobe ide-scsi at the konsole and I got a freeze again! The sequence of loading the modules was still wrong, I know.

So I modified my linuxrc again:

scsi_mod.o

sd_mod.o

ide-scsi.o

3w-xxxx.o

Now the ide-scsi modules was loaded before the 3Ware adapter during boot sequence. And the system started now !!!!  :Laughing:   :Laughing:   :Laughing: 

Before I can say more about mounting the CDRW / DVD RWs correctly I have to install the rest of the system now because this is a complete fresh Gentoo installation process.

I will post a message when everything is completed and I can do a

cdrecord -scanbus

again.

Thanks so far,

Karsten.

----------

## Motormouz

Ordering problems with modules compiled in are easily solved if you append the following statement to the line used in grub or lilo that is used to boot the kernel:

scsihosts=ide-scsi:3w-xxxx

This tells the kernel that devices discovered by the ide-scsi driver should be enumerated before devices discovered by de 3ware driver.

----------

## gwung

I was trying to follow this discussion. 

i'm new to gentoo and I've got a freshly installed gentoo 2004.1 from livecd and encountered similar problems.  how to compile the 3ware 2-port driver in the kernel and make it boot off the card? what steps do i need to take?

thanks in advance!

----------

