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.

new website online

the website has now been rewritten using movable type and has has a bit of a redesign. hopefully this’ll make it a bit easier to manage and thus encourage me to update it a bit more often (yeah you’ve heard that one before).

Front Page

welcome to minus-9 mk-III (or thereabouts). it may look
similar to the old one, but it’s been entirely rewritten using
movable type. at last I can claim no responsibility for the
code generating any of the content here – so if it’s rubbish,
it’s not my fault !

As always I can be contacted at