I recently upgraded my home server with a HighPoint RocketRAID 2640×1 PCI-Express RAID Controller Card. I had the option of software RAID but I figured that I might as well go hardware since the price really wasnt that bad and in case of a software issue the RAID Array should keep working upon a system reinstall.
Unfortunaly the required module for the card is not built into the kernel or available as a packge for Ubuntu 12.10 so I had to compile it manually to get it working.
Outlined below are the steps that I took to get it working on my system, results may vary but this works great and is using an updated version of module (most other info I found was for version 1.2 this is 1.5)
First I wanted to make sure that the operating system was fully updated
apt-get update apt-get upgrade
After I made sure it was all set to go I needed to install the additional packages to make sure that I was able to get the module to complile. As an extra precation I did a build-dep to make sure everything was there, probably not required … but its a step I took in the process either way.
sudo apt-get install -y build-essential checkinstall linux-source linux-headers-generic build-essential mlocate screen vnstat linux-source linux-headers-generic build-essential mlocate screen vnstat ubuntu-dev-tools ubuntu-dev-tools dkms sudo apt-get build-dep -y linux-source linux-headers-generic build-essential mlocate screen vnstat linux-source linux-headers-generic build-essential mlocate screen vnstat ubuntu-dev-tools ubuntu-dev-tools dkms
After everything was updated, and installed I did a reboot just to make sure nothing borked the system and was going to prevent it from booting once the module was compiled.
Now that you are back up and running you need to get the source files and get to work. I store all my source files in /root/src/
cd /root/src/ wget http://highpoint-tech.com/BIOS_Driver/rr26xx/2640X1-2640X4-2642/Linux/RR264x-Linux-Src-v1.5-120817-1641.tar.gz mkdir /mnt/raid tar -xvzf RR264x-Linux-Src-v1.5-120817-1641.tar.gz cd rr264x-linux-src-v1.5/
Now that you are in the directory you need to create the dkms.conf file with the following information. You can copy and paste it, and then hit Control+D to save/exit it.
cat > dkms.conf BUILT_MODULE_NAME=rr26xx DEST_MODULE_LOCATION=/kernel/drivers/scsi PACKAGE_NAME=rr26xx PACKAGE_VERSION=1.5 AUTOINSTALL=yes POST_BUILD="do_Module.symvers rr26xx save $dkms_tree/$module/$module_version/build/Module.symvers"
Now copy some files and copy/modify the Makefile so we can get this built
cp product/rr2640/linux/* . mv Makefile Makefile_orig sed 's/HPT_ROOT := ..\/..\/../HPT_ROOT := \/var\/lib\/dkms\/rr26xx\/1.5\/build/' Makefile_orig > Makefile
Now drop back a directory and lets move some things around.
cd .. sudo mv rr264x-linux-src-v1.5 /usr/src/rr26xx-1.5 mv /usr/src/rr26xx-1.5/lib /usr/src/rr26xx-1.5/real_lib ln -s /usr/src/rr26xx-1.5/real_lib /usr/src/rr26xx-1.5/lib
Lets build it
sudo dkms add -m rr26xx -v 1.5 sudo dkms build -k `uname -r` -m rr26xx -v 1.5 sudo dkms install -k `uname -r` -m rr26xx -v 1.5 sudo mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`
If everything went well you should be all set and upon reboot you will be able to mount the new partion to your mount point of choosing. Also anytime you update your kernel you will likely have to repeat these steps to make sure that you can compile the module again.