You cannot remove a module which is already used by any program. Rmmod command will remove a module from the kernel. Vermagic: 3.5.0-19-generic SMP mod_unload modversions 686 4. # modinfo /lib/modules/3.5.0-19-generic/kernel/fs/squashfs/squashfs.koįilename: /lib/modules/3.5.0-19-generic/kernel/fs/squashfs/squashfs.koĭescription: squashfs 4.0, a compressed read-only filesystem Modinfo command will display information about a kernel module as shown below. # insmod /lib/modules/3.5.0-19-generic/kernel/fs/squashfs/squashfs.ko Insmod command will insert a new module into the kernel as shown below. Lsmod command will list modules that are already loaded in the kernel as shown beblow. Utilities to Manipulate Kernel Modules 1. This tutorial explains how to write a Kernel module using a simple Hello World example. On a normal linux system, the kernel modules will reside inside /lib/modules//kernel/ directory.Įarlier we discussed how to compile a kernel from the source. When those drivers are not needed, we can unload only that specific driver, which will reduce the kernel image size. ![]() Most of the drivers are implemented as a Linux kernel modules. ![]() Kernel modules offers an easy way to extend the functionality of the base kernel without having to rebuild or recompile the kernel again. ![]() Kernel modules are piece of code, that can be loaded and unloaded from kernel on demand.
0 Comments
Leave a Reply. |