Debian Kernel Update RocketRaid Failure DKMS

Published by Torry Crass on

So I recently ran into a problem when I attempted to update my Linux system that has a RocketRaid 2640×4 installed.  A quick note is that since this is dealing with drivers for your raid card, doing the wrong thing here 'can' render your system unbootable so please be careful.  Anyhow, to continue, I ran:

apt-get update
apt-get upgrade

This let it upgrade the needed packages.  Unfortunately in this installation it errored out with something I'd not seen before.  Not to mention, broke my KVM/Qemu configuration somehow (still working on that).  As such, I thought I'd troubleshoot and try to resolve.  The errors that showed up were:

Setting up linux-image-2.6.32-5-amd64 (2.6.32-48squeeze1) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
dkms: running auto installation service for kernel 2.6.32-5-amd64:
      rr264x (1.5)...failed.

And

Setting up linux-headers-2.6.32-5-amd64 (2.6.32-48squeeze1) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 2.6.32-5-amd64
dkms: running auto installation service for kernel 2.6.32-5-amd64:
      rr264x (1.5)...failed.

Certainly not what I was expecting to see.  However, with a little searching I determined (as indicated) this was a problem with the DKMS build on the RocketRaid rr264x (v1.5) driver.  DKMS automatically attempts to build certain add-on driver modules at kernel update time (and on install of the drivers if you set it up that way).

Just to validate I had the right version, I checked my open-source code here: http://www.highpoint-tech.com/BIOS_Driver/rr26xx/2640X1-2640X4-2642/Linux/RR264x-Linux-Src-v1.5-120817-1641.tar.gz

That matched up with what I had so I next tried a few things.  The first, was an attempt to build the module with dkms in a manual way.

sudo dkms build -m rr264x -v 1.5

Had this worked, it would have been followed by the following:

sudo dkms install -m rr264x -v 1.5

Unfortuantely, it failed on the build with the following message:

Error! Bad return status for module build on kernel: 2.6.32-5-amd64 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/rr264x/1.5/build/ for more information.

The make.log file showed that there was an odd error:

DKMS make.log for rr264x-1.5 for kernel 2.6.32-5-amd64 (x86_64)
Sat Mar  2 13:10:58 CST 2013
make: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
/usr/src/linux-headers-2.6.32-5-common/scripts/Makefile.build:49: *** CFLAGS was changed in "/var/lib/dkms/rr264x/1.5/build/Makefile". Fix it to use EXTRA_CFLAGS.  Stop.
make[2]: *** [_module_/var/lib/dkms/rr264x/1.5/build] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'

I checked around to see what I could find about this and found an article suggesting that I run the following:

export KBUILD_NOPEDANTIC=1

Unfortunately, this didn't resolve the trouble.  It did give me a new message in the make.log file as follows:

DKMS make.log for rr264x-1.5 for kernel 2.6.32-5-amd64 (x86_64)
Sat Mar  2 13:30:30 CST 2013
make: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  Building modules, stage 2.
  MODPOST 0 modules
make: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'

This basically means that it got through the first part but didn't bother actually building the module; just as much of a failure as before in the grand scheme of things and as such, I decided perhaps the best way to tackle this was to take out the DKMS bit and install the module manually.  As such that's what I did:

dkms remove -m rr264x -v 1.5 --all
​------------------------------

Deleting module version: 1.5
completely from the DKMS tree.
------------------------------
Done.

After this, I re-ran my reinstalls on the kernel bits just to make sure everything went through alright:

apt-get --reinstall install linux-image-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/28.8 MB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 62577 files and directories currently installed.)
Preparing to replace linux-image-2.6.32-5-amd64 2.6.32-48squeeze1 (using .../linux-image-2.6.32-5-amd64_2.6.32-48squeeze1_amd64.deb) ...
Unpacking replacement linux-image-2.6.32-5-amd64 ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
Setting up linux-image-2.6.32-5-amd64 (2.6.32-48squeeze1) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
dkms: running auto installation service for kernel 2.6.32-5-amd64:
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-5-amd64
Found initrd image: /boot/initrd.img-2.6.32-5-amd64
  No volume groups found
done

And

apt-get --reinstall install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/538 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 62577 files and directories currently installed.)
Preparing to replace linux-headers-2.6.32-5-amd64 2.6.32-48squeeze1 (using .../linux-headers-2.6.32-5-amd64_2.6.32-48squeeze1_amd64.deb) ...
Unpacking replacement linux-headers-2.6.32-5-amd64 ...
Setting up linux-headers-2.6.32-5-amd64 (2.6.32-48squeeze1) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 2.6.32-5-amd64
dkms: running auto installation service for kernel 2.6.32-5-amd64:

No errors this time around.  Yay!  That's great news, so I then went about the manual build just to make sure I had things clean.

cd <extract path>/rr264x-linux-src-v1.5/product/rr2640/linux/

Then issue the make commands:

make clean
make
make install

Now I loaded the module:

modprobe -v rr26xx

Since I had already had this module loaded I didn't need to add it into the modules file but it can be checked as follows:

cat /etc/modules |grep rr26xx

If the above does not return the rr26xx module, you should run:

echo rr26xx >> /etc/modules

Also, depending on your setup and how things went you may need to issue this command as well:

update-initramfs -u

After this,

reboot

And all should be fine from this point forward.


0 Comments

Leave a Reply