Return to

Where does Ubuntu save it's compiled network drivers?



I’ve had to compile a driver for a 10G network card that runs fine. Sadly everytime that I reboot the server I have to include insmod manually. In a perfect world it’d find it’s own driver, but I have no objection to just hardcoding the insmod either.

Any help is greatly appreciated. Ver is 16.04 server, driver is in /root for now.


Usually goes in /lib/modules/<KERNEL_VERSION>

You should probably update /lib/modprobe.d/<MODULE_NAME>.conf with the following line:

install <MODULE_NAME> insmod /path/to/<MODULE_NAME>.ko


If I understood you correctly, in my case:

Copy driver:

cp /root/Atlantic/atlantic.ko /lib/modules/4.4.0-116-generic/atlantic.ko

Create file:

nano /lib/modprobe.d/atlantic.conf
install atlantic insmod /lib/modules/4.4.0-116-generic/atlantic.ko

And that should do it. Thank you.


Yup, that’s what I meant.

/me silently judges your editor choice.


It took a while and several reboots to get this right. I changed from an explicit path to a calculated one to make this answer more universal for later. This isn’t the only way to accomplish the task, but it lends itself to be the most robust for noobs (like me) without pre-compiled drivers.

If this is useful to any one else, I found that I needed to execute:

cd /root/Atlantic
make clean
install -t /lib/modules/$(uname -r)/kernel/drivers/net /root/Atlantic/atlantic.ko
# Note the "-t directory", and that "install" sets the permissions correctly.
depmod -A

when compiling, then added the following line to /etc/modules once:

/lib/modules/$(uname -r)/kernel/drivers/net/atlantic
# Note the missing ".ko" extension and again the directory that "install" used.

This on Ubuntu 16.04 LTS server with the driver source placed in /root/Atlantic. Assuming that you want to put that driver in the /lib/modules/$(uname -r)/kernel/drivers/net directory where it seems to fit but I may be wrong.

This is while executing “sudo su” to get a root shell and also assumes things like “apt-get install gcc” and other necessary (free) software.

Ha ha. I’m open to suggestions as long they don’t look emacs-eque. Its a spinal injury thing. But, I am open.


Looks good to me. That is the “most correct” way to do it, IMO.

I did forget the depmod command. good looking out.

As for editor. I like vim just for the power it gives to shell out inside of an open document with the additional power of syntax highlighting. I often write C and python, and the syntax highlighting is a godsend for my use case.

As for the “shell out” stuff, you can do things like “:%!grep -v string” and update your document to remove every line that has a specific string in it. Or if you open a binary file, you can “:%!xxd” and “%!xxd -r” to turn vim into a psuedo hex editor. It just gives a lot of flexibility and power to the user that nano does not. But one might fit your work style better than the other.


Oddly enough, I just use Notepad++ for the highlighting (and most everything else) and use Nano for the rare Linux interactions. Goes to show how little I use Linux. I aim to change that (now that I have a server running Linux and ZFS). That’s 50% of the stuff I have to do. The rest is games via Windows on my workstation. Everything else is rolled over from Windows to Linux.

I’ll give vim a whirl to see if I can handle it. Emacs was a no-go because it required so many interactions with the keyboard with which I have so many problems. I had 13 problems just typing the text in this paragraph (make that 16).

I’ll post another thread describing a poor-man’s pf-sense substitute which should amuse you. Make that 19.

As I said a spinal injury, it is what it is. Anyway, thanks for your help.