# Serial Attached SCSI Controller problem?

## fajar79

I like Gentoo Linux, already try it for sometimes, seems really simple to manage for me.

Our company buy new server based on IBM x206, I don't know exactly the controller chipset version, but from the driver that they provide for redhat and suse, it seems the driver/module begin with adp94xx. I hope my gentoo 2005.1 stage 3 installation will work, but it doesn't  :Sad: . After browsing to someplaces, i found that adaptec provide a kernel 2.6.13 patched with SAS built in. I want to try that, but my gentoo live cd can't recognize the controller, so i can't install it  :Sad:  Maybe someone willing to help me ?

----------

## flybynite

Gentoo linux can be installed from almost anything.  You just need to find a way to boot the kernel that supports your hardware.  Then you can follow the install instructions.

Can you find any linux floppy or cdrom that supports your hardware?  Do you have access to another linux box to create your own bootable cdrom?

----------

## fajar79

yes, i have redhat linux enterprise 4 running on another box using that driver, i know maybe for you it maybe simple, but i'm still new, but i'm fall in love with gentoo  :Very Happy: 

----------

## linuxtuxhellsinki

Check out  http://www.gentoo.org/doc/en/altinstall.xml

----------

## fajar79

i'm testing in installing gentoo from ubuntu breezy(sda) in vmware, all it seems running well. After chrooting, installing the kernel that support the scsi controller(adp94xx/aic94xx)->manual kernel, installing grub in /dev/sdb, making adjustment in fstab to point / to /dev/sda2(/dev/sda1 for swap), modify grub.conf to point the root into /dev/sda2, then booting, and...

can't find valid root device......

hmm,, maybe i miss something in kernel, so, i repeat the process but using genkernel, with genkernel all, making adjustment in grub.conf and fstab, and it still give the same result.

can't find valid root device......

hmm, another try to separated /boot and /, but it gives the same result. I haven't try using the default gentoo-sources, cause i just want to try kernel that support my scsi controller in real system.

I have install gentoo several times using livecd gentoo, using gentoo-sources, and always running well. Did I miss something?

Thanks

----------

## dashnu

Have you figured this out yet? I have the same Controller same problem 2006.1 livecd does not see it. Were you able to get gentoo up and running after using a different live disk?

----------

## mda2376

I have one of these aic94xx controllers aswell and put together a livecd with the official adaptec 2.6.13-sas kernel as well as the 2.6.16-mm2 with support built in for aic94xx. Both of these kernels detect my controller but unfortunatly either of them can find the drives since they are SATA not SAS. As far as I can tell netiher kernel supports SATA discs. I'm making the livecd available so that hopefully it will be useful to someone.

I will keep it available here: http://ritbailey.servebeer.com/~matt/aic94xx-livecd.iso. Please be patient as I have a pretty slow upload here.

Edit: I almost forgot, there is no auto-login setup, so the username/password is root/root

----------

## dashnu

That sucks that this does not work for the sata disks. Good job with the cd anyways.. What do those of us with the sata drives do  :Sad: 

----------

## mda2376

Right now I dont know about the SATA discs. What I dont understand is in the dmesg output, after the aic94xx loads there is a libata version 1.20 (or 1.12 on the adaptec kernel) loading message. I havent been able to determine if SATA is _actually_ supported or not. I posted a message to the linux-scsi kernel mailing list but havent gotten any feedback as of yet. I'm about to install windows on this server and use it for something else.. which is a real shame.

----------

## dashnu

haha, I did the exact same thing. However I still need to get another server.. the next jump up is a bit to exspensive.

----------

## mda2376

Based on http://thread.gmane.org/gmane.linux.ide/8501 it looks like SATA on the aic94xx is not supported as of 2.6.16, but we might be seeing something by 2.6.17.

----------

## dashnu

I am seeing nothing in 2.6.17  :Sad: 

----------

## agapo

Hello,

	I'm new in the forum. I had the same problem with aic94xx module, it finds the controller but it's

not be able to see the SATA disks. Looking for more information I found the adp94xx module, I think is older than 

aic94xx but it works with SAS controllers and SATA drives. I created a liveCD to boot my server IBM 306m using 

vanilla kernel sources 2.6.10 http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.10.tar.gz) and the adp94xx

module sources (http://parker.vslib.cz/pub/adaptec/sas/linux/adp94xx-openbuild-b5918.i386.tar.gz). Instructions

to create a Live CD can be follow here (http://gentoo-wiki.com/HOWTO_build_a_LiveCD_from_scratch).

	This Live CD let me boot the server and using the adp94xx module I can access to SATA drives

(if you have setup a disk array in the hostRAID controller you must load the module setting the option

'attach_HostRAID:1'). Once you can access to drives... to install gentoo is a easy task.

	I'm very busy now but I'll try to upload my Live CD to a FTP server as soon as possible. I hope that 

it can be useful to gentoo friends who have a IBM xSeries server with this SAS controller.

Best regards

----------

## dashnu

Awesome man, Please let me know when you upload the live disk.

----------

## agapo

Hi again,

Here is the URL where the iso image is:

ftp://195.55.250.135/pub/livecd-IBM306m-SATA.iso (147 MB)

It comes with Kernel version 2.6.10 patched to support adp94xx SAS/SATA controller (inside SCSI drivers section you will be able to see adp94xx module). I have cleared modules what isn't useful to me along installation process (USB, sound, etc.). I just have included network modules to support broadcom NIC (it's the model used by my IBM 306m server), the network module is 'tg3'.

User and password to login in system are 'root' and 'root'.

Keyboard map loaded in boot process is spanish (es-cp850), you can load another one using loadkeys command. configurated system locales are: en_US/ISO-8859-1, en_US.UTF-8/UTF-8, es_ES/ISO-8859-1 and es_ES@euro/ISO-8859-15.

When the prompt appears you just type 'modprobe adp94xx' and you will see your drives (two SATA disk in my case) as '/dev/sda' and '/dev/sdb'. If you has defined an array in the hostRAID (this is my case too) it's better to type 'modprobe adp94xx attach_HostRAID=1' to access to whole disk array.

I hope this helps to you. It worked for me after two whole days looking for a solution desperately.

Best regards.

----------

## dashnu

downloading now. I really appreciate this man. I plan to get a couple 306m now.

Have you heard anything about when support will be added to the kernel tree?

----------

## agapo

I don't know, sorry. At the moment the only solution I know it's to use adp94xx module.

----------

## netbja

Hello agapo,

Could you please explain in details how do you compile the adaptec driver.

Because I create my own Live Gentoo 64 CD from scratch but it's impossible to compile the adp94xx driver.

Is the 2.6.10 kernel version needed by the driver ?

Thanks,

Bernard.Last edited by netbja on Wed Jun 21, 2006 3:58 pm; edited 1 time in total

----------

## DamFam

Thanks for this!

I have a problem, however.

I use the cd, access the array and install gentoo as per the gentoo documentation.

Come time to reboot, however - no joy. Can't find root fs.

How do I get/compile a kernel on the new install that can load the module?

Please help.

----------

## agapo

Hello:

	I'm sorry but I don't know if the module can be compiled for x64 systems. In my live CD I tried with 2.6.10 kernel (vanilla sources) but at this moment my machine is working nice with this module and 2.6.16-gentoo-r9 kernel (gentoo sources).

	the same thing happened to me. I had to create a initrd file (including adp94xx and libata modules and customizing slightly the linuxrc script inside) to be able to boot the machine from SATA HDs. In this URL you will be able to find the system.map, vmlinuz, initrd, modules and grub.conf files that I use at this moment to boot. If you have the same hardware than me in your server and you copy the files to the appropiate directories maybe you might be able to start your machine.

ftp://195.55.250.135/pub/files.tar.bz2

	I still have a little problem because initrd remains mounted after the boot process finish (I can unmount it manually but it doesn't do it automatically) but I'm very busy now to try solve this little issue and anyhow the system works fine.

I hope this helps you.

Best regards.

----------

## DamFam

Thank You!

What filesystems are supported/compiled into that initrd and kernel?

It hangs on trying to mount my root fs, which is ext3.

Thanks again!

----------

## agapo

You're welcome.

ext2 and ext3

so.. have you tried to modify the linuxrc script inside initrd file? initrd file is really a gzipped ext2 filesystem image that system use to load modules to RAM in the boot process before it be able to access to root devices. You can decompress, mount and enter on this "file" to change whatever you want and to make a new one. My linuxrc is like this:

#!/bin/nash

echo "Loading libata.ko module"

insmod /lib/libata.ko

echo "Loading adp94xx.ko module"

insmod /lib/adp94xx.ko

echo Mounting /proc filesystem

mount -t proc /proc /proc

echo 0x0100 > /proc/sys/kernel/real-root-dev

echo "Mounting root filesystem"

mount -o noatime --ro -t ext3 /dev/sda1 /sysroot

pivot_root /sysroot /sysroot/initrd

umount /initrd/proc

Maybe you root filesystem is not in /dev/sda1 and you must change this by your right partition. 

I hope this help you

----------

## DamFam

 *agapo wrote:*   

> You're welcome.
> 
> ext2 and ext3
> 
> so.. have you tried to modify the linuxrc script inside initrd file? initrd file is really a gzipped ext2 filesystem image that system use to load modules to RAM in the boot process before it be able to access to root devices. You can decompress, mount and enter on this "file" to change whatever you want and to make a new one. My linuxrc is like this:
> ...

 

Thanks! Do I just use TAR zxvf to unzip the image?

My root filesystem is in fact /dev/sda3, and /boot is /dev/sda1 so I would need to change it.

----------

## DamFam

OK, managed to make the change and recreate the initrd, but now I get

Mounting /proc filesystem

Mounting root filesystem

kjournald starrting. Commit interval 5 seconds

EXT3-fs: mounted filesystem with ordered data mode

pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2

umount /initrd/proc failed: 2

Freeing unused kernel memory: 172k freed

Kernel panic - not syncing: No init found. Try passing init= option to kernel

any ideas here? It looks to be mounting my root filesystem ok now.

----------

## rosmild

I've solved this problem just forcing genkernel to load adp94xx module in the initramfs.

Now everything works fine.

rosmild

----------

## gen4f

Hi,

 *Quote:*   

> I've solved this problem just forcing genkernel to load adp94xx module in the initramfs. 

 

how did you do this?

I tried to get it work, but it does not work , please help me.

Thanks in advance,

gen4f

----------

## rosmild

Hi,

first of all now I've some problem with kernel 2.6.17-r4, but everythink works fine with kernel 2.6.16-r13.

 - download this [url]http://www.adaptec.com/en-US/speed/sas/linux/adp94xx-openbuild-b5918_i386_tar_gz.htm [/url],   probably it contains just rpm files but you can convert them using rpm2targz.

 - insert adp94xx in you kernel tree, using this command 

```
./Build ../driver-adp94xx ../shipped-binary ../../../usr/src/linux-2.6.16-gentoo-r13 blist+=i686-smp
```

, pay attention cause you need to launch it in adaptec build directory and paths could be different.

- before to compile the kernel, you need to modify genkernl conf files:

```
 vi /usr/share/genkernel/x86/modules_load 
```

 and insert adp94xx at the end of "MODULES_SCSI" module list

```
 vi /usr/share/genkernel/generic/initrd.defaults 
```

 and insert adp94xx in MY_HWOPTS list

- Now you can compile your kernel.

- Don't forget to add "doscsi" option in grub.conf.

I hope this can help you to solve your problem.

If you need something else tell me. Sorry for my english,

matteo

----------

## gen4f

Hi,

thanks for your tips!

I was able to build the module and kompile the kernel. But after booting the new kernel I got an error:

/init: /init: /15: cannot create : Directory nonexistent

Kernel panic not syncing: Attempt to kill init

I am using an Raid1 set wit sata drives, the access to the system works fine with the boot-cd mentioned in this thread.

Whats rong? Can you post our grub.conf?

gen4f

----------

## gen4f

Hi,

problem solved, was caused by a corruped initrd.defaults.

emerge genkernel brings a  clean version.

Thanks

gen4f

----------

## DamFam

 *rosmild wrote:*   

> Hi,
> 
> first of all now I've some problem with kernel 2.6.17-r4, but everythink works fine with kernel 2.6.16-r13.
> 
>  - download this [url]http://www.adaptec.com/en-US/speed/sas/linux/adp94xx-openbuild-b5918_i386_tar_gz.htm [/url],   probably it contains just rpm files but you can convert them using rpm2targz.
> ...

 

Hi all,

I'm still fighting with this.

I am trying to follow the procedure above, but keep getting:

subdir-$(CONFIG_SCSI_ADP94XX) += adp94xx

 No dotconfig files found, make terminated.

the .config file for the kernel is in it's place. I've even tried backing it up, running a mrproper and putting it back. Same result.

Any ideas?

----------

## DamFam

Ok, I'm starting from scratch..

although it appears the livecd you posted doesn't have links or Lynx on it, so I can't install gentoo?

----------

## DamFam

 *gen4f wrote:*   

> Hi,
> 
> problem solved, was caused by a corruped initrd.defaults.
> 
> emerge genkernel brings a  clean version.
> ...

 

I keep getting this error.

I've re-emerged genkernel twice. Still errors out.

Can you help?

Also, how/where do you pass the module the "attach_HostRAID=1" parameter?

----------

## DamFam

Finally, I have a working system.

Thanks everyone.

using the files agapo posted, I was able to modify the initrd to suit my needs, inserting the adp94xx and libsata modules I made for my kernel. I then had to make a new nod in the initrd for my root fs (/dev/sda3).

Once that was done, I had to manually create the /initrd directory.

After that, a reboot brought me into a live system!

SUCCESS!

----------

## patap

 *agapo wrote:*   

> Hi again,
> 
> Here is the URL where the iso image is:
> 
> ftp://195.55.250.135/pub/livecd-IBM306m-SATA.iso (147 MB)
> ...

 

is this file still available ? 

firewall-ng var # wget ftp://195.55.250.135/pub/livecd-IBM306m-SATA.iso

--10:55:28--  ftp://195.55.250.135/pub/livecd-IBM306m-SATA.iso

           => `livecd-IBM306m-SATA.iso'

Connecting to 195.55.250.135:21... connected.

Logging in as anonymous ... 

Login incorrect.

----------

## pahud

I've booted it with an alternative LiveCD with adp94xx support but what kernel source can I use so I can boot it directly from the disk? Is adp94xx already supported in 2.6.20?

----------

