Wednesday, August 18, 2010

Optimizing Modules in Ubuntu

If you’re trying to streamline your system, you may not want to have all of the various modules installed or accessible. Although unused modules take virtually no resources (even if they are loaded into memory), systems with limited capacity or that are hardened for security may not want unnecessary LKMs. Between the lsmod and modprobe -l commands, you can identify which modules are unnecessary and either remove them from the system or just not load them.

For example, if you do not have a printer on your parallel port, then you probably do not need the lp module loaded. Similarly, if you want to disable the floppy disk, you can remove that driver, too.

sudo modprobe -r lp
sudo modprobe -r floppy

You can make these changes permanent by removing lp from /etc/modules and adding both lp and floppy to /etc/modprobe.d/blacklist (or blacklist.conf). Alternately, if you need the disk space, then you can just delete the drivers from the system (use modinfo -F filename lp and modinfo -F filename floppy to find the files).

Source of Information : Wiley Ubuntu Powerful Hacks And Customizations

No comments: