I've got an embedded/headless Debian Linux box which boots from a read-only filesystem image. The configuration is set up so that I can (seemingly) write to the filesystem, but any changes to the filesystem do not actually get written to the flash device and thus do not survive a reboot.
This box has an on-motherboard Ethernet interface (Intel 82571EB) that uses the e1000e Linux driver:
root@embedded:~# lspci -v [...] 07:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06) Subsystem: Intel Corporation PRO/1000 PT Dual Port Server Adapter Flags: bus master, fast devsel, latency 0, IRQ 45 Memory at fc600000 (32-bit, non-prefetchable) [size=128K] I/O ports at 4000 [size=32] Capabilities: [c8] Power Management version 2 Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [e0] Express Endpoint, MSI 00 Kernel driver in use: e1000e [...] As a way to understand the e1000e driver a bit better (and perhaps find and fix a bug that I suspect might be lurking in it), I've compiled my own instrumented version of the e1000e.ko kernel extension file and I would like to try it out.
I can scp my e1000e_instrumented.ko file to the Linux box, but I'm not sure what the proper way is to disassociate the OS's built-in e1000e driver from the 82571EB Ethernet controller and then tell Linux to use my custom .ko file instead. (If it was a desktop-style Linux PC, I think I could do it by copying my file over the existing /lib/modules/3.8.13/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko file and then rebooting... but on this machine any changes I make will go away when I reboot the machine, so I think I need a technique that does not involve a reboot)
What is the proper way to do this in Debian Linux? As an initial test, I tried:
modprobe -r e1000e ; modprobe e1000e ... just to see if I could remove the built-in driver and then re-load it again, but doing that just kills the networking on the Linux box and doesn't bring it back.