NOTE: Ubuntu kernel packages carry a sub-version field that does not show up in uname -r, so there may occur subtle installation errors whereby the -dbgsym appears correct, but doesn't exactly match the kernel image running. For example, here is a mismatch between .41 and .42, which will result in run-time build-id verification errors from systemtap:

For Intrepid, there's no linux-image-debug-generic metapackage (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/289087); you have to download the right one from http://ddebs.ubuntu.com/pool/main/l/linux/ instead of getting it from APT (unfortunately getting "the right one" is basically impossible, as only the latest version is available for download). After downloading the one of these that matches your kernel, install it with dpkg -i. This will install /usr/lib/debug/boot/vmlinux-<yourkernelversion>. The system already knows to look there for it, so you don't need to symlink it into /lib/modules.

Devel environment

Kernel headers and gcc are needed for module compilation, so if you have not done so, install them (assuming the usage of generic kernel again): libcap-dev needed for Systemtap packages > 0.6-1

sudo apt-get install linux-headers-generic gcc libcap-dev

Note: Ubuntu does not currently include utrace support, limiting user space functionality. Once utrace is integrated into the upstream kernel this will no longer be an issue. With version 12.10 (Quantal) and the new Kernel 3.5 there is no need anymore to patch the Kernel. Systemtap can use UPROBES that are integrated into the kernel. For earlier releases such as 12.04 using the latest Mainline 3.5 Kernel (https://wiki.ubuntu.com/KernelMainlineBuilds) seems to do the trick.