Saturday, 30 January 2010

Debconf cruelty

Entirely my fault, but still: removing the line

. /usr/share/debconf/confmodule
from a DEB source package's post-installation file (ie: debian/postinst) results in the package not being configured at install-time any more. I would have never expected that sourcing the debconf module is in fact the way that automatic package configuration is invoked (I always assumed that dpkg invokes the config script just as it invokes the postinst script).

In not-entirely-unrelated news: the 0.9.6 release of TokenTube is only days away and features a plugin architecture (including a plugin for running Lua scripts).

Posted by Jürgen Pabel on 30 January 2010 at 02:20

Friday, 22 January 2010

NetXtreme II BCM5716 on Ubuntu 8.04

The Ubuntu 8.04 kernels support the NetXtreme II BCM5709 chips (PCI ID 14e4:163a) but not the BCM5716 (PCI ID 14e4:163b). According to this comment, it's possible to use the BCM5716 with said kernel by merely adding the corresponding PCI ID to the source and recompiling the kernel module (bnx2.ko).

Since Dell R210's contain the BCM5716 chip we needed a workable solution for running Ubuntu 8.04 on these systems. Manually recompiling a kernel module just doesn't seem very practicable - it would have to be recompiled every time a new kernel version is installed (ie: apt-get dist-upgrade). Instead, we created a initramfs hook that patches the existing bnx2 module. This script replaces the PCI ID for the BCM5709 with the PCI ID for the BCM5716 in the bnx2 kernel module. The patched kernel module loads and works nicely on our R210's.

Installation is easy:

  • download this file and copy it to /etc/initramfs-tools/hooks/bnx2
  • mark the file as executable: chmod 755 /etc/initramfs-tools/hooks/bnx2
  • update the initramdisk for the running kernel: dpkg-reconfigure linux-image-`uname -r`
From there on, all installed kernel updates automatically contain support for the BCM5716 - no more borked systems after kernel upgrades (because a recompiled module won't load in other kernel versions).

Closing note: yes, I realize that using sed for patching the kernel module isn't technically sophisticated - but it does the job.

Update: With some help from Jurrit (who left a question about it not working on Debian), we've figured out the Issue on Debian: Debian's modprobe implementation does not prefer kernel modules located in /lib/modules/`uname -r`/updates over kernel modules located elsewhere in the module directory subtree. Thus, I've created a Debian-specific version of this hook.

Posted by Jürgen Pabel on 22 January 2010 at 13:09
« First  « Prev   1 2 3 4 5   Next »  Last »
« January »
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031