What is the correct procedure to load a kernel module at boot in RHEL/CentOS 2.1 (kernel 2.4.x)?

I am working my way backwards through various historical Linux distributions and have come up against a roadblock with disk management. RHEL/CentOS 2.1 ships with Linux kernel 2.4.x, which includes very early support for SATA devices. I have already updated to the final release kernel version 2.4.9-e.74, which includes support for the necessary kernel module sata_sil.o. However, I can’t get the attached device to appear when I run fdisk -l, so I cannot mount it.

I can see my primary disk on the ATA bus:

# fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 15566 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        64    512000   83  Linux
Partition 1 does not end on cylinder boundary:
     phys=(63, 221, 30) should be (63, 254, 63)
/dev/hda2            64       325   2097152   82  Linux swap
Partition 2 does not end on cylinder boundary:
     phys=(324, 242, 46) should be (324, 254, 63)
/dev/hda3           325     15567 122424320   83  Linux

My SATA drive is detected by the adapter itself but is not recognized by the operating system at boot, which I think is the source of the problem. I have to manually load the kernel module every time.

# modprobe -a sata_sil
  Vendor: ATA       Model: CT500MX500SSD1    Rev: M3CR
  Type:   Direct-Access                      ANSI SCSI revision: 05

The device is detected properly, which can be confirmed through dmesg.

# dmesg
...
SCSI subsystem driver Revision: 1.00
libata version 1.02 loaded.
sata_sil version 0.54
PCI: Found IRQ 10 for device 00:09.0
PCI: Sharing IRQ 10 with 00:04.2
ata1: SATA max UDMA/100 cmd 0xE89B3080 ctl 0xE89B308A bmdma 0xE89B3000 irq 10
ata2: SATA max UDMA/100 cmd 0xE89B30C0 ctl 0xE89B30CA bmdma 0xE89B3008 irq 10
ata1: dev 0 cfg 49:2f00 82:706b 83:7409 84:4163 85:7069 86:b409 87:4163 88:407f
ata1: dev 0 ATA, max UDMA/133, 976773168 sectors: lba48
ata1: dev 0 configured for UDMA/100
ata2: no device found (phy stat 00000000)
scsi0 : sata_sil
scsi1 : sata_sil
  Vendor: ATA       Model: CT500MX500SSD1    Rev: M3CR
  Type:   Direct-Access                      ANSI SCSI revision: 05

I can also see the device in /proc/scsi/scsi.

# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: CT500MX500SSD1   Rev: M3CR
  Type:   Direct-Access                    ANSI SCSI revision: 05

Red Hat Enterprise Linux 2.1 uses an older kernel (2.4 series), which predates the /sys filesystem introduced in the 2.6 kernel series. Therefore, rescanning for devices in RHEL 2.1 has to be done differently than in later releases. ChatGPT provided the following recommendation.

Rescan SCSI Bus Manually

In older systems, SATA devices were often treated as SCSI devices. You
can try forcing a rescan of the SCSI bus by writing to the
/proc/scsi/scsi interface. This can sometimes help the system
recognize new drives.

To rescan the SCSI bus, do the following:

First, identify the SCSI host adapter:

    cat /proc/scsi/scsi

Then, trigger a rescan of the SCSI bus:

    echo "scsi add-single-device H C I L" > /proc/scsi/scsi

Replace H, C, I, and L with the host, channel, ID, and LUN of
your drive. For example, if your device is on host 0, channel 0, ID 0,
and LUN 0, the command would be:

    echo "scsi add-single-device 0 0 0 0" > /proc/scsi/scsi

Check dmesg for any output related to the new device.

This did not have any result.

I would like to get this working, as I have been able to get CentOS 3.9, 4.9, 5.11, and 6.10 all working with this same SATA adapter. I have other plans for the ATA bus and would prefer to have this system booting off of the SATA adapter, if possible.

Although Silicon Image did release official Linux drivers, they only provided precompiled kernel modules, none of which are compatible. My only option is the sata_sil kernel module.

From the experience I have gained working backwards through these older releases, I believe that there is nothing wrong with the driver and that this is some kind of user error. The sata_sil kernel module was not included in the original 2.4.9-e.40 kernel release, so I believe the issue is that the kernel module isn’t loading before the system scans for attached devices, and I don’t know how to get it working.

I tried adding the following line to /etc/modules.conf, but it did not cause the kernel module to load during boot.

alias sii3112 sata_sil

I also tried creating a new initrd after loading the sata_sil kernel module. This didn’t work either.

# mkinitrd initrd-2.4.9-e.74.img 2.4.9-e.74

What is the correct procedure to configure the system to load the sata_sil kernel module at boot in RHEL/CentOS 2.1 (kernel 2.4.x)? I would also like to know if it’s possible to rescan the SCSI/SATA bus at runtime to get the drive working without having to reboot.