Tuesday, July 7, 2009

Compiling a custom kernel for Ubuntu

I found out during my 4th of July server upgrade that the Moxa serial driver is broken in the 9.04 distribution 2.6.28 kernel.    After several futile attempts to backport and downstream the newer / older version into the stock kernel, I am now just going to upgrade to the latest kernel version entirely to   If this still doesnt work at least I will be on the latest kernel version so I can begin working with the LKML on fixing it.

Found this resource for compiling a kernel


I found out there is currently a bug with the installation of the .deb process.  Do the following after the preceding instructions.

From Mike Stroyan:

This is not actually a defect in nvidia-common. It is a defect in dkms.
The /etc/kernel/postinst.d/dkms script is sending messages to stdout.
That script is run under /usr/share/debconf/frontend, which expects that stdout will only be used for messages to it.
The actual response to the output does not occur while /etc/kernel/postinst.d/dkms is running.
The error message is deferred until the /etc/kernel/postinst.d/nvidia-common script runs.
That second script tries to send debconf requests to stdout.
That triggers the debconf error message in response to the junk that dkms wrote earlier.

Patching /etc/kernel/postinst.d/dkms to redirect stdout fixes the problem.
Adding "1>&2" to the invocation of /etc/init.d/dkms_autoinstaller keeps stdout clean.


  1. You ever find a fix for your Moxa card in jaunty? Having a a similar experience.

  2. Yep, the newer custom kernel kernel fixed the problem. Someone did some extensive refactoring of the serial drivers right around the time of Jaunty's release unfortunately. The fixes didnt come until after it was released.

    I also reported on it here https://bugs.launchpad.net/ubuntu/+bug/395926.