Advansys SCSI Cards and Fedora Core Linux


As someone with an old Advansys SCSI card that wants to use Fedora Core Linux, I have a problem. The Linux advansys module, though present in the mainline kernel, is not supported in some Fedora Core kernels.

For Fedora Core 1, the only problem was doing the installation; once installed, the kernel included the advansys module and all was well. The situation was similar for Fedora Core 2 until the kernel-2.6.7-1.494.2.2 errata kernel was released, which did not include the advansys module at all. The situation looked set to continue indefinitely, because the advansys driver was not built by default in the kernel.org kernels, which are tracked quite closely by the Fedora project. However, in early February 2005 new Fedora kernels were released (2.6.10-1.12_FC2 & 2.6.10-1.760_FC3) that reinstated the advansys module. I'd like to think that my request on fedora-list had something to do with this, but it was probably in the pipeline anyway ;-)

This page attempts to provide workarounds for installation of Fedora Core versions 1 to 3 and for building the advansys driver for the kernel releases that don't include it. Below you will find a boot CD image that can be used to install Fedora Core 2 on an advansys-based machine, and also a driver disk that can be used to install Fedora Core 1, Fedora Core 3 or Fedora Core 4. First though, here's my workaround to enable the pre-February 2005 Fedora kernels to work on hosts needing the advansys module.

DKMS Build for Advansys Kernel Module

This approach uses a convenient way of building and installing kernel modules using DKMS, and is applicable to Fedora Core 2 and 3 (2.6 kernel based).

To run dkms you must be root. Note that it is not sufficient to just use "su" to become root because that does not set up the correct environment; specifically, it does not add the necessary directories /sbin and /usr/sbin to the command search path. You must either log in as root, or use "su -" (note the use of a dash character as the parameter to su). This will set up the root environment correctly.

The first step is to install the DKMS RPM itself:
# rpm --install dkms-2.2.0.2-1.noarch.rpm

Next, install the kernel-advansys RPM:
# rpm --install kernel-advansys-0.9.5-1dkms.noarch.rpm
The kernel modules are automatically built for the currently running kernel and are installed when this RPM is installed.

If you don't need the advansys module for booting your machine (e.g. if the SCSI adapter is only used for a scanner or CD drive, not for disks), then you shouldn't need to do anything else (but see Making Sure the Advansys Module Loads at Boot Time below). The advansys module will be built for a new kernel during the first boot with that kernel.

If you do need the advansys module for booting (i.e. in an initrd), then there are extra steps you need to perform after installing a new kernel before you can boot into that kernel. You should ensure that the following line is present in your /etc/modprobe.conf file:
alias scsi_hostadapter advansys
Supposing you've just installed the 2.6.7-1.494.2.2 RPM:
# rpm --install kernel-2.6.7-1.494.2.2.i686.rpm
You now need to build and install the advansys module for that kernel. The following steps will do it:
# dkms build -k 2.6.7-1.494.2.2 -m kernel-advansys -v 0.9.5
# dkms install -k 2.6.7-1.494.2.2 -m kernel-advansys -v 0.9.5
(2.6.7-1.494.2.2 is the kernel version, 0.9.5 is the kernel-advansys version)
The first of these steps will build the advansys module, the second will install it and create the initrd. If all has gone well, you should now be able to boot into the new kernel.

This installation method assumes that you have gcc installed so that you can build the kernel modules. It's also possible to use dkms with pre-built binary modules so that the C compiler isn't needed on the target machine, but that's outside the scope of this note.

Installing Fedora Core 2

If you are trying to install Fedora Core 2 onto a system that needs to access an Advansys SCSI comtroller at install time (e.g. if the hard disks or CD-ROM drive are attached to it), you can use advansys-fc2-boot.iso. This is a modified version of the boot.iso image found in the images directory of the Fedora Core 2 install CD/DVD that has support for Advansys SCSI controllers.

Installing Fedora Core 1, Fedora Core 3 or Fedora Core 4

Installation on Fedora Core 1, Fedora Core 3 or Fedora Core 4 can be done using the driver disk advansys-driverdisk.zip. Simply extract the contents of the zip file on to a blank VFAT-formatted floppy disk and enter "linux dd" at the installer's boot prompt. When prompted to insert a driver disk, insert the disk you prepared earlier. This method does not work for Fedora Core 2 because of Bug 122952.

Please also note that this driver disk is suitable only for installation of Fedora Core 1, Fedora Core 3 or Fedora Core 4, and not for any other purpose - other systems require modules built for their specific kernel versions. There is no source code on this driver disk.

The driver disk shouldn't really be necessary for Fedora Core 4 because the installer initrd includes the advansys module, but the autodetection seems to fail. I believe this is because there is no data for Advansys cards in the pcitable file.

Making Sure the Advansys Module Loads at Boot Time

If you're booting from a SCSI disk attached to your Advansys card then this isn't an issue, because the advansys module is included in the initrd and is loaded at a very early stage of the boot process. Otherwise, you just need to choose somewhere to put the command:
modprobe advansys
The conventional place for this would be /etc/rc.modules, which will work fine if you're using an up to date kernel. If, however, you're still using old kernels that need the dkms system to build the module at boot time when you change kernels, you'll need to load the module later in the boot process, so /etc/rc.d/rc.local would probably be a better choice. If you're creating /etc/rc.modules or /etc/rc.d/rc.local from scratch, make sure the file is executable:
# chmod 755 /etc/rc.modules
or
# chmod 755 /etc/rc.d/rc.local

In Fedora Core 4, a new method is available for module loading: simply create a file with a name ending with .modules in directory /etc/sysconfig/modules and make it executable. Whatever you put into that file will be executed when the system boots up.

# (echo '#!/bin/sh'; echo 'modprobe advansys') > /etc/sysconfig/modules/advansys.modules
# chmod +x /etc/sysconfig/modules/advansys.modules

More on this in Bugzilla entry 123927.

Related Information

Red Hat Enterprise Linux 3 and clones apparently included an advansys module in their kernel-unsupported package.

The driver disk format changed after Red Hat Enterprise Linux 4 (i.e. Fedora Core 5 onwards). The pcitable file is no longer used, and a modules.alias file is required. However, the checks for these files are broken, at least up to Fedora Core 6 Test 2, in that the absence of a pcitable file will cause the installer to declare that the driver disk is broken, and the presence of modules.alias is not checked for, but will result in the driver disk not being loaded if the file is missing. This is documented in Bugzilla entry 195899.

Paul Howarth <paul@city-fan.org>

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[   ]advansys-fc2-boot.iso2004-08-13 07:16 4.0M 
[   ]kernel-advansys-0.9.1-1dkms.noarch.rpm2005-03-17 10:36 281K 
[   ]kernel-advansys-0.9.1-1dkms.src.rpm2005-03-17 10:36 223K 
[   ]advansys-driverdisk.zip2005-06-20 18:37 634K 
[   ]kernel-advansys-0.9.2-1dkms.noarch.rpm2007-07-18 12:09 606K 
[   ]kernel-advansys-0.9.2-1dkms.src.rpm2007-07-18 12:09 446K 
[   ]kernel-advansys-0.9.3-2dkms.noarch.rpm2008-02-04 16:18 594K 
[   ]kernel-advansys-0.9.3-2dkms.src.rpm2008-02-04 16:18 451K 
[   ]kernel-advansys-0.9.4-1dkms.noarch.rpm2009-06-04 14:17 1.2M 
[   ]kernel-advansys-0.9.4-1dkms.src.rpm2009-06-04 14:17 886K 
[   ]kernel-advansys-0.9.5-1dkms.noarch.rpm2010-04-13 14:58 1.2M 
[   ]kernel-advansys-0.9.5-1dkms.src.rpm2010-04-13 14:58 959K 
[   ]dkms-2.2.0.3-1.noarch.rpm2011-12-08 09:08 106K 
[   ]dkms-2.2.0.3-1.src.rpm2011-12-08 09:08 130K