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

birthday cake


it’s my birthday today and I have a cake (of sorts). if you fancy a piece you are welcome to come up to 35D and claim it.


From: Gordon Cottee
thanks mate, i’ll be up shortly.


From: Lee Tyre
Happy Birthday Mat
Despite what everyone says, you DO look ur age! 😉
What kind of cake is it?



From: Mat Withers
a sort of gooey chocolate fudge slice

From: Lee Tyre
Nice 🙂 Then I’ll have a sliver!

From: Stuart Shearing
Happy Birthday!
-see you on Monday


From: Susie James

I would very much like to have a piece of your birthday cake but fear by the time I am able to come and get some, it will all be gone!

Looking forward to tonight and have some info for you on the Soton Beer Festival.


jabber server

ok – so I got annoyed by the fact that the gateways seemed broken on most other jabber servers so I set my own up. feel free to use it – hostname:

a long weekend

we’ve had a nice long break from work it being the jubilee weekend and all. I’ve done quite a lot as well. friday was sam (strudel) strovers last day at izr so we went to the pub after work for the obligatory drink (or two). josh and tom joined us and afterwards we went for a curry at the gandhi and then back to ours to watch some tv.

despite originally planning otherwise tom stayed the night and the next day we went geocaching. we found pine needles, viaduct view and senses before calling it a day due to extreme tiredness. convieniently, parking for the last geocache was at sainsburys in winchester so we bought ingredients there, went home and cooked lasange. again tom accidentally didn’t go home.

sunday was to be another geocaching day – this time in the portsmouth area. going via john and danielles house (to collect them) we first found hello sailor then (after a long and contorted car drive) sliding down butser hill and finally the kench before heading back for john and danielles for a barbequeue.

monday was jubilee day – not that we did anything royal. instead john and danielle came over and we went garden center shopping. they (j & d) bought lots of plants and I spotted the fish tank I’d like for my birthday (rio 240).

we popped into b & q on the way back and bought a lawnmower and a hedge trimmer as our garden is starting to look a bit overgrown. once we got them home, assembled the lawnmower and called steve cole to bring petrol around, a burst of garden activity ensued leaving it looking much tidier. finally we felt the need to pop down to the gandhi for a curry.

now I really know where I am

my Garmin eTrex Venture was waiting for me when I got into work today. pretty quick service, GPSW get the thumbs up in my books.

we went geocaching last night with janie and steve and found On The Way Down To The Wood, Down to the Wood and Travis in the New Forest. having felt that we’d done sufficient exercise we went for a curry at the gandhi.

whilst re-entering my diary data the other day I noticed that despite writing to the pizza hut in july 2000 they never ever got back to be – they really suck !


that tired feeling

I feel pretty knackered this morning. I seem to have had a series of 2:30 am bedtimes recently – the cold I seem to have caught isn’t helping much either.

I ordered a Garmin eTrex Venture yesterday, should make geocaching a bit easier. It turns up tomorrow so I’m quite excited about that.

We (steve, janie and I) we geocaching the weekend before last and totally enjoyed it. we found without a paddle and ponies and prickles getting severly spiked doing the last one. still it was fun.

I watched k-pax with roland last night – it was pretty good – I wonder when it’s going to be released in the uk.

well – thats all for now


thag you very buch – but my nose isn’t broken

well, despite my promises to myself that I’ll write a diary entry every day – well – at least one a week – maybe one a month, I seem to have let the whole thing go by the wayside. ah well – I guess I’m just lazier than I thought.

I woke up this morning and found my cold (which I’ve had for a few days) was so bad that I almost didn’t go to work. never the less I forced myself out of bed and drunk a lemsip and felt considerably better. I wonder how many people never make it out of bed every day to discover that colds always feel worse when they’re lying down. must be a pressure thing.

it’s now gone 4:00pm and mark and steve have deserted me so I’ve taken the opportunity to write this entry – it fills in the gap between 4:00pm and 5:00 when I have to leave to take the cats to the vets for their annual jabs.

the months of coporate slide from 4th wave to izr solutions is now reaching its climax with the staff moving from romsey to our new office in totton tomorrow (steve, mark and I are excluded from this as we moved some time ago) followed by “the big change over” in a few weeks.

“the big change over” is our change of uplink providers from psi net (via a 2Mbit line to romsey) to a multihomed setup in telehouse involving more bandwidth than you can shake a stick at from carrier1 and bandx. mark is truly going to be in cisco heaven making that lot work – and we’re going to have a very busy weekend.

well – it’s now 4:30 – so I better finish off what’s left today before I go home.