Debian Sarge and QLA2340

The following is a brief example of how to compile a kernel module from the qla2x00-source package to get a QLogic QLA2340 fibre channel HBA working under Debian Sarge. This works well for me using kernel image 2.4.27-3 SMP. Many thanks to the kind package maintainers.

Edit your sources.list and add non-free branch to get qla2x00-source package via apt-get.

$ vi /etc/apt/sources.list
[...]
deb ftp://[...]/debian/ stable main non-free
deb-src ftp://[...]/debian/ stable main non-free
[...]
deb http://security.debian.org/ stable/updates main non-free
$ apt-get install bzip2

$ cd /usr/src

$ apt-get install qla2x00-source

$ bzip2 -cd qla2x00.tar.bz2 | tar xf -

$ apt-get install kernel-source-2.4.27

$ bzip2 -cd kernel-source-2.4.27.tar.bz2 | tar xf -

$ ln -s kernel-source-2.4.27 linux

$ cd linux

$ cp /boot/config-2.4.27-3-686-smp .config

$ apt-get install kernel-package

$ make oldconfig

$ make-kpkg --append-to-version=-3-686-smp \
--added-modules=qla2x00 modules_image

$ cd ..

$ dpkg -i qla2x00-modules-2.4.27-3-686-smp_[...]Custom_i386.deb

$ insmod qla2300

Check which device is available (see /var/log/messages) and where to mount preferably, then edit fstab.

$ vi /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
[...]
/dev/sdb1       /san            ext3    defaults        0       0
[...]
$ mkdir /san

$ /sbin/mkfs.ext3 /dev/sdb1

$ mount /dev/sdb1
$ df -ak
Filesystem           1K-blocks      Used Available Use% Mounted on
[...]
proc                         0         0         0   -  /proc
[...]
/dev/sdb1             51606124     32828  48951860   1% /san

Maybe clean up a little bit.

$ apt-get remove --purge kernel-source-2.4.27

$ apt-get remove --purge qla2x00-source

$ cd /usr/src

$ rm linux

$ /bin/rm -r kernel-source-2.4.27

$ /bin/rm -r modules

Comments are closed.