Kernel modules ed

By hand ed

list installed modules
lsmod

info
modinfo NAME

install
modprobe NAME

remove
modprobe -r NAME

location
/lib/modules/$(uname -r)/extra/
/lib/modules/$(uname -r)/drivers/

dkms ed

add ed

put the module source in the dkms "database"
dkms add PATH
or
dkms add NAME/VERSION
expects the source to be in
/usr/src/NAME-VERSION/
with a file dkms.conf.

This creates

/var/lib/dkms/NAME/VERSION/
with a symlink source to the source dir.

build ed

"compile"
dkms build NAME/VERSION
dkms build NAME-VERSION -k KERNEL
into
/var/lib/dkms/NAME/VERSION/build/

install ed

dkms install NAME/VERSION
dkms install NAME/VERSION -k KERNEL
probably using depmod and setting a database flag?

If there is already a module in

/usr/lib/modules/KERNEL/
it will be backed up into
/var/lib/dkms/MODULE/original_module/...

uninstall ed

dkms uninstall NAME/VERSION
dkms uninstall NAME/VERSION -k KERNEL

remove ed

dkms remove NAME/VERSION -k KERNEL
dkms remove NAME/VERSION --all
might restore old backup versions...

Categories: Computer, Linux