Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just downloaded and compiled tg3.ko kernel module. Where should I put it on a Debian system? There is one in /lib/modules/2.6.32-5-xen-amd64/kernel/drivers/net/tg3.ko already.

Ideally, I would like to leave the original one where it is, and "bump the priority" for mine. So if mine doesn't get loaded or disappears, the original is still there as a fallback.

The only way I know to do it is dpkg-divert, but I feel a slight shiver in my stomach when I use it. It is especially scary to do it on a server, with the network module. :)

share|improve this question
You don't say what the motivation for doing this is. Why not use the module that is already on the system? – Faheem Mitha Mar 18 '12 at 21:04
up vote 4 down vote accepted

Place your module in /lib/modules/2.6.32-5-xen-amd64/updates/ (make the directory if it doesn't exist) and re-run dpkg-reconfigure linux-image-2.6.32-5-xen-amd64 (or just run depmod if you know how). Check that the new driver is found with modprobe -l tg3.

Read man 5 depmod.conf for more details.

share|improve this answer
you can then use "fpm" to create nice packages... works like a charm – ppuschmann Mar 18 '13 at 12:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.