Promise SATA300 TX4 on Fedora Core 4

After installing Promise SATA300 TX4 into FC4 box, we’ve discovered that it is not supported out of the box as of kernel 2.6.12. After some research on the Internet, we’ve found a solution to this problem compiled from here and here. Basically you need to add one line to file sata_promise.c and recompile the kernel. After this, the kernel will be able to pick up Promise SATA300 TX4 adapter.

  1. Install fedora-buildrpmtree

    yum install fedora-buildrpmtree
    
  2. Create rpmbuild directory

    fedora-buildrpmtree
    
  3. Download the latest kernel sources

    wget http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/<kernel-name>.src.rpm
    
  4. Install it

    rpm -ivh <kernel-name>.src.rpm
    
  5. Patch the kernel with Fedora patches:

    cd ~/rpmbuild/SPECS/
    rpmbuild -bp --target=<your_arch> kernel-2.6.spec
    
  6. Patch sata_promise.c

    cd ~/rpmbuild/BUILD/kernel-<version>/linux-<version>
    vi drivers/scsi/sata_promise.c
    
  7. Add the following code:

    { PCI_VENDOR_ID_PROMISE, 0x3d17, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_20319 },
    
    between
    { PCI_VENDOR_ID_PROMISE, 0x3319, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_20319 },
    
    and
    { PCI_VENDOR_ID_PROMISE, 0x3d18, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_20319 },
    
  8. Build the new kernel

    make menuconfig
    make rpm
    
  9. Install the new kernel

    cd ~/rpmbuild/RPMS/
    rpm -ivh <kernel-name>.rpm
    
  10. Check Grub configuration


    sudo vi /boot/grub/grub.conf

    If the new kernel is not there, edit grub.conf to add it manually

  11. Reboot into the new kernel

    sudo /sbin/reboot
    

Enjoy!