Quick Review: Boxee Box
December 27, 2011 – 12:22 am | 3 Comments

Some of the technical issues with Boxee Box could have been fixed if the dev team was paying more attention to addressing the bugs rather than adding “features” of dubious value. In the final analysis, for the price and ease of use, Boxee Box is the best in its class and price range. You just need to be mindful of its limitations and buy it in hope of future improvements to its usability.

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Drivers

Working with Linux Driver Modules

Submitted by on December 22, 2009 – 6:57 pmNo Comment
Working with Linux Driver Modules

You just replaced a failed network card, rebooted your server and now network wouldn’t start and your screen is filled with cryptic error messages about some kernel module doing something it’s not supposed to do. This usually happens on Fridays or a day before you leave on vacation. Below is a summary of some basic Linux commands that can help you to quickly troubleshoot many driver/module-related problems.

First things first: whenever you add new hardware, replace failed hardware, or upgrade firmware, almost always you must install the drivers first. When that new disk controller is in and the system is booting up, it usually helps to have the correct driver already installed. How do you know that a specific module is loaded? Linux hides this information in /proc/modules. Let’s say you are looking for NFS-related modules:

icebox:~ # egrep "^nfs|^lockd" /proc/modules
 
      nfsd 211612 13 - Live 0xfa716000
      lockd 61748 1 nfsd, Live 0xf97e7000
      nfs_acl 2848 1 nfsd, Live 0xf9418000

Another way of getting the same information is by using the “lsmod” command:

icebox:~ # lsmod | egrep "^nfs|^lockd"
 
      nfsd                  211612  13
      lockd                  61748  1 nfsd
      nfs_acl                 2848  1 nfsd

Use the “modinfo” command to get a little bit more detail about the module that’s causing your headache:

icebox:~ # modinfo nfsd
 
      filename:       /lib/modules/2.6.27.7-9-pae/kernel/fs/nfsd/nfsd.ko
      license:        GPL
      author:         Olaf Kirch <okir@monad.swb.de>
      srcversion:     E6DFAD8170CEA2285A8E64C
      depends:        auth_rpcgss,sunrpc,lockd,exportfs,nfs_acl
      supported:      yes
      vermagic:       2.6.27.7-9-pae SMP mod_unload modversions 586

The particularly useful feature of the “modinfo” command is the list of dependencies. Here is a simple script that will “modinfo” the module of your choice and then check to make sure all dependent modules are loaded:

for module in `modinfo nfsd | grep depends | awk '{print $2}' | sed 's/,/ /g'`
do
	if [ `egrep -c "^${module} " /proc/modules` -gt 0 ]
	then
		egrep "^${module} " /proc/modules
	else
		echo "ERROR: dependednt module $module not found in /proc/modules"
	fi
done

If you have a driver module that is interfering with another module, you can unload one of them using “rmmod” command. You can use the “insmod” command to insert a module into the system kernel.

Perhaps a better way of removing (and adding) modules is by using the “modprobe” command. A cool feature of this command is the “–dry-run” option, which allows you to test adding/removing modules without actually adding or removing them. This is great if you have a production server that you don’t want to mess up (just yet).

If you support SLES systems and have the misfortune of dealing with Novell’s tech support, there is one tidbit of information you may find useful. Staring with SLES 11 any modules not directly supported by Novell will not load unless the /etc/modprobe.d/unsupported-modules file has this entry: allow_unsupported_modules 1

Popularity: 1% [?]

Related posts:

  1. Working with ISO images on Solaris

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.