Highpoint RocketRaid Driver Mini-HowTo
Notice
This is wiki page is in its infancy. Please feel free to modify or offer suggestions if possible. Currently a lot of this was done from memory and notes, and should therefore be tested again.
Purpose
This mini-howto is intended to help others avoid the frustration I went through when updating kernels and having my root partition on a RocketRaid mirrored drive. While not complete, this mini-howto should get most users the ability to have the driver automatically compile and install on a kernel update.
Prerequisites
Ubuntu 9.04 / 9.10
RocketRaid 26xx RAID Card
Kernel Tools and Headers
DKMS
Internet Access
Root/sudo Permission
Setup
First, install the build tools:
sudo apt-get install build-essential
"Note: Need to make sure kernel headers are installed"
Download the driver source from Highpoint: "I recommend verifying this link is the most recent before downloading"
lwp-download http://www.support-highpoint-tech.com/Main/rr26xx/264x/Linux/opensrc/rr2640-linux-src-v1.2-090925-0932.tar.gz
Extract the tar:
tar zxvf rr2640-linux-src-v1.2-090925-0932.tar.gz
cd rr2640-linux-src-v1.2
Make sure DKMS is installed:
sudo aptitude install dkms
Create the DKMS configuration file:
cat >dkms.conf
Cut and Paste the following text:
BUILT_MODULE_NAME=rr26xx DEST_MODULE_LOCATION=/kernel/drivers/scsi PACKAGE_NAME=rr26xx PACKAGE_VERSION=1.2 AUTOINSTALL=yes POST_BUILD="do_Module.symvers rr26xx save $dkms_tree/$module/$module_version/build/Module.symvers"
Hit "Control-D" (as in Dog) to close the file.
Copy the Makefile and Config files up to the top directory:
cp product/rr2640/linux/* . mv Makefile Makefile_orig
Modify the HPT_ROOT in the Makefile:
sed 's/HPT_ROOT := ..\/..\/../HPT_ROOT := \/var\/lib\/dkms\/rr26xx\/1.2\/build/' Makefile_orig >Makefile
Move the source into /usr/src for DKMS:
cd .. mv rr2640-linux-src-v1.2 /usr/src/rr26xx-1.2
"Todo: Should probably verify permissions here..."
"Note: For some reason dkms will not copy object files (.o) when doing builds, so we need to fool it below."
Trick dkms into looking in the /usr/src directory for the precompiled RocketRaid object code:
mv /usr/src/rr26xx-1.2/lib /usr/src/rr26xx-1.2/real_lib ln -s /usr/src/rr26xx-1.2/real_lib /usr/src/rr26xx-1.2/lib
"Note: Above symbolic link must be complete (absolute) path!"
Add the source to DKMS:
sudo dkms add -m rr26xx -v 1.2
Build the module:
sudo dkms build -k 2.6.31-14-generic -m rr26xx -v 1.2
This should hopefully compile correctly. If not send an email to "rocketraid at mark.org" with the output from the file "/var/lib/dkms/rr26xx/1.2/build/make.log"
Next install the module:
sudo dkms install -k 2.6.31-14-generic -m rr26xx -v 1.2
Finally, create the boot image:
sudo mkinitramfs -o /boot/initrd.img-2.6.31-14-generic 2.6.31-14-generic
This should install it into the named kernel listed above (2.6.31-14 in this example). It will also use DKMS to compile the module for future kernel update automatically. Please see note below.
Running mkinitramfs
The directions above seem to automatically recompile and install the module whenever a new kernel update comes out (at least for 9.04 and 9.10). However, so far it does not automatically add it to the boot image. To do so run the following command:
sudo mkinitramfs -o /boot/initrd.img-2.6.31-14-generic 2.6.31-14-generic
Obviously, replace "2.6.31-14-generic" with the kernel that was just updated.
I'm looking for a way to do this post DKMS (maybe POST_BUILD???). If anyone has any suggestions, please let me know!