Installing Debian 3.0 (woody) with Adaptec HostRAID support


Imagine my excitement, two new servers to install, both with dual 2.4GHz Xeon processors and 2GB’s of RAM – based on the Intel® Server Board SE7501WV2. This motherboard has a SCSI subsystem based on the Adaptec AIC-7902 controller which in turn has Adaptect HostRAID support built in. Just what I needed, the servers were supplied with pairs of 36GB hard disks and as they were to be installed in a mission critical role hardware RAID 1 (mirroring) would be perfect.

So I booted up the first server, “Ctl-A’d” into the Adaptec BIOS, turned on HostRAID support and created a RAID 1 array adding both disks to it. The controller took about 15 minutes so do it RAID building magic.

I use Debian and assumed that this SCSI controller would be covered by the generic “aic7xxx” Linux driver. After booting with the install CD this proved not to be the case – teach me to take these things for granted. After a minimal amount of research I discovered that infact there was a seperate driver for the AIC-79xx controller that was added to the Linux 2.4.x kernel tree around version 2.4.21. The document Technical Information on the Boot Floppies gave me all the information I needed on bulding a custom boot floppy for the install. I download the latest kernel source (2.4.22), configured a minimal kernel with AIC-79xx support compiled in, copied it onto my recue boot floppy and booted . . .

The kernel booted ok, but failed to detect the slightest sniff of the Adaptec controller. I scratched my head a bit and then download the latest realease of the driver from the Adaptec website and recompiled the kernel using that. Still no luck. I started wondering if the SCSI controller in the first server was faulty so I booted up the second server and low and behold the host adapter and both hard drives were detected.

My triumph was short lived as I quickly realised that I hadn’t enable HostRAID support in the Adaptec BIOS of this server. After doing so the SCSI adapter vanished from view. Damn !. After a bit more research I discovered posts from other people with the same problem as me and I also discovered a number of responses to these posts telling me that HostRAID support was not supported under Linux. That wasn’t what Intel claim in their documentation – admitedly they only support RedHat 8.0, but hey, I’d just recompile for the kernel I was using – right ?

Wrong ! the drivers from Intel come as a .exe file which when run unpack onto a floppy creating a RedHat 8.0 drivers disk containing 3 versions of the module a320raid.o.These modules only work with RedHat 8.0 kernels 2.4.18-14-i686, 2.4.18-14BOOT-i386 and 2.4.18-14smp-i686. Hmmm – I found it odd that I had not come across these drivers earlier during my initial search of the internet. Then I found an interesting post on the Adaptec Linux – SCSI forum:

Re: Linux HostRAID driver exists???

Posted by Leon Toh [Leon] on Sep 23 2003 20:28

At this point of time Adaptec does not have any plan to release a HostRAID driver support for Linux support due to various legal constraint.

The Host RAID driver which is available for download from Intel site only work with RH 8 release and this is license specificly for Intel release. Furthermore you have to approach Intel for support if you decided to use this driver in RH 8.

It is intended for the use of ASR 2120 and ASR 2200 controllers if RAID feature is require under Linux.

I have no idea where Leon got his information from or whether he represents Adaptec or Intel or is just an interested 3rd party. His information however is all I have been able to find on the subject so I had to accept that any solution would have to involve RedHat 8.0 kernel 2.4.18-14 and the a320raid.o module provided by Intel.

How I did it.

Firstly, I’d like to state that I’m no expert. I may have gone about this in entirely the wrong way and there may be a much easier way to achieve this. If anyone has any suggestions/tips feel free to let me know and I’ll update the information here.

Secondly, I have included the a320raid.o(HostRAID) driver from Intel (written by Adaptec) in the files available for download below. This driver is not released under the GPL and no source code is availble. I feel strongly that this is a *bad* thing and would encourage Adaptec to release the source for the driver as soon as possible. That being said I did not have to accept any license agreement when downloading or unpacking it so I am assuming thats it’s ok to redistribute these files.

You can find the correct RedHat kernels to match the Intel driver at I used 2.4.18-14BOOT to build a Debian rescue disk and used 2.4.18-14smp as the main kernel for the running machine. You can download the RPMS and unpack them yourselves but if you don’t know how to do this or you don’t have a RedHat box or a copy of alien to hand you can use my tar.gz files here (I’ve included the appropriate a320raid.o module in these tarballs so you won’t have to download them from the Intel site).

I then created a custom Debian rescue disk based on the “idepci” disk which you can download here. I used a standard root disk but also created a separate modules disk containing the RedHat SCSI drivers (scsi_mod.o and sd_mod.o), the HostRAID driver (a320raid.o) and the Intel Pro 1000 ethernet driver (e1000.o) for the NIC found on the motherboard. Again, if you can’t be bothered to build it yourself you can find mine here.

I’m assuming that you’ve already created you HostRAID array in the SCSI BIOS. Boot your system using the rescue disk and then switch to the root disk when asked. When system finishes booting you should be sitting at a standard Debian install screen. Select the appropriate keyboard mapping for your system then stick the “modules” disk in your floppy drive and select “Preload essential modules from a floppy” from the menu. You’ll be presented with a list of modules. The order you load them in *is* important as the Debian module installer won’t load other modules to satisfy dependencies. The order to load them is this:


The installer should recognise your system RAID array as a hard disk, and you should be able to choose the “Partition hard disk” option from the menu. I created a 2GB root (/) partition, a 2GB swap partiton and allocated the rest of the disk to /var – you may well want to choose a different partitioning scheme depending on your needs.

After initializing and mounting the various partitions skip the “Install Kernel and Driver Modules” as we’ll deal with installing a kernel and making the system bootable later.

This guide covers installing Debian via the network. You could of course install it from another source but later steps depend on your network adapter being configured so you should configure your adapter here anyway. Select “Configure the Network” from the menu. For some reason the RedHat kernel isn’t compiled with CONFIG_PACKET and CONFIG_FILTER (maybe it does via some modules I neglected to load) so DHCP won’t work, you’ll have to manually configure your NIC. Next select “Install the Base System” via the network and use your favourite http/ftp Debian mirror as the source.

Now for the “belt and braces” bit. Once the base system has installed “Alt-F2” to a shell and “chroot /target”. This should leave you with a prompt at the root of your nice new Linux installation. At this point I ran “bash” to give me a more friendly shell. You may or may not need to mount the proc filesystem, I did to just be sure (“mount -t proc /proc /proc”).

Next you’ll need to create an “/etc/apt/sources.list” file with the following line in:

deb stable main

changing the host name to your favourite Debian mirror. Running the command “apt-get update” will refresh your apt database ready to install packages. You will need one of the kernel tarballs mentioned earlier and a copy of the RedHat mkinitrd package (I did try to use the Debian initrd-tools package but couldn’t seem to get it to work with the RedHat kernel). I used scp (“apt-get install ssh”) to get the packages onto my new machine. You could just as easily install ftp or even lynx to copy the files across.

Untaring the packages from your root directory will put the files in the right places (I know .debs would have been nicer – anyone volunteering ?). Then you can create an initrd containing any modules needed for booting. I used this command:

“mkinitrd –with=scsi_mod –with=sd_mod –with=a320raid –with=e1000 /boot/initrd-2.5.18-14smp.img 2.4.18-14smp”

If you choose to use the “none smp” version of the RedHat kernel you’ll have to change the mkinitrd line accordingly. Finally you need to run lilo so the machine will boot. You could point lilo directly at the kernel image and initrd in /boot, but the “Debian way” seems to be to create symlinks in your root directory. This is easily done with the following commands:

“ln -s /boot/vmlinuz-2.4.18-14smp /vmlinuz”
“ln -s /boot/initrd-2.4.18-14smp.img /initrd.img”

again changing the kernel versions if necessary. Finally you’ll need an “/etc/lilo.conf” file. You can use this one or just type one in along the lines of:


After that run “lilo” an your’re more or less there. “exit” out of your chrooted shell, “Alt-F1” back to the install menu and select “Reboot the System”. Hopefully your system will boot up from the hard disk and run you through the final part of your Debian configuration. If for some reason the system fails to boot correctly you can always reboot using the rescue/root disks, load the modules from the modules disk and re-chroot yourself back into your hard disk to try and to fix it.

You may wish to check your kernel bootup messages or the output from dmesg for something along the lines of:

scsi0 : Vendor: ADAPTEC Model: AIC-7902(A4)

scsi1 : Vendor: ADAPTEC Model: AIC-7902(A4)

    Vendor: ADAPTEC Model: RAID 1 Rev: 1.0

    Type: Direct-Access ANSI SCSI revision: 00

Attached scsi disk sda at scsi1, channel 0, id 0, lun 0

SCSI device sda: 71774209 512-byte hdwr sectors (36748 MB)

Partition check:

    sda: sda1 sda2 sda3

Also examining the contents of “cat /proc/scsi/A320RAID/0” should reveal:

Adaptec A320RAID HostRAID driver v1.0.11-1434

Vendor: ADAPTEC Model: AIC-7902(A4)

Major: 254

Build Date: Mar 28 2003

This setup is running fine for me on two servers. I’d be interested to hear if anyone else attempts an install and what the results were.

11 thoughts on “Installing Debian 3.0 (woody) with Adaptec HostRAID support

  1. Great job ! But I have another problem: I need to install RH AS 2.1 with Adaptec hostRAID enabled. As I understand with your solution you are stucked with kernel 2.4.18-14 from RedHat and any change to the kernel is imposible. You cannot add hardware support (only what RH will provide for 8.0) or add functionality to this kernel.

    I think that Adaptec should release the sources for this SCSI hostRAID controler or tell us what are the reasons for not doing this.

    Anyway I think that you did a great job !



  2. I get your prepared tarballs and tried to install SCSI hostRAID drivers using additional IDE disk to check if the mirror will be detected successfully. And the onboard Adaptec controller aic7901 is detected while booting, but when I’ve tried to make ext2 file system on it I get a lot of error messages from a320raid driver. I gave up and install Red Hat 9 on that raid, but sometimes my system hangs while loading the raid driver or when mounting root partition.
    Does anybody have any idea why?
    Best regards,

  3. I tried to install your Kernel on a siemens Primargy rx 200, but there ist a broadcom Networkapater, Knoppix 3.3 can use die networkcard your Kernel can’t do it ;-(

    what shold I do, Ihave only pc’s with debian installed.

    Thanks Jan

  4. Hi Mat,

    Just thought you might like to know, I’ve been playing around with this for some time now, and have so far done the Debian/RH thing and then also a ‘pure’ RedHat 9 install, with the same results each time: the load on the machine **never drops below 1.00**.

    Of course, ‘top’ might be reporting the load as something other than it actually is (and it is not as if I can see any other processes which are *obviously* taking up resources, as in CPU or memory), but there *is* an adaptec process (a A320RAID watchd kernel process) there in ‘DW’ mode which as such can never die (uninterrupted sleep) and seems to be causing the high (reported load).

    Also posted to your website so that you may well read it there first 😉

    Subjectively the server — when compiling e.g. — also ‘feels slow’, which it shouldn’t be for 2.4Ghz + 1GB RAM.


  5. Hi Ed

    I also see the load average on both servers as 1.0 or more. This, as you pointed out, is due to the A320RAID watchd kernel process being in an uninterruptable sleep state.

    Any process in this state will automatically add 1.0 to the load average – I don’t think this is actually a problem.

    I’ve now had 2 dual processor machines running for about 3 months and haven’t noticed them feeling slow. I’m about to get a couple more so I’ll do some more experimenting.


  6. Hi,

    i dont get the Disc quotas running with that configuration, everything else is fine, is there any known thing?

  7. Sir,
    I am only interested in Debian. My two SCSI based servers are working
    with Debian Woody 3.0.Recently I procured a Server AcerAltosG510
    LSI 53C1020 is the SCSI adapter.Obviosly CD’s can not Detect the Hard Drive.
    I tried with boot options after getting the informations from /proc/pci file.
    But in vain

    I badly need u’r help

  8. Thank you for the great job on this article!
    I´ve just install a intel SE7501WV2 and it work fine for me. It was only a misstype in the instruktion, it is in the line when you create mkinitrd …. it is /boot/initrd-2.5.18-14smp.img
    and it should be initrd-2.4.18-14smp.img.

    Many TNX for this time saving document


  9. I’ve been tried to installed woody on an tx150 wich have the aic7902 / ASR 2120 onboard.
    i used a kernel2.4.22 whithout any patches and an therfore modified woody installCD with the only changes was the other kernel. I did not use any non-free drivers etc… in the config the e1000 (for NIC) and AIC-7902(For SCSI/RAID) was compiled fix in not as module. right now it works wonderfull
    But without your remembering about prest ctrl+d at boot and add the raid in bios i think i couldnt finish it. sorry for bad english but it is not my hme language.

  10. Thank you for the infos.
    Can anyone help me, how to build a newer kernel 2.4.20 RedHat for the debian system with Gigabit Braodcom 5704 driver. I have to install a Fujitsu-Siemsen RX300.

    Thanks a lot!

Comments are closed.